OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_ACCESSIBILITY_AX_WINDOW_OBJ_WRAPPER_H_ | 5 #ifndef UI_VIEWS_ACCESSIBILITY_AX_WINDOW_OBJ_WRAPPER_H_ |
6 #define UI_VIEWS_ACCESSIBILITY_AX_WINDOW_OBJ_WRAPPER_H_ | 6 #define UI_VIEWS_ACCESSIBILITY_AX_WINDOW_OBJ_WRAPPER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include "base/macros.h" |
8 #include "ui/aura/window_observer.h" | 11 #include "ui/aura/window_observer.h" |
9 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" | 12 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" |
10 | 13 |
11 namespace aura { | 14 namespace aura { |
12 class Window; | 15 class Window; |
13 } // namespace aura | 16 } // namespace aura |
14 | 17 |
15 namespace views { | 18 namespace views { |
16 | 19 |
17 // Describes a |Window| for use with other AX classes. | 20 // Describes a |Window| for use with other AX classes. |
18 class AXWindowObjWrapper : public AXAuraObjWrapper, | 21 class AXWindowObjWrapper : public AXAuraObjWrapper, |
19 public aura::WindowObserver { | 22 public aura::WindowObserver { |
20 public: | 23 public: |
21 explicit AXWindowObjWrapper(aura::Window* window); | 24 explicit AXWindowObjWrapper(aura::Window* window); |
22 ~AXWindowObjWrapper() override; | 25 ~AXWindowObjWrapper() override; |
23 | 26 |
24 // Whether this window is an alert window. | 27 // Whether this window is an alert window. |
25 bool is_alert() { return is_alert_; } | 28 bool is_alert() { return is_alert_; } |
26 | 29 |
27 // Sets whether this window is an alert window. | 30 // Sets whether this window is an alert window. |
28 void set_is_alert(bool is_alert) { is_alert_ = is_alert; } | 31 void set_is_alert(bool is_alert) { is_alert_ = is_alert; } |
29 | 32 |
30 // AXAuraObjWrapper overrides. | 33 // AXAuraObjWrapper overrides. |
31 AXAuraObjWrapper* GetParent() override; | 34 AXAuraObjWrapper* GetParent() override; |
32 void GetChildren(std::vector<AXAuraObjWrapper*>* out_children) override; | 35 void GetChildren(std::vector<AXAuraObjWrapper*>* out_children) override; |
33 void Serialize(ui::AXNodeData* out_node_data) override; | 36 void Serialize(ui::AXNodeData* out_node_data) override; |
34 int32 GetID() override; | 37 int32_t GetID() override; |
35 | 38 |
36 // WindowObserver overrides. | 39 // WindowObserver overrides. |
37 void OnWindowDestroying(aura::Window* window) override; | 40 void OnWindowDestroying(aura::Window* window) override; |
38 | 41 |
39 private: | 42 private: |
40 aura::Window* window_; | 43 aura::Window* window_; |
41 | 44 |
42 bool is_alert_; | 45 bool is_alert_; |
43 | 46 |
44 DISALLOW_COPY_AND_ASSIGN(AXWindowObjWrapper); | 47 DISALLOW_COPY_AND_ASSIGN(AXWindowObjWrapper); |
45 }; | 48 }; |
46 | 49 |
47 } // namespace views | 50 } // namespace views |
48 | 51 |
49 #endif // UI_VIEWS_ACCESSIBILITY_AX_WINDOW_OBJ_WRAPPER_H_ | 52 #endif // UI_VIEWS_ACCESSIBILITY_AX_WINDOW_OBJ_WRAPPER_H_ |
OLD | NEW |