summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
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