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

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

Issue 2934953004: De-templatize ui::AXPosition
Patch Set: rebase Created 3 years, 6 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/ax_platform_position.cc » ('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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_AX_PLATFORM_POSITION_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_AX_PLATFORM_POSITION_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_AX_PLATFORM_POSITION_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_AX_PLATFORM_POSITION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "ui/accessibility/ax_position.h" 13 #include "ui/accessibility/ax_position.h"
14 #include "ui/accessibility/ax_tree_id_registry.h" 14 #include "ui/accessibility/ax_tree_id_registry.h"
15 15
16 namespace content { 16 namespace content {
17 17
18 class BrowserAccessibility; 18 class BrowserAccessibility;
19 19
20 using AXTreeID = ui::AXTreeIDRegistry::AXTreeID; 20 using AXTreeID = ui::AXTreeIDRegistry::AXTreeID;
21 21
22 class AXPlatformPosition 22 class AXPlatformPosition
23 : public ui::AXPosition<AXPlatformPosition, BrowserAccessibility> { 23 : public ui::AXPosition<AXPlatformPosition, BrowserAccessibility> {
24 public: 24 public:
25 AXPlatformPosition(); 25 AXPlatformPosition();
26 ~AXPlatformPosition() override; 26 ~AXPlatformPosition() override;
27 27
28 AXPositionInstance Clone() const override; 28 ConcreteInstance CloneConcrete() const override;
29 29
30 base::string16 GetInnerText() const override; 30 base::string16 GetInnerText() const override;
31 31
32 protected: 32 protected:
33 AXPlatformPosition(const AXPlatformPosition& other) = default; 33 AXPlatformPosition(const AXPlatformPosition& other) = default;
34 void AnchorChild(int child_index, 34 void AnchorChild(int child_index,
35 AXTreeID* tree_id, 35 AXTreeID* tree_id,
36 int32_t* child_id) const override; 36 int32_t* child_id) const override;
37 int AnchorChildCount() const override; 37 int AnchorChildCount() const override;
38 int AnchorIndexInParent() const override; 38 int AnchorIndexInParent() const override;
39 void AnchorParent(AXTreeID* tree_id, int32_t* parent_id) const override; 39 void AnchorParent(AXTreeID* tree_id, int32_t* parent_id) const override;
40 BrowserAccessibility* GetNodeInTree(AXTreeID tree_id, 40 BrowserAccessibility* GetNodeInTree(AXTreeID tree_id,
41 int32_t node_id) const override; 41 int32_t node_id) const override;
42 int MaxTextOffset() const override; 42 int MaxTextOffset() const override;
43 int MaxTextOffsetInParent() const override; 43 int MaxTextOffsetInParent() const override;
44 bool IsInLineBreak() const override; 44 bool IsInLineBreak() const override;
45 std::vector<int32_t> GetWordStartOffsets() const override; 45 std::vector<int32_t> GetWordStartOffsets() const override;
46 std::vector<int32_t> GetWordEndOffsets() const override; 46 std::vector<int32_t> GetWordEndOffsets() const override;
47 int32_t GetNextOnLineID(int32_t node_id) const override; 47 int32_t GetNextOnLineID(int32_t node_id) const override;
48 int32_t GetPreviousOnLineID(int32_t node_id) const override; 48 int32_t GetPreviousOnLineID(int32_t node_id) const override;
49 }; 49 };
50 50
51 } // namespace content 51 } // namespace content
52 52
53 #endif // CONTENT_BROWSER_ACCESSIBILITY_AX_PLATFORM_POSITION_H_ 53 #endif // CONTENT_BROWSER_ACCESSIBILITY_AX_PLATFORM_POSITION_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/ax_platform_position.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698