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

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

Issue 2761853004: Rename BrowserAccessibility::GetParent to PlatformGetParent. (Closed)
Patch Set: PlatformGetParent rename Created 3 years, 9 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
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/ax_platform_position.h" 5 #include "content/browser/accessibility/ax_platform_position.h"
6 6
7 #include "content/browser/accessibility/browser_accessibility.h" 7 #include "content/browser/accessibility/browser_accessibility.h"
8 #include "content/browser/accessibility/browser_accessibility_manager.h" 8 #include "content/browser/accessibility/browser_accessibility_manager.h"
9 #include "ui/accessibility/ax_enums.h" 9 #include "ui/accessibility/ax_enums.h"
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 int AXPlatformPosition::AnchorIndexInParent() const { 62 int AXPlatformPosition::AnchorIndexInParent() const {
63 return GetAnchor() ? static_cast<int>(GetAnchor()->GetIndexInParent()) 63 return GetAnchor() ? static_cast<int>(GetAnchor()->GetIndexInParent())
64 : AXPosition::INVALID_INDEX; 64 : AXPosition::INVALID_INDEX;
65 } 65 }
66 66
67 void AXPlatformPosition::AnchorParent(AXTreeID* tree_id, 67 void AXPlatformPosition::AnchorParent(AXTreeID* tree_id,
68 int32_t* parent_id) const { 68 int32_t* parent_id) const {
69 DCHECK(tree_id); 69 DCHECK(tree_id);
70 DCHECK(parent_id); 70 DCHECK(parent_id);
71 71
72 if (!GetAnchor() || !GetAnchor()->GetParent()) { 72 if (!GetAnchor() || !GetAnchor()->PlatformGetParent()) {
73 *tree_id = AXPosition::INVALID_TREE_ID; 73 *tree_id = AXPosition::INVALID_TREE_ID;
74 *parent_id = AXPosition::INVALID_ANCHOR_ID; 74 *parent_id = AXPosition::INVALID_ANCHOR_ID;
75 return; 75 return;
76 } 76 }
77 77
78 BrowserAccessibility* parent = GetAnchor()->GetParent(); 78 BrowserAccessibility* parent = GetAnchor()->PlatformGetParent();
79 *tree_id = parent->manager()->ax_tree_id(); 79 *tree_id = parent->manager()->ax_tree_id();
80 *parent_id = parent->GetId(); 80 *parent_id = parent->GetId();
81 } 81 }
82 82
83 BrowserAccessibility* AXPlatformPosition::GetNodeInTree(AXTreeID tree_id, 83 BrowserAccessibility* AXPlatformPosition::GetNodeInTree(AXTreeID tree_id,
84 int32_t node_id) const { 84 int32_t node_id) const {
85 if (tree_id == AXPosition::INVALID_TREE_ID || 85 if (tree_id == AXPosition::INVALID_TREE_ID ||
86 node_id == AXPosition::INVALID_ANCHOR_ID) { 86 node_id == AXPosition::INVALID_ANCHOR_ID) {
87 return nullptr; 87 return nullptr;
88 } 88 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 int previous_on_line_id; 156 int previous_on_line_id;
157 if (!node || 157 if (!node ||
158 !node->GetIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, 158 !node->GetIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID,
159 &previous_on_line_id)) { 159 &previous_on_line_id)) {
160 return INVALID_ANCHOR_ID; 160 return INVALID_ANCHOR_ID;
161 } 161 }
162 return static_cast<int32_t>(previous_on_line_id); 162 return static_cast<int32_t>(previous_on_line_id);
163 } 163 }
164 164
165 } // namespace content 165 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698