summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-06 13:46:24 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-06 13:46:24 +0000
commit83acf96f3a4632e4c962ebc3f0f84e3f989322df (patch)
tree1d56226dd349c3648a7675aef7e365556fe245fe /chrome/common
parente80bea9a23243ddf8f58c0358df8118159800b53 (diff)
downloadchromium_src-83acf96f3a4632e4c962ebc3f0f84e3f989322df.zip
chromium_src-83acf96f3a4632e4c962ebc3f0f84e3f989322df.tar.gz
chromium_src-83acf96f3a4632e4c962ebc3f0f84e3f989322df.tar.bz2
Add menu and menu item events to the accessibility extension api, and
generate menu item notifications for gtk menus. The code to generate menu open and close events is a little more complicated and will come in a future patch. BUG=none TEST=navigated menus with keyboard, watched notifications fire Review URL: http://codereview.chromium.org/1585011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rwxr-xr-xchrome/common/extensions/api/extension_api.json45
-rw-r--r--chrome/common/notification_type.h10
2 files changed, 54 insertions, 1 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index b554298..6512c6d 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -243,7 +243,7 @@
"type": {
"type": "string",
"description": "The type of this object, which determines the contents of 'details'.",
- "enum": ["button", "checkbox", "combobox", "link", "radiobutton", "tab", "textbox", "window"]
+ "enum": ["button", "checkbox", "combobox", "link", "menu", "menuitem", "radiobutton", "tab", "textbox", "window"]
},
"name": {
"type": "string",
@@ -255,6 +255,8 @@
"choices": [
{ "$ref": "CheckboxDetails" },
{ "$ref": "ComboBoxDetails" },
+ { "$ref": "MenuDetails" },
+ { "$ref": "MenuItemDetails" },
{ "$ref": "RadioButtonDetails" },
{ "$ref": "TabDetails" },
{ "$ref": "TextBoxDetails" }
@@ -291,6 +293,23 @@
}
},
{
+ "id": "MenuDetails",
+ "type": "object",
+ "description": "Information about the state of a drop-down menu.",
+ "properties": {
+ }
+ },
+ {
+ "id": "MenuItemDetails",
+ "type": "object",
+ "description": "Information about a menu item.",
+ "properties": {
+ "hasSubmenu": {"type": "boolean", "description": "True if this item opens a submenu."},
+ "itemCount": {"type": "integer", "description": "The number of items in the menu."},
+ "itemIndex": {"type": "integer", "description": "The 0-based index of this menu item."}
+ }
+ },
+ {
"id": "RadioButtonDetails",
"type": "object",
"description": "Information about the state of a radio button.",
@@ -416,6 +435,30 @@
"description": "Details of the control where the text changed."
}
]
+ },
+ {
+ "name": "onMenuOpened",
+ "type": "function",
+ "description": "Fired when a menu is opened.",
+ "parameters": [
+ {
+ "$ref": "AccessibilityObject",
+ "name": "menu",
+ "description": "Information about the menu that was opened."
+ }
+ ]
+ },
+ {
+ "name": "onMenuClosed",
+ "type": "function",
+ "description": "Fired when a menu is closed.",
+ "parameters": [
+ {
+ "$ref": "AccessibilityObject",
+ "name": "menu",
+ "description": "Information about the menu that was closed."
+ }
+ ]
}
]
},
diff --git a/chrome/common/notification_type.h b/chrome/common/notification_type.h
index 6bb7efb..ed37fa8 100644
--- a/chrome/common/notification_type.h
+++ b/chrome/common/notification_type.h
@@ -893,6 +893,16 @@ class NotificationType {
// Details will be an AccessibilityControlInfo.
ACCESSIBILITY_TEXT_CHANGED,
+ // Notification that a pop-down menu was opened, for propagating
+ // to an accessibility extension.
+ // Details will be an AccessibilityMenuInfo.
+ ACCESSIBILITY_MENU_OPENED,
+
+ // Notification that a pop-down menu was closed, for propagating
+ // to an accessibility extension.
+ // Details will be an AccessibilityMenuInfo.
+ ACCESSIBILITY_MENU_CLOSED,
+
// Content Settings --------------------------------------------------------
// Sent when content settings change. The source is a HostContentSettings