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

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

Issue 2762373002: Fix computation of Automation API location offsets in WebViews. (Closed)
Patch Set: Only run new test on chromeos because of required perms 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // content::WebContentsObserver overrides. 169 // content::WebContentsObserver overrides.
170 void AccessibilityEventReceived( 170 void AccessibilityEventReceived(
171 const std::vector<content::AXEventNotificationDetails>& details) 171 const std::vector<content::AXEventNotificationDetails>& details)
172 override { 172 override {
173 for (const auto& event : details) { 173 for (const auto& event : details) {
174 ExtensionMsg_AccessibilityEventParams params; 174 ExtensionMsg_AccessibilityEventParams params;
175 params.tree_id = event.ax_tree_id; 175 params.tree_id = event.ax_tree_id;
176 params.id = event.id; 176 params.id = event.id;
177 params.event_type = event.event_type; 177 params.event_type = event.event_type;
178 params.update = event.update; 178 params.update = event.update;
179 params.location_offset =
180 web_contents()->GetContainerBounds().OffsetFromOrigin();
181 params.event_from = event.event_from; 179 params.event_from = event.event_from;
182 180
183 AutomationEventRouter* router = AutomationEventRouter::GetInstance(); 181 AutomationEventRouter* router = AutomationEventRouter::GetInstance();
184 router->DispatchAccessibilityEvent(params); 182 router->DispatchAccessibilityEvent(params);
185 } 183 }
186 } 184 }
187 185
188 void AccessibilityLocationChangesReceived( 186 void AccessibilityLocationChangesReceived(
189 const std::vector<content::AXLocationChangeNotificationDetails>& details) 187 const std::vector<content::AXLocationChangeNotificationDetails>& details)
190 override { 188 override {
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 int result_acc_obj_id) { 520 int result_acc_obj_id) {
523 if (!error.empty()) { 521 if (!error.empty()) {
524 Respond(Error(error)); 522 Respond(Error(error));
525 return; 523 return;
526 } 524 }
527 525
528 Respond(OneArgument(base::MakeUnique<base::Value>(result_acc_obj_id))); 526 Respond(OneArgument(base::MakeUnique<base::Value>(result_acc_obj_id)));
529 } 527 }
530 528
531 } // namespace extensions 529 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/automation/automation_apitest.cc ('k') | chrome/common/extensions/chrome_extension_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698