OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_ | 5 #ifndef UI_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_ |
6 #define UI_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_ | 6 #define UI_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_ |
7 | 7 |
8 #include <atk/atk.h> | 8 #include <atk/atk.h> |
9 | 9 |
| 10 #include "base/memory/ref_counted.h" |
10 #include "ui/accessibility/ax_export.h" | 11 #include "ui/accessibility/ax_export.h" |
11 #include "ui/accessibility/platform/ax_platform_node_base.h" | 12 #include "ui/accessibility/platform/ax_platform_node_base.h" |
12 | 13 |
| 14 namespace base { |
| 15 class TaskRunner; |
| 16 } |
| 17 |
13 namespace ui { | 18 namespace ui { |
14 | 19 |
15 // Implements accessibility on Aura Linux using ATK. | 20 // Implements accessibility on Aura Linux using ATK. |
16 class AXPlatformNodeAuraLinux : public AXPlatformNodeBase { | 21 class AXPlatformNodeAuraLinux : public AXPlatformNodeBase { |
17 public: | 22 public: |
18 AXPlatformNodeAuraLinux(); | 23 AXPlatformNodeAuraLinux(); |
19 | 24 |
20 // Set or get the root-level Application object that's the parent of all | 25 // Set or get the root-level Application object that's the parent of all |
21 // top-level windows. | 26 // top-level windows. |
22 AX_EXPORT static void SetApplication(AXPlatformNode* application); | 27 AX_EXPORT static void SetApplication(AXPlatformNode* application); |
23 static AXPlatformNode* application() { return application_; } | 28 static AXPlatformNode* application() { return application_; } |
24 | 29 |
| 30 // Do static initialization using the given task runner for file operations. |
| 31 AX_EXPORT static void StaticInitialize( |
| 32 scoped_refptr<base::TaskRunner> init_task_runner); |
| 33 |
25 AtkRole GetAtkRole(); | 34 AtkRole GetAtkRole(); |
26 void GetAtkState(AtkStateSet* state_set); | 35 void GetAtkState(AtkStateSet* state_set); |
27 void GetAtkRelations(AtkRelationSet* atk_relation_set); | 36 void GetAtkRelations(AtkRelationSet* atk_relation_set); |
28 | 37 |
29 // AXPlatformNode overrides. | 38 // AXPlatformNode overrides. |
30 void Destroy() override; | 39 void Destroy() override; |
31 gfx::NativeViewAccessible GetNativeViewAccessible() override; | 40 gfx::NativeViewAccessible GetNativeViewAccessible() override; |
32 void NotifyAccessibilityEvent(ui::AXEvent event_type) override; | 41 void NotifyAccessibilityEvent(ui::AXEvent event_type) override; |
33 | 42 |
34 // AXPlatformNodeBase overrides. | 43 // AXPlatformNodeBase overrides. |
35 void Init(AXPlatformNodeDelegate* delegate) override; | 44 void Init(AXPlatformNodeDelegate* delegate) override; |
36 int GetIndexInParent() override; | 45 int GetIndexInParent() override; |
37 | 46 |
38 private: | 47 private: |
39 ~AXPlatformNodeAuraLinux() override; | 48 ~AXPlatformNodeAuraLinux() override; |
40 | 49 |
41 // We own a reference to this ref-counted object. | 50 // We own a reference to this ref-counted object. |
42 AtkObject* atk_object_; | 51 AtkObject* atk_object_; |
43 | 52 |
44 // The root-level Application object that's the parent of all | 53 // The root-level Application object that's the parent of all |
45 // top-level windows. | 54 // top-level windows. |
46 static AXPlatformNode* application_; | 55 static AXPlatformNode* application_; |
47 | 56 |
48 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeAuraLinux); | 57 DISALLOW_COPY_AND_ASSIGN(AXPlatformNodeAuraLinux); |
49 }; | 58 }; |
50 | 59 |
51 } // namespace ui | 60 } // namespace ui |
52 | 61 |
53 #endif // UI_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_ | 62 #endif // UI_ACCESSIBILITY_AX_PLATFORM_NODE_AURALINUX_H_ |
OLD | NEW |