| OLD | NEW |
| 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 |
| 11 namespace content { | 11 namespace content { |
| 12 | 12 |
| 13 AXPlatformPosition::AXPlatformPosition() {} | 13 AXPlatformPosition::AXPlatformPosition() {} |
| 14 | 14 |
| 15 AXPlatformPosition::~AXPlatformPosition() {} | 15 AXPlatformPosition::~AXPlatformPosition() {} |
| 16 | 16 |
| 17 AXPlatformPosition::AXPositionInstance AXPlatformPosition::Clone() const { | 17 AXPlatformPosition::ConcreteInstance AXPlatformPosition::CloneConcrete() const { |
| 18 return AXPositionInstance(new AXPlatformPosition(*this)); | 18 return ConcreteInstance(new AXPlatformPosition(*this)); |
| 19 } | 19 } |
| 20 | 20 |
| 21 base::string16 AXPlatformPosition::GetInnerText() const { | 21 base::string16 AXPlatformPosition::GetInnerText() const { |
| 22 if (IsNullPosition()) | 22 if (IsNullPosition()) |
| 23 return base::string16(); | 23 return base::string16(); |
| 24 DCHECK(GetAnchor()); | 24 DCHECK(GetAnchor()); |
| 25 return GetAnchor()->GetText(); | 25 return GetAnchor()->GetText(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 void AXPlatformPosition::AnchorChild(int child_index, | 28 void AXPlatformPosition::AnchorChild(int child_index, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 int previous_on_line_id; | 160 int previous_on_line_id; |
| 161 if (!node || | 161 if (!node || |
| 162 !node->GetIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, | 162 !node->GetIntAttribute(ui::AX_ATTR_PREVIOUS_ON_LINE_ID, |
| 163 &previous_on_line_id)) { | 163 &previous_on_line_id)) { |
| 164 return INVALID_ANCHOR_ID; | 164 return INVALID_ANCHOR_ID; |
| 165 } | 165 } |
| 166 return static_cast<int32_t>(previous_on_line_id); | 166 return static_cast<int32_t>(previous_on_line_id); |
| 167 } | 167 } |
| 168 | 168 |
| 169 } // namespace content | 169 } // namespace content |
| OLD | NEW |