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 CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AUTOMATION_MANAGER_AURA_H_ | 5 #ifndef CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AUTOMATION_MANAGER_AURA_H_ |
6 #define CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AUTOMATION_MANAGER_AURA_H_ | 6 #define CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AUTOMATION_MANAGER_AURA_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 ui::AXEvent event_type); | 53 ui::AXEvent event_type); |
54 | 54 |
55 void HandleAlert(content::BrowserContext* context, const std::string& text); | 55 void HandleAlert(content::BrowserContext* context, const std::string& text); |
56 | 56 |
57 // AutomationActionAdapter implementation. | 57 // AutomationActionAdapter implementation. |
58 void PerformAction(const ui::AXActionData& data) override; | 58 void PerformAction(const ui::AXActionData& data) override; |
59 | 59 |
60 // views::AXAuraObjCache::Delegate implementation. | 60 // views::AXAuraObjCache::Delegate implementation. |
61 void OnChildWindowRemoved(views::AXAuraObjWrapper* parent) override; | 61 void OnChildWindowRemoved(views::AXAuraObjWrapper* parent) override; |
62 | 62 |
| 63 protected: |
| 64 AutomationManagerAura(); |
| 65 virtual ~AutomationManagerAura(); |
| 66 |
63 private: | 67 private: |
64 friend struct base::DefaultSingletonTraits<AutomationManagerAura>; | 68 friend struct base::DefaultSingletonTraits<AutomationManagerAura>; |
65 | 69 |
66 AutomationManagerAura(); | |
67 virtual ~AutomationManagerAura(); | |
68 | |
69 // Reset all state in this manager. | 70 // Reset all state in this manager. |
70 void ResetSerializer(); | 71 void ResetSerializer(); |
71 | 72 |
72 void SendEvent(content::BrowserContext* context, | 73 void SendEvent(content::BrowserContext* context, |
73 views::AXAuraObjWrapper* aura_obj, | 74 views::AXAuraObjWrapper* aura_obj, |
74 ui::AXEvent event_type); | 75 ui::AXEvent event_type); |
75 | 76 |
76 // Whether automation support for views is enabled. | 77 // Whether automation support for views is enabled. |
77 bool enabled_; | 78 bool enabled_; |
78 | 79 |
79 // Holds the active views-based accessibility tree. A tree currently consists | 80 // Holds the active views-based accessibility tree. A tree currently consists |
80 // of all views descendant to a |Widget| (see |AXTreeSourceViews|). | 81 // of all views descendant to a |Widget| (see |AXTreeSourceViews|). |
81 // A tree becomes active when an event is fired on a descendant view. | 82 // A tree becomes active when an event is fired on a descendant view. |
82 std::unique_ptr<AXTreeSourceAura> current_tree_; | 83 std::unique_ptr<AXTreeSourceAura> current_tree_; |
83 | 84 |
84 // Serializes incremental updates on the currently active tree | 85 // Serializes incremental updates on the currently active tree |
85 // |current_tree_|. | 86 // |current_tree_|. |
86 std::unique_ptr<AuraAXTreeSerializer> current_tree_serializer_; | 87 std::unique_ptr<AuraAXTreeSerializer> current_tree_serializer_; |
87 | 88 |
88 bool processing_events_; | 89 bool processing_events_; |
89 | 90 |
90 std::vector<std::pair<views::AXAuraObjWrapper*, ui::AXEvent>> pending_events_; | 91 std::vector<std::pair<views::AXAuraObjWrapper*, ui::AXEvent>> pending_events_; |
91 | 92 |
92 DISALLOW_COPY_AND_ASSIGN(AutomationManagerAura); | 93 DISALLOW_COPY_AND_ASSIGN(AutomationManagerAura); |
93 }; | 94 }; |
94 | 95 |
95 #endif // CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AUTOMATION_MANAGER_AURA_H_ | 96 #endif // CHROME_BROWSER_UI_AURA_ACCESSIBILITY_AUTOMATION_MANAGER_AURA_H_ |
OLD | NEW |