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

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

Issue 1128183010: ATK accessibility support for web content on Aura Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nits Created 5 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "base/strings/string_split.h" 14 #include "base/strings/string_split.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "third_party/WebKit/public/web/WebAXEnums.h" 17 #include "third_party/WebKit/public/web/WebAXEnums.h"
18 #include "ui/accessibility/ax_node.h" 18 #include "ui/accessibility/ax_node.h"
19 #include "ui/accessibility/ax_node_data.h" 19 #include "ui/accessibility/ax_node_data.h"
20 #include "ui/accessibility/ax_text_utils.h" 20 #include "ui/accessibility/ax_text_utils.h"
21 21
22 #if defined(OS_MACOSX) && __OBJC__ 22 #if defined(OS_MACOSX) && __OBJC__
23 @class BrowserAccessibilityCocoa; 23 @class BrowserAccessibilityCocoa;
24 #endif 24 #endif
25 25
26 namespace content { 26 namespace content {
27 class BrowserAccessibilityManager; 27 class BrowserAccessibilityManager;
28 #if defined(OS_WIN) 28 #if defined(OS_WIN)
29 class BrowserAccessibilityWin; 29 class BrowserAccessibilityWin;
30 #elif defined(OS_LINUX)
31 class BrowserAccessibilityAuraLinux;
30 #endif 32 #endif
31 33
32 //////////////////////////////////////////////////////////////////////////////// 34 ////////////////////////////////////////////////////////////////////////////////
33 // 35 //
34 // BrowserAccessibility 36 // BrowserAccessibility
35 // 37 //
36 // A BrowserAccessibility object represents one node in the accessibility 38 // A BrowserAccessibility object represents one node in the accessibility
37 // tree on the browser side. It exactly corresponds to one WebAXObject from 39 // tree on the browser side. It exactly corresponds to one WebAXObject from
38 // Blink. It's owned by a BrowserAccessibilityManager. 40 // Blink. It's owned by a BrowserAccessibilityManager.
39 // 41 //
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 178
177 // Returns true if this is a native platform-specific object, vs a 179 // Returns true if this is a native platform-specific object, vs a
178 // cross-platform generic object. Don't call ToBrowserAccessibilityXXX if 180 // cross-platform generic object. Don't call ToBrowserAccessibilityXXX if
179 // IsNative returns false. 181 // IsNative returns false.
180 virtual bool IsNative() const; 182 virtual bool IsNative() const;
181 183
182 #if defined(OS_MACOSX) && __OBJC__ 184 #if defined(OS_MACOSX) && __OBJC__
183 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa(); 185 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa();
184 #elif defined(OS_WIN) 186 #elif defined(OS_WIN)
185 BrowserAccessibilityWin* ToBrowserAccessibilityWin(); 187 BrowserAccessibilityWin* ToBrowserAccessibilityWin();
188 #elif defined(OS_LINUX)
dmazzoni 2015/05/22 22:25:32 Need to exclude OS_CHROMEOS here
189 BrowserAccessibilityAuraLinux* ToBrowserAccessibilityAuraLinux();
186 #endif 190 #endif
187 191
188 // Accessing accessibility attributes: 192 // Accessing accessibility attributes:
189 // 193 //
190 // There are dozens of possible attributes for an accessibility node, 194 // There are dozens of possible attributes for an accessibility node,
191 // but only a few tend to apply to any one object, so we store them 195 // but only a few tend to apply to any one object, so we store them
192 // in sparse arrays of <attribute id, attribute value> pairs, organized 196 // in sparse arrays of <attribute id, attribute value> pairs, organized
193 // by type (bool, int, float, string, int list). 197 // by type (bool, int, float, string, int list).
194 // 198 //
195 // There are three accessors for each type of attribute: one that returns 199 // There are three accessors for each type of attribute: one that returns
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // its nearest scrollable ancestor) to local bounds (which are relative 289 // its nearest scrollable ancestor) to local bounds (which are relative
286 // to the top of the web accessibility tree). 290 // to the top of the web accessibility tree).
287 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const; 291 gfx::Rect ElementBoundsToLocalBounds(gfx::Rect bounds) const;
288 292
289 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 293 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
290 }; 294 };
291 295
292 } // namespace content 296 } // namespace content
293 297
294 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 298 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698