| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou
ter.h" | 14 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou
ter.h" |
| 15 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
| 16 #include "chrome/common/extensions/chrome_extension_messages.h" | 16 #include "chrome/common/extensions/chrome_extension_messages.h" |
| 17 #include "content/public/browser/ax_event_notification_details.h" | 17 #include "content/public/browser/ax_event_notification_details.h" |
| 18 #include "content/public/browser/browser_context.h" | 18 #include "content/public/browser/browser_context.h" |
| 19 #include "ui/accessibility/ax_action_data.h" | 19 #include "ui/accessibility/ax_action_data.h" |
| 20 #include "ui/accessibility/ax_enums.h" | 20 #include "ui/accessibility/ax_enums.h" |
| 21 #include "ui/aura/env.h" |
| 21 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
| 22 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" | 23 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" |
| 23 #include "ui/views/view.h" | 24 #include "ui/views/view.h" |
| 24 #include "ui/views/widget/widget.h" | 25 #include "ui/views/widget/widget.h" |
| 25 | 26 |
| 26 #if defined(OS_CHROMEOS) | 27 #if defined(OS_CHROMEOS) |
| 27 #include "ash/wm/window_util.h" // nogncheck | 28 #include "ash/wm/window_util.h" // nogncheck |
| 28 #endif | 29 #endif |
| 29 | 30 |
| 30 using content::BrowserContext; | 31 using content::BrowserContext; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 179 |
| 179 // Make sure the focused node is serialized. | 180 // Make sure the focused node is serialized. |
| 180 views::AXAuraObjWrapper* focus = | 181 views::AXAuraObjWrapper* focus = |
| 181 views::AXAuraObjCache::GetInstance()->GetFocus(); | 182 views::AXAuraObjCache::GetInstance()->GetFocus(); |
| 182 if (focus) | 183 if (focus) |
| 183 current_tree_serializer_->SerializeChanges(focus, ¶ms.update); | 184 current_tree_serializer_->SerializeChanges(focus, ¶ms.update); |
| 184 | 185 |
| 185 params.tree_id = 0; | 186 params.tree_id = 0; |
| 186 params.id = aura_obj->GetID(); | 187 params.id = aura_obj->GetID(); |
| 187 params.event_type = event_type; | 188 params.event_type = event_type; |
| 189 params.mouse_location = aura::Env::GetInstance()->last_mouse_location(); |
| 188 AutomationEventRouter* router = AutomationEventRouter::GetInstance(); | 190 AutomationEventRouter* router = AutomationEventRouter::GetInstance(); |
| 189 router->DispatchAccessibilityEvent(params); | 191 router->DispatchAccessibilityEvent(params); |
| 190 | 192 |
| 191 processing_events_ = false; | 193 processing_events_ = false; |
| 192 auto pending_events_copy = pending_events_; | 194 auto pending_events_copy = pending_events_; |
| 193 pending_events_.clear(); | 195 pending_events_.clear(); |
| 194 for (size_t i = 0; i < pending_events_copy.size(); ++i) { | 196 for (size_t i = 0; i < pending_events_copy.size(); ++i) { |
| 195 SendEvent(context, | 197 SendEvent(context, |
| 196 pending_events_copy[i].first, | 198 pending_events_copy[i].first, |
| 197 pending_events_copy[i].second); | 199 pending_events_copy[i].second); |
| 198 } | 200 } |
| 199 } | 201 } |
| OLD | NEW |