| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/accessibility/browser_accessibility_manager.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 void BrowserAccessibilityManager::NavigationFailed() { | 339 void BrowserAccessibilityManager::NavigationFailed() { |
| 340 user_is_navigating_away_ = false; | 340 user_is_navigating_away_ = false; |
| 341 } | 341 } |
| 342 | 342 |
| 343 bool BrowserAccessibilityManager::UseRootScrollOffsetsWhenComputingBounds() { | 343 bool BrowserAccessibilityManager::UseRootScrollOffsetsWhenComputingBounds() { |
| 344 return true; | 344 return true; |
| 345 } | 345 } |
| 346 | 346 |
| 347 void BrowserAccessibilityManager::OnAccessibilityEvents( | 347 void BrowserAccessibilityManager::OnAccessibilityEvents( |
| 348 const std::vector<AXEventNotificationDetails>& details) { | 348 const std::vector<AXEventNotificationDetails>& details) { |
| 349 TRACE_EVENT0("accessibility", |
| 350 "BrowserAccessibilityManager::OnAccessibilityEvents"); |
| 351 |
| 349 // Update the cached device scale factor. | 352 // Update the cached device scale factor. |
| 350 if (delegate_ && !use_custom_device_scale_factor_for_testing_) | 353 if (delegate_ && !use_custom_device_scale_factor_for_testing_) |
| 351 device_scale_factor_ = delegate_->AccessibilityGetDeviceScaleFactor(); | 354 device_scale_factor_ = delegate_->AccessibilityGetDeviceScaleFactor(); |
| 352 | 355 |
| 353 // Process all changes to the accessibility tree first. | 356 // Process all changes to the accessibility tree first. |
| 354 for (uint32_t index = 0; index < details.size(); ++index) { | 357 for (uint32_t index = 0; index < details.size(); ++index) { |
| 355 const AXEventNotificationDetails& detail = details[index]; | 358 const AXEventNotificationDetails& detail = details[index]; |
| 356 if (!tree_->Unserialize(detail.update)) { | 359 if (!tree_->Unserialize(detail.update)) { |
| 357 if (delegate_) { | 360 if (delegate_) { |
| 358 LOG(ERROR) << tree_->error(); | 361 LOG(ERROR) << tree_->error(); |
| (...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 hit_test_result = parent; | 1270 hit_test_result = parent; |
| 1268 parent = parent->PlatformGetParent(); | 1271 parent = parent->PlatformGetParent(); |
| 1269 } | 1272 } |
| 1270 | 1273 |
| 1271 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); | 1274 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); |
| 1272 last_hover_node_id_ = hit_test_result->GetId(); | 1275 last_hover_node_id_ = hit_test_result->GetId(); |
| 1273 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); | 1276 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); |
| 1274 } | 1277 } |
| 1275 | 1278 |
| 1276 } // namespace content | 1279 } // namespace content |
| OLD | NEW |