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

Side by Side Diff: ui/accessibility/platform/ax_platform_node_win.h

Issue 2806093002: Forward AXPlatformNodeWin calls to the right child. (Closed)
Patch Set: feedback from dmazzoni Created 3 years, 8 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
« no previous file with comments | « no previous file | ui/accessibility/platform/ax_platform_node_win.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ 5 #ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_
6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ 6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 #include <oleacc.h> 10 #include <oleacc.h>
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 REFIID riid, 266 REFIID riid,
267 void** object) override; 267 void** object) override;
268 268
269 protected: 269 protected:
270 AXPlatformNodeWin(); 270 AXPlatformNodeWin();
271 271
272 // AXPlatformNodeBase overrides. 272 // AXPlatformNodeBase overrides.
273 void Dispose() override; 273 void Dispose() override;
274 274
275 private: 275 private:
276 bool IsValidId(const VARIANT& child) const;
277 int MSAARole(); 276 int MSAARole();
278 int MSAAState(); 277 int MSAAState();
279 int MSAAEvent(ui::AXEvent event); 278 int MSAAEvent(ui::AXEvent event);
280 279
281 HRESULT GetStringAttributeAsBstr( 280 HRESULT GetStringAttributeAsBstr(
282 ui::AXStringAttribute attribute, 281 ui::AXStringAttribute attribute,
283 BSTR* value_bstr) const; 282 BSTR* value_bstr) const;
284 283
285 void AddAlertTarget(); 284 void AddAlertTarget();
286 void RemoveAlertTarget(); 285 void RemoveAlertTarget();
287 286
288 // Return the text to use for IAccessibleText. 287 // Return the text to use for IAccessibleText.
289 base::string16 TextForIAccessibleText(); 288 base::string16 TextForIAccessibleText();
290 289
291 // If offset is a member of IA2TextSpecialOffsets this function updates the 290 // If offset is a member of IA2TextSpecialOffsets this function updates the
292 // value of offset and returns, otherwise offset remains unchanged. 291 // value of offset and returns, otherwise offset remains unchanged.
293 void HandleSpecialTextOffset(LONG* offset); 292 void HandleSpecialTextOffset(LONG* offset);
294 293
295 // Convert from a IA2TextBoundaryType to a ui::TextBoundaryType. 294 // Convert from a IA2TextBoundaryType to a ui::TextBoundaryType.
296 ui::TextBoundaryType IA2TextBoundaryToTextBoundary(IA2TextBoundaryType type); 295 ui::TextBoundaryType IA2TextBoundaryToTextBoundary(IA2TextBoundaryType type);
297 296
298 // Search forwards (direction == 1) or backwards (direction == -1) 297 // Search forwards (direction == 1) or backwards (direction == -1)
299 // from the given offset until the given boundary is found, and 298 // from the given offset until the given boundary is found, and
300 // return the offset of that boundary. 299 // return the offset of that boundary.
301 LONG FindBoundary(const base::string16& text, 300 LONG FindBoundary(const base::string16& text,
302 IA2TextBoundaryType ia2_boundary, 301 IA2TextBoundaryType ia2_boundary,
303 LONG start_offset, 302 LONG start_offset,
304 ui::TextBoundaryDirection direction); 303 ui::TextBoundaryDirection direction);
304
305 // Many MSAA methods take a var_id parameter indicating that the operation
306 // should be performed on a particular child ID, rather than this object.
307 // This method tries to figure out the target object from |var_id| and
308 // returns a pointer to the target object if it exists, otherwise nullptr.
309 // Does not return a new reference.
310 AXPlatformNodeWin* GetTargetFromChildID(const VARIANT& var_id);
305 }; 311 };
306 312
307 } // namespace ui 313 } // namespace ui
308 314
309 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ 315 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | ui/accessibility/platform/ax_platform_node_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698