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

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

Issue 2422773002: Improve Android accessible hit testing. (Closed)
Patch Set: Clarify that it can return |this| Created 4 years, 2 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
(...skipping 30 matching lines...) Expand all
41 bool IsHierarchical() const; 41 bool IsHierarchical() const;
42 bool IsLink() const; 42 bool IsLink() const;
43 bool IsMultiLine() const; 43 bool IsMultiLine() const;
44 bool IsPassword() const; 44 bool IsPassword() const;
45 bool IsRangeType() const; 45 bool IsRangeType() const;
46 bool IsScrollable() const; 46 bool IsScrollable() const;
47 bool IsSelected() const; 47 bool IsSelected() const;
48 bool IsSlider() const; 48 bool IsSlider() const;
49 bool IsVisibleToUser() const; 49 bool IsVisibleToUser() const;
50 50
51 // This returns true for all nodes that we should navigate to.
52 // Nodes that have a generic role, no accessible name, and aren't
53 // focusable or clickable aren't interesting.
54 bool IsInterestingOnAndroid() const;
55
56 // If this node is interesting (IsInterestingOnAndroid() returns true),
57 // returns |this|. If not, it recursively checks all of the
58 // platform children of this node, and if just a single one is
59 // interesting, returns that one. If no descendants are interesting, or
60 // if more than one is interesting, returns nullptr.
61 const BrowserAccessibilityAndroid* GetSoleInterestingNodeFromSubtree() const;
62
51 bool CanOpenPopup() const; 63 bool CanOpenPopup() const;
52 64
53 bool HasFocusableChild() const; 65 bool HasFocusableChild() const;
54 bool HasNonEmptyValue() const; 66 bool HasNonEmptyValue() const;
55 67
56 const char* GetClassName() const; 68 const char* GetClassName() const;
57 base::string16 GetText() const override; 69 base::string16 GetText() const override;
58 70
59 base::string16 GetRoleDescription() const; 71 base::string16 GetRoleDescription() const;
60 72
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 bool first_time_; 157 bool first_time_;
146 base::string16 old_value_; 158 base::string16 old_value_;
147 base::string16 new_value_; 159 base::string16 new_value_;
148 160
149 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid); 161 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid);
150 }; 162 };
151 163
152 } // namespace content 164 } // namespace content
153 165
154 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ 166 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698