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

Side by Side Diff: chrome/browser/accessibility/browser_accessibility.h

Issue 4292001: Add basic support for accessibility hit testing within web contents.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/accessibility/browser_accessibility.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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 5 #ifndef CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
6 #define CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 6 #define CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // Return the next sibling of this object, or NULL if it's the last child 84 // Return the next sibling of this object, or NULL if it's the last child
85 // of its parent. 85 // of its parent.
86 BrowserAccessibility* GetNextSibling(); 86 BrowserAccessibility* GetNextSibling();
87 87
88 // Replace a child object. Used when updating the accessibility tree. 88 // Replace a child object. Used when updating the accessibility tree.
89 void ReplaceChild( 89 void ReplaceChild(
90 const BrowserAccessibility* old_acc, 90 const BrowserAccessibility* old_acc,
91 BrowserAccessibility* new_acc); 91 BrowserAccessibility* new_acc);
92 92
93 // Returns the bounds of this object in screen coordinates.
94 gfx::Rect GetBoundsRect();
95
96 // Returns the deepest descendant that contains the specified point.
97 BrowserAccessibility* BrowserAccessibilityForPoint(const gfx::Point& point);
98
99 // Return true if this attribute is in the attributes map.
100 bool HasAttribute(WebAccessibility::Attribute attribute);
dmazzoni 2010/11/03 02:21:53 Should the Attribute methods maybe be protected in
Chris Guillory 2010/11/03 17:17:51 Done.
101
102 // Retrieve the string value of an attribute from the attribute map and
103 // returns true if found.
104 bool GetAttribute(WebAccessibility::Attribute attribute, string16* value);
105
106 // Retrieve the value of an attribute from the attribute map and
107 // if found and nonempty, try to convert it to an integer.
108 // Returns true only if both the attribute was found and it was successfully
109 // converted to an integer.
110 bool GetAttributeAsInt(
111 WebAccessibility::Attribute attribute, int* value_int);
112
93 // Accessors 113 // Accessors
94 int32 child_id() const { return child_id_; } 114 int32 child_id() const { return child_id_; }
95 const std::vector<BrowserAccessibility*>& children() const { 115 const std::vector<BrowserAccessibility*>& children() const {
96 return children_; 116 return children_;
97 } 117 }
98 int32 renderer_id() const { return renderer_id_; } 118 int32 renderer_id() const { return renderer_id_; }
99 int32 index_in_parent() const { return index_in_parent_; } 119 int32 index_in_parent() const { return index_in_parent_; }
100 WebKit::WebRect location() const { return location_; } 120 WebKit::WebRect location() const { return location_; }
101 121
102 #if defined(OS_MACOSX) 122 #if defined(OS_MACOSX)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 int32 role_; 155 int32 role_;
136 int32 state_; 156 int32 state_;
137 string16 role_name_; 157 string16 role_name_;
138 WebKit::WebRect location_; 158 WebKit::WebRect location_;
139 159
140 private: 160 private:
141 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 161 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
142 }; 162 };
143 163
144 #endif // CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 164 #endif // CHROME_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/accessibility/browser_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698