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

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

Issue 46013: Removes all use of COM and dependencies on Windows-specific classes (includin... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_BROWSER_ACCESSIBILITY_H_ 5 #ifndef CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_
6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ 6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 10
11 #include <oleacc.h> 11 #include <oleacc.h>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "webkit/glue/webaccessibility.h"
14 15
15 struct AccessibilityOutParams; 16 using webkit_glue::WebAccessibility;
16 17
17 //////////////////////////////////////////////////////////////////////////////// 18 ////////////////////////////////////////////////////////////////////////////////
18 // 19 //
19 // BrowserAccessibility 20 // BrowserAccessibility
20 // 21 //
21 // Class implementing the MSAA IAccessible COM interface for the 22 // Class implementing the MSAA IAccessible COM interface for the
22 // Browser-Renderer communication of MSAA information, providing accessibility 23 // Browser-Renderer communication of MSAA information, providing accessibility
23 // to be used by screen readers and other assistive technology (AT). 24 // to be used by screen readers and other assistive technology (AT).
24 // 25 //
25 //////////////////////////////////////////////////////////////////////////////// 26 ////////////////////////////////////////////////////////////////////////////////
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 VARIANT EmptyVariant() const { 127 VARIANT EmptyVariant() const {
127 VARIANT empty; 128 VARIANT empty;
128 empty.vt = VT_EMPTY; 129 empty.vt = VT_EMPTY;
129 return empty; 130 return empty;
130 } 131 }
131 132
132 // Wrapper functions, calling through to singleton instance of 133 // Wrapper functions, calling through to singleton instance of
133 // BrowserAccessibilityManager. 134 // BrowserAccessibilityManager.
134 135
135 // Creates an instance of BrowserAccessibility, initializes it and sets the 136 // Creates an instance of BrowserAccessibility, initializes it and sets the
136 // |iaccessible_id| and |parent_id|. 137 // [iaccessible_id] and [parent_id].
137 STDMETHODIMP CreateInstance(REFIID iid, 138 STDMETHODIMP CreateInstance(REFIID iid,
138 int iaccessible_id, 139 int iaccessible_id,
139 void** interface_ptr); 140 void** interface_ptr);
140 141
141 // Composes and sends a message for requesting needed accessibility 142 // Composes and sends a message for requesting needed accessibility
142 // information. Unused LONG input parameters should be NULL, and the VARIANT 143 // information. Unused LONG input parameters should be NULL, and the VARIANT
143 // an empty, valid instance. 144 // an empty, valid instance.
144 bool RequestAccessibilityInfo(int iaccessible_func_id, 145 bool RequestAccessibilityInfo(int iaccessible_func_id,
145 VARIANT var_id, 146 VARIANT var_id,
146 LONG input1, LONG input2); 147 LONG input1, LONG input2);
147 148
148 // Accessors. 149 // Accessors.
149 const AccessibilityOutParams& response(); 150 const WebAccessibility::OutParams& response();
150 HWND parent_hwnd(); 151 HWND parent_hwnd();
151 152
153 // Returns a conversion from the BrowserAccessibilityRole (as defined in
154 // webkit/glue/webaccessibility.h) to an MSAA role.
155 long MSAARole(long browser_accessibility_role);
156
157 // Returns a conversion from the BrowserAccessibilityState (as defined in
158 // webkit/glue/webaccessibility.h) to MSAA states set.
159 long MSAAState(long browser_accessibility_state);
160
152 // Id to uniquely distinguish this instance in the render-side caching, 161 // Id to uniquely distinguish this instance in the render-side caching,
153 // mapping it to the correct IAccessible on that side. Initialized to -1. 162 // mapping it to the correct IAccessible on that side. Initialized to -1.
154 int iaccessible_id_; 163 int iaccessible_id_;
155 164
156 // The unique id of this IAccessible instance. Used to help 165 // The unique id of this IAccessible instance. Used to help
157 // BrowserAccessibilityManager instance retrieve the correct member 166 // BrowserAccessibilityManager instance retrieve the correct member
158 // variables for this process. 167 // variables for this process.
159 int instance_id_; 168 int instance_id_;
160 169
161 // The instance should only be active if there is a non-terminated 170 // The instance should only be active if there is a non-terminated
162 // RenderProcessHost associated with it. The BrowserAccessibilityManager keeps 171 // RenderProcessHost associated with it. The BrowserAccessibilityManager keeps
163 // track of this state, and sets it to false to disable all calls into the 172 // track of this state, and sets it to false to disable all calls into the
164 // renderer from this instance of BroweserAccessibility, and have all 173 // renderer from this instance of BroweserAccessibility, and have all
165 // IAccessible functions return E_FAIL. 174 // IAccessible functions return E_FAIL.
166 bool instance_active_; 175 bool instance_active_;
167 176
168 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); 177 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility);
169 }; 178 };
170 #endif // CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ 179 #endif // CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_accessibility.cc » ('j') | webkit/glue/webaccessibilitymanager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698