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

Unified Diff: chrome/browser/browser_accessibility_manager.h

Issue 2121004: Windows accessibility improvements: 1. All WebKit roles are now passed to the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_accessibility.cc ('k') | chrome/browser/browser_accessibility_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_accessibility_manager.h
===================================================================
--- chrome/browser/browser_accessibility_manager.h (revision 47913)
+++ chrome/browser/browser_accessibility_manager.h (working copy)
@@ -29,12 +29,21 @@
virtual BrowserAccessibility* Create();
};
+// Class that can perform actions on behalf of the BrowserAccessibilityManager.
+class BrowserAccessibilityDelegate {
+ public:
+ virtual ~BrowserAccessibilityDelegate() {}
+ virtual void SetAccessibilityFocus(int acc_obj_id) = 0;
+ virtual void AccessibilityDoDefaultAction(int acc_obj_id) = 0;
+};
+
// Manages a tree of BrowserAccessibility objects.
class BrowserAccessibilityManager {
public:
BrowserAccessibilityManager(
HWND parent_hwnd,
const webkit_glue::WebAccessibility& src,
+ BrowserAccessibilityDelegate* delegate,
BrowserAccessibilityFactory* factory = new BrowserAccessibilityFactory());
virtual ~BrowserAccessibilityManager();
@@ -57,6 +66,12 @@
// given root (inclusive). Does not make a new reference.
BrowserAccessibility* GetFocus(BrowserAccessibility* root);
+ // Tell the renderer to set focus to this node.
+ void SetFocus(const BrowserAccessibility& node);
+
+ // Tell the renderer to do the default action for this node.
+ void DoDefaultAction(const BrowserAccessibility& node);
+
// Called when the renderer process has notified us of a focus or state
// change. Send a notification to MSAA clients of the change.
void OnAccessibilityFocusChange(int acc_obj_id);
@@ -73,6 +88,9 @@
// The parent window.
HWND parent_hwnd_;
+ // The object that can perform actions on our behalf.
+ BrowserAccessibilityDelegate* delegate_;
+
// Factory to create BrowserAccessibility objects (for dependency injection).
scoped_ptr<BrowserAccessibilityFactory> factory_;
« no previous file with comments | « chrome/browser/browser_accessibility.cc ('k') | chrome/browser/browser_accessibility_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698