Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: chrome/browser/extensions/api/automation_internal/automation_internal_api.cc

Issue 2813083003: Finish implementation of automation API hit testing for the desktop. (Closed)
Patch Set: Delete test that won't be relevant soon anyway Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/extensions/api/automation_internal/automation_internal_ api.h" 5 #include "chrome/browser/extensions/api/automation_internal/automation_internal_ api.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 26 matching lines...) Expand all
37 #include "content/public/browser/web_contents_observer.h" 37 #include "content/public/browser/web_contents_observer.h"
38 #include "content/public/browser/web_contents_user_data.h" 38 #include "content/public/browser/web_contents_user_data.h"
39 #include "extensions/common/extension_messages.h" 39 #include "extensions/common/extension_messages.h"
40 #include "extensions/common/permissions/permissions_data.h" 40 #include "extensions/common/permissions/permissions_data.h"
41 #include "ui/accessibility/ax_action_data.h" 41 #include "ui/accessibility/ax_action_data.h"
42 #include "ui/accessibility/ax_host_delegate.h" 42 #include "ui/accessibility/ax_host_delegate.h"
43 #include "ui/accessibility/ax_tree_id_registry.h" 43 #include "ui/accessibility/ax_tree_id_registry.h"
44 44
45 #if defined(USE_AURA) 45 #if defined(USE_AURA)
46 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" 46 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
47 #include "ui/aura/env.h"
47 #endif 48 #endif
48 49
49 namespace extensions { 50 namespace extensions {
50 class AutomationWebContentsObserver; 51 class AutomationWebContentsObserver;
51 } // namespace extensions 52 } // namespace extensions
52 53
53 DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::AutomationWebContentsObserver); 54 DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::AutomationWebContentsObserver);
54 55
55 namespace extensions { 56 namespace extensions {
56 57
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 void AccessibilityEventReceived( 171 void AccessibilityEventReceived(
171 const std::vector<content::AXEventNotificationDetails>& details) 172 const std::vector<content::AXEventNotificationDetails>& details)
172 override { 173 override {
173 for (const auto& event : details) { 174 for (const auto& event : details) {
174 ExtensionMsg_AccessibilityEventParams params; 175 ExtensionMsg_AccessibilityEventParams params;
175 params.tree_id = event.ax_tree_id; 176 params.tree_id = event.ax_tree_id;
176 params.id = event.id; 177 params.id = event.id;
177 params.event_type = event.event_type; 178 params.event_type = event.event_type;
178 params.update = event.update; 179 params.update = event.update;
179 params.event_from = event.event_from; 180 params.event_from = event.event_from;
181 #if defined(USE_AURA)
182 params.mouse_location = aura::Env::GetInstance()->last_mouse_location();
183 #endif
180 184
181 AutomationEventRouter* router = AutomationEventRouter::GetInstance(); 185 AutomationEventRouter* router = AutomationEventRouter::GetInstance();
182 router->DispatchAccessibilityEvent(params); 186 router->DispatchAccessibilityEvent(params);
183 } 187 }
184 } 188 }
185 189
186 void AccessibilityLocationChangesReceived( 190 void AccessibilityLocationChangesReceived(
187 const std::vector<content::AXLocationChangeNotificationDetails>& details) 191 const std::vector<content::AXLocationChangeNotificationDetails>& details)
188 override { 192 override {
189 for (const auto& src : details) { 193 for (const auto& src : details) {
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 int result_acc_obj_id) { 524 int result_acc_obj_id) {
521 if (!error.empty()) { 525 if (!error.empty()) {
522 Respond(Error(error)); 526 Respond(Error(error));
523 return; 527 return;
524 } 528 }
525 529
526 Respond(OneArgument(base::MakeUnique<base::Value>(result_acc_obj_id))); 530 Respond(OneArgument(base::MakeUnique<base::Value>(result_acc_obj_id)));
527 } 531 }
528 532
529 } // namespace extensions 533 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698