| 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 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 const BrowserAccessibility& node) { | 597 const BrowserAccessibility& node) { |
| 598 if (!delegate_) | 598 if (!delegate_) |
| 599 return; | 599 return; |
| 600 | 600 |
| 601 ui::AXActionData action_data; | 601 ui::AXActionData action_data; |
| 602 action_data.action = ui::AX_ACTION_DO_DEFAULT; | 602 action_data.action = ui::AX_ACTION_DO_DEFAULT; |
| 603 action_data.target_node_id = node.GetId(); | 603 action_data.target_node_id = node.GetId(); |
| 604 delegate_->AccessibilityPerformAction(action_data); | 604 delegate_->AccessibilityPerformAction(action_data); |
| 605 } | 605 } |
| 606 | 606 |
| 607 void BrowserAccessibilityManager::GetImageData( |
| 608 const BrowserAccessibility& node, |
| 609 const gfx::Size& max_size) { |
| 610 if (!delegate_) |
| 611 return; |
| 612 |
| 613 ui::AXActionData action_data; |
| 614 action_data.action = ui::AX_ACTION_GET_IMAGE_DATA; |
| 615 action_data.target_node_id = node.GetId(); |
| 616 action_data.target_rect = gfx::Rect(gfx::Point(), max_size); |
| 617 delegate_->AccessibilityPerformAction(action_data); |
| 618 } |
| 619 |
| 607 void BrowserAccessibilityManager::Increment( | 620 void BrowserAccessibilityManager::Increment( |
| 608 const BrowserAccessibility& node) { | 621 const BrowserAccessibility& node) { |
| 609 if (!delegate_) | 622 if (!delegate_) |
| 610 return; | 623 return; |
| 611 | 624 |
| 612 ui::AXActionData action_data; | 625 ui::AXActionData action_data; |
| 613 action_data.action = ui::AX_ACTION_INCREMENT; | 626 action_data.action = ui::AX_ACTION_INCREMENT; |
| 614 action_data.target_node_id = node.GetId(); | 627 action_data.target_node_id = node.GetId(); |
| 615 delegate_->AccessibilityPerformAction(action_data); | 628 delegate_->AccessibilityPerformAction(action_data); |
| 616 } | 629 } |
| (...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 hit_test_result = parent; | 1245 hit_test_result = parent; |
| 1233 parent = parent->GetParent(); | 1246 parent = parent->GetParent(); |
| 1234 } | 1247 } |
| 1235 | 1248 |
| 1236 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); | 1249 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); |
| 1237 last_hover_node_id_ = hit_test_result->GetId(); | 1250 last_hover_node_id_ = hit_test_result->GetId(); |
| 1238 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); | 1251 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); |
| 1239 } | 1252 } |
| 1240 | 1253 |
| 1241 } // namespace content | 1254 } // namespace content |
| OLD | NEW |