| 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/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 Loading... |
| 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(); |
| 179 params.event_from = event.event_from; | 181 params.event_from = event.event_from; |
| 180 | 182 |
| 181 AutomationEventRouter* router = AutomationEventRouter::GetInstance(); | 183 AutomationEventRouter* router = AutomationEventRouter::GetInstance(); |
| 182 router->DispatchAccessibilityEvent(params); | 184 router->DispatchAccessibilityEvent(params); |
| 183 } | 185 } |
| 184 } | 186 } |
| 185 | 187 |
| 186 void AccessibilityLocationChangesReceived( | 188 void AccessibilityLocationChangesReceived( |
| 187 const std::vector<content::AXLocationChangeNotificationDetails>& details) | 189 const std::vector<content::AXLocationChangeNotificationDetails>& details) |
| 188 override { | 190 override { |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 int result_acc_obj_id) { | 522 int result_acc_obj_id) { |
| 521 if (!error.empty()) { | 523 if (!error.empty()) { |
| 522 Respond(Error(error)); | 524 Respond(Error(error)); |
| 523 return; | 525 return; |
| 524 } | 526 } |
| 525 | 527 |
| 526 Respond(OneArgument(base::MakeUnique<base::Value>(result_acc_obj_id))); | 528 Respond(OneArgument(base::MakeUnique<base::Value>(result_acc_obj_id))); |
| 527 } | 529 } |
| 528 | 530 |
| 529 } // namespace extensions | 531 } // namespace extensions |
| OLD | NEW |