blob: a14d78ea673dfcf9b3dca40d252116b1717ce8ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_VIEWS_MUS_AX_TREE_SOURCE_MUS_H_
#define UI_VIEWS_MUS_AX_TREE_SOURCE_MUS_H_
#include "base/macros.h"
#include "ui/views/accessibility/ax_tree_source_views.h"
#include "ui/views/mus/mus_export.h"
namespace views {
class AXAuraObjWrapper;
// This class exposes the views hierarchy as an accessibility tree permitting
// use with other accessibility classes. Only used for out-of-process views
// apps (e.g. Chrome OS shortcut_viewer app). The browser process uses
// AXTreeSourceAura.
class VIEWS_MUS_EXPORT AXTreeSourceMus : public AXTreeSourceViews {
public:
// |root| must outlive this object.
AXTreeSourceMus(AXAuraObjWrapper* root, const ui::AXTreeID& tree_id);
~AXTreeSourceMus() override;
void set_device_scale_factor(float scale) { device_scale_factor_ = scale; }
// AXTreeSource:
void SerializeNode(AXAuraObjWrapper* node,
ui::AXNodeData* out_data) const override;
private:
// The display device scale factor to use while serializing this update.
float device_scale_factor_ = 1.f;
DISALLOW_COPY_AND_ASSIGN(AXTreeSourceMus);
};
} // namespace views
#endif // UI_VIEWS_MUS_AX_TREE_SOURCE_MUS_H_
|