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

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

Issue 2988753002: Revert of Migrate BrowserAccessibility windows unique id handling to AXPlatformNodeWin. (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_ACCESSIBILITY_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "content/browser/accessibility/browser_accessibility.h" 13 #include "content/browser/accessibility/browser_accessibility.h"
14 #include "ui/accessibility/platform/ax_platform_node.h"
15 14
16 namespace content { 15 namespace content {
17 16
18 class CONTENT_EXPORT BrowserAccessibilityAndroid : public BrowserAccessibility { 17 class CONTENT_EXPORT BrowserAccessibilityAndroid : public BrowserAccessibility {
19 public: 18 public:
20 static BrowserAccessibilityAndroid* GetFromUniqueId(int32_t unique_id);
21 int32_t unique_id() const { return unique_id_; }
22
23 // Overrides from BrowserAccessibility. 19 // Overrides from BrowserAccessibility.
24 void OnDataChanged() override; 20 void OnDataChanged() override;
25 bool IsNative() const override; 21 bool IsNative() const override;
26 void OnLocationChanged() override; 22 void OnLocationChanged() override;
27 base::string16 GetValue() const override; 23 base::string16 GetValue() const override;
28 24
29 bool PlatformIsLeaf() const override; 25 bool PlatformIsLeaf() const override;
30 26
31 bool IsCheckable() const; 27 bool IsCheckable() const;
32 bool IsChecked() const; 28 bool IsChecked() const;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // adding |offset| to each one. 130 // adding |offset| to each one.
135 void GetWordBoundaries(std::vector<int32_t>* word_starts, 131 void GetWordBoundaries(std::vector<int32_t>* word_starts,
136 std::vector<int32_t>* word_ends, 132 std::vector<int32_t>* word_ends,
137 int offset); 133 int offset);
138 134
139 private: 135 private:
140 // This gives BrowserAccessibility::Create access to the class constructor. 136 // This gives BrowserAccessibility::Create access to the class constructor.
141 friend class BrowserAccessibility; 137 friend class BrowserAccessibility;
142 138
143 BrowserAccessibilityAndroid(); 139 BrowserAccessibilityAndroid();
144 ~BrowserAccessibilityAndroid() override;
145 140
146 bool HasOnlyTextChildren() const; 141 bool HasOnlyTextChildren() const;
147 bool HasOnlyTextAndImageChildren() const; 142 bool HasOnlyTextAndImageChildren() const;
148 bool IsIframe() const; 143 bool IsIframe() const;
149 144
150 void NotifyLiveRegionUpdate(base::string16& aria_live); 145 void NotifyLiveRegionUpdate(base::string16& aria_live);
151 146
152 int CountChildrenWithRole(ui::AXRole role) const; 147 int CountChildrenWithRole(ui::AXRole role) const;
153 148
154 static size_t CommonPrefixLength(const base::string16 a, 149 static size_t CommonPrefixLength(const base::string16 a,
155 const base::string16 b); 150 const base::string16 b);
156 static size_t CommonSuffixLength(const base::string16 a, 151 static size_t CommonSuffixLength(const base::string16 a,
157 const base::string16 b); 152 const base::string16 b);
158 static size_t CommonEndLengths(const base::string16 a, 153 static size_t CommonEndLengths(const base::string16 a,
159 const base::string16 b); 154 const base::string16 b);
160 155
161 base::string16 cached_text_; 156 base::string16 cached_text_;
162 bool first_time_; 157 bool first_time_;
163 base::string16 old_value_; 158 base::string16 old_value_;
164 base::string16 new_value_; 159 base::string16 new_value_;
165 int32_t unique_id_;
166 160
167 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid); 161 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid);
168 }; 162 };
169 163
170 } // namespace content 164 } // namespace content
171 165
172 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ 166 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility.cc ('k') | content/browser/accessibility/browser_accessibility_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698