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 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 5 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 views::AXAuraObjWrapper* parent) { | 101 views::AXAuraObjWrapper* parent) { |
102 if (!enabled_) | 102 if (!enabled_) |
103 return; | 103 return; |
104 | 104 |
105 if (!parent) | 105 if (!parent) |
106 parent = current_tree_->GetRoot(); | 106 parent = current_tree_->GetRoot(); |
107 | 107 |
108 SendEvent(nullptr, parent, ui::AX_EVENT_CHILDREN_CHANGED); | 108 SendEvent(nullptr, parent, ui::AX_EVENT_CHILDREN_CHANGED); |
109 } | 109 } |
110 | 110 |
| 111 void AutomationManagerAura::OnEvent(views::AXAuraObjWrapper* aura_obj, |
| 112 ui::AXEvent event_type) { |
| 113 SendEvent(nullptr, aura_obj, event_type); |
| 114 } |
| 115 |
111 AutomationManagerAura::AutomationManagerAura() | 116 AutomationManagerAura::AutomationManagerAura() |
112 : AXHostDelegate(extensions::api::automation::kDesktopTreeID), | 117 : AXHostDelegate(extensions::api::automation::kDesktopTreeID), |
113 enabled_(false), | 118 enabled_(false), |
114 processing_events_(false) {} | 119 processing_events_(false) {} |
115 | 120 |
116 AutomationManagerAura::~AutomationManagerAura() { | 121 AutomationManagerAura::~AutomationManagerAura() { |
117 } | 122 } |
118 | 123 |
119 void AutomationManagerAura::Reset(bool reset_serializer) { | 124 void AutomationManagerAura::Reset(bool reset_serializer) { |
120 if (!current_tree_) | 125 if (!current_tree_) |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 } | 225 } |
221 } | 226 } |
222 | 227 |
223 // Otherwise, fire the event directly on the Window. | 228 // Otherwise, fire the event directly on the Window. |
224 views::AXAuraObjWrapper* window_wrapper = | 229 views::AXAuraObjWrapper* window_wrapper = |
225 views::AXAuraObjCache::GetInstance()->GetOrCreate(window); | 230 views::AXAuraObjCache::GetInstance()->GetOrCreate(window); |
226 if (window_wrapper) | 231 if (window_wrapper) |
227 SendEvent(nullptr, window_wrapper, action.hit_test_event_to_fire); | 232 SendEvent(nullptr, window_wrapper, action.hit_test_event_to_fire); |
228 #endif | 233 #endif |
229 } | 234 } |
OLD | NEW |