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

Unified Diff: chrome/browser/accessibility_events.h

Issue 1585011: Add menu and menu item events to the accessibility extension api, and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/accessibility_events.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/accessibility_events.h
===================================================================
--- chrome/browser/accessibility_events.h (revision 43705)
+++ chrome/browser/accessibility_events.h (working copy)
@@ -238,4 +238,38 @@
int item_count_;
};
+// Accessibility information about a menu; this class is used by
+// onMenuOpened, onMenuClosed, and onControlFocused event listeners.
+class AccessibilityMenuInfo : public AccessibilityControlInfo {
+ public:
+ AccessibilityMenuInfo(Profile* profile, std::string menu_name)
+ : AccessibilityControlInfo(profile, menu_name) { }
+
+ virtual void SerializeToDict(DictionaryValue *dict) const;
+};
+
+// Accessibility information about a menu item; this class is used by
+// onControlFocused event listeners.
+class AccessibilityMenuItemInfo : public AccessibilityControlInfo {
+ public:
+ AccessibilityMenuItemInfo(Profile* profile,
+ std::string name,
+ bool has_submenu,
+ int item_index,
+ int item_count)
+ : AccessibilityControlInfo(profile, name),
+ has_submenu_(has_submenu),
+ item_index_(item_index),
+ item_count_(item_count) {
+ }
+
+ virtual void SerializeToDict(DictionaryValue *dict) const;
+
+ private:
+ bool has_submenu_;
+ // The 0-based index of the current item and the number of total items.
+ int item_index_;
+ int item_count_;
+};
+
#endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_
« no previous file with comments | « no previous file | chrome/browser/accessibility_events.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698