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

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

Issue 9839069: Add initial GTK web accessibility framework. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/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) 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "webkit/glue/webaccessibility.h" 16 #include "webkit/glue/webaccessibility.h"
17 17
18 class BrowserAccessibilityManager; 18 class BrowserAccessibilityManager;
19 #if defined(OS_MACOSX) && __OBJC__ 19 #if defined(OS_MACOSX) && __OBJC__
20 @class BrowserAccessibilityCocoa; 20 @class BrowserAccessibilityCocoa;
21 #elif defined(OS_WIN) 21 #elif defined(OS_WIN)
22 class BrowserAccessibilityWin; 22 class BrowserAccessibilityWin;
23 #elif defined(TOOLKIT_GTK)
24 class BrowserAccessibilityGtk;
23 #endif 25 #endif
24 26
25 using webkit_glue::WebAccessibility; 27 using webkit_glue::WebAccessibility;
26 typedef std::map<WebAccessibility::BoolAttribute, bool> BoolAttrMap; 28 typedef std::map<WebAccessibility::BoolAttribute, bool> BoolAttrMap;
27 typedef std::map<WebAccessibility::FloatAttribute, float> FloatAttrMap; 29 typedef std::map<WebAccessibility::FloatAttribute, float> FloatAttrMap;
28 typedef std::map<WebAccessibility::IntAttribute, int> IntAttrMap; 30 typedef std::map<WebAccessibility::IntAttribute, int> IntAttrMap;
29 typedef std::map<WebAccessibility::StringAttribute, string16> StringAttrMap; 31 typedef std::map<WebAccessibility::StringAttribute, string16> StringAttrMap;
30 32
31 //////////////////////////////////////////////////////////////////////////////// 33 ////////////////////////////////////////////////////////////////////////////////
32 // 34 //
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const string16& name() const { return name_; } 183 const string16& name() const { return name_; }
182 int32 renderer_id() const { return renderer_id_; } 184 int32 renderer_id() const { return renderer_id_; }
183 int32 role() const { return role_; } 185 int32 role() const { return role_; }
184 const string16& role_name() const { return role_name_; } 186 const string16& role_name() const { return role_name_; }
185 int32 state() const { return state_; } 187 int32 state() const { return state_; }
186 const string16& value() const { return value_; } 188 const string16& value() const { return value_; }
187 bool instance_active() const { return instance_active_; } 189 bool instance_active() const { return instance_active_; }
188 int32 ref_count() const { return ref_count_; } 190 int32 ref_count() const { return ref_count_; }
189 191
190 #if defined(OS_MACOSX) && __OBJC__ 192 #if defined(OS_MACOSX) && __OBJC__
191 BrowserAccessibilityCocoa* toBrowserAccessibilityCocoa(); 193 BrowserAccessibilityCocoa* ToBrowserAccessibilityCocoa();
192 #elif defined(OS_WIN) 194 #elif defined(OS_WIN)
193 BrowserAccessibilityWin* toBrowserAccessibilityWin(); 195 BrowserAccessibilityWin* ToBrowserAccessibilityWin();
196 #elif defined(TOOLKIT_GTK)
197 BrowserAccessibilityGtk* ToBrowserAccessibilityGtk();
194 #endif 198 #endif
195 199
196 // Retrieve the value of a bool attribute from the bool attribute 200 // Retrieve the value of a bool attribute from the bool attribute
197 // map and returns true if found. 201 // map and returns true if found.
198 bool GetBoolAttribute(WebAccessibility::BoolAttribute attr, bool* value) 202 bool GetBoolAttribute(WebAccessibility::BoolAttribute attr, bool* value)
199 const; 203 const;
200 204
201 // Retrieve the value of a float attribute from the float attribute 205 // Retrieve the value of a float attribute from the float attribute
202 // map and returns true if found. 206 // map and returns true if found.
203 bool GetFloatAttribute(WebAccessibility::FloatAttribute attr, float* value) 207 bool GetFloatAttribute(WebAccessibility::FloatAttribute attr, float* value)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 // tree, a client may still be holding onto a pointer to this object, so 299 // tree, a client may still be holding onto a pointer to this object, so
296 // we mark it as inactive so that calls to any of this object's methods 300 // we mark it as inactive so that calls to any of this object's methods
297 // immediately return failure. 301 // immediately return failure.
298 bool instance_active_; 302 bool instance_active_;
299 303
300 private: 304 private:
301 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 305 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
302 }; 306 };
303 307
304 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_ 308 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698