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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager.cc

Issue 2474363002: MacViews/a11y: Accessibility actions use AXActionData in AXPlatformNodeDelegate. (Closed)
Patch Set: Review comments. Created 4 years 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 (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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 } 557 }
558 558
559 return obj; 559 return obj;
560 } 560 }
561 561
562 void BrowserAccessibilityManager::SetFocus(const BrowserAccessibility& node) { 562 void BrowserAccessibilityManager::SetFocus(const BrowserAccessibility& node) {
563 if (!delegate_) 563 if (!delegate_)
564 return; 564 return;
565 565
566 ui::AXActionData action_data; 566 ui::AXActionData action_data;
567 action_data.action = ui::AX_ACTION_SET_FOCUS; 567 action_data.action = ui::AX_ACTION_FOCUS;
568 action_data.target_node_id = node.GetId(); 568 action_data.target_node_id = node.GetId();
569 delegate_->AccessibilityPerformAction(action_data); 569 delegate_->AccessibilityPerformAction(action_data);
570 } 570 }
571 571
572 void BrowserAccessibilityManager::SetFocusLocallyForTesting( 572 void BrowserAccessibilityManager::SetFocusLocallyForTesting(
573 BrowserAccessibility* node) { 573 BrowserAccessibility* node) {
574 ui::AXTreeData data = GetTreeData(); 574 ui::AXTreeData data = GetTreeData();
575 data.focus_id = node->GetId(); 575 data.focus_id = node->GetId();
576 tree_->UpdateData(data); 576 tree_->UpdateData(data);
577 } 577 }
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
1232 hit_test_result = parent; 1232 hit_test_result = parent;
1233 parent = parent->GetParent(); 1233 parent = parent->GetParent();
1234 } 1234 }
1235 1235
1236 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); 1236 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id();
1237 last_hover_node_id_ = hit_test_result->GetId(); 1237 last_hover_node_id_ = hit_test_result->GetId();
1238 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); 1238 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect();
1239 } 1239 }
1240 1240
1241 } // namespace content 1241 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698