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

Unified Diff: chrome/common/extensions/api/extension_api.json

Issue 402099: Add an accessibility API for events raised outside of the web content. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 11 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/common/accessibility_events.cc ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_api.json
===================================================================
--- chrome/common/extensions/api/extension_api.json (revision 37511)
+++ chrome/common/extensions/api/extension_api.json (working copy)
@@ -203,6 +203,183 @@
]
},
{
+ "namespace": "experimental.accessibility",
+ "types": [
+ {
+ "id": "AccessibilityObject",
+ "type": "object",
+ "description": "Parent class for accessibility information about an object.",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "The type of this object, which determines the contents of 'details'.",
+ "enum": ["button", "checkbox", "combobox", "link", "radiobutton", "tab", "textbox", "window"]
+ },
+ "name": {
+ "type": "string",
+ "description": "The localized name of the object, like OK or Password. Do not rely on an exact string match because the text will be in the user's language and may change in the future."
+ },
+ "details": {
+ "description": "Other details like the state, depending on the type of object.",
+ "optional": true,
+ "choices": [
+ { "$ref": "CheckboxDetails" },
+ { "$ref": "ComboBoxDetails" },
+ { "$ref": "RadioButtonDetails" },
+ { "$ref": "TabDetails" },
+ { "$ref": "TextBoxDetails" }
+ ]
+ }
+ }
+ },
+ {
+ "id": "CheckboxDetails",
+ "type": "object",
+ "description": "Information about the state of a checkbox.",
+ "properties": {
+ "isChecked": {"type": "boolean", "description": "True if this checkbox is checked."}
+ }
+ },
+ {
+ "id": "ComboBoxDetails",
+ "type": "object",
+ "description": "Information about the state of a combo box.",
+ "properties": {
+ "value": {"type": "string", "description": "The value of the combo box."},
+ "itemCount": {"type": "integer", "description": "The number of items in the combo box's list."},
+ "itemIndex": {"type": "integer", "description": "The 0-based index of the current value, or -1 if the user entered a value not from the list."}
+ }
+ },
+ {
+ "id": "RadioButtonDetails",
+ "type": "object",
+ "description": "Information about the state of a radio button.",
+ "properties": {
+ "isChecked": {"type": "boolean", "description": "True if this radio button is checked."},
+ "itemCount": {"type": "integer", "description": "The number of radio buttons in this group."},
+ "itemIndex": {"type": "integer", "description": "The 0-based index of this radio button in this group."}
+ }
+ },
+ {
+ "id": "TabDetails",
+ "type": "object",
+ "description": "Additional accessibility information about a tab.",
+ "properties": {
+ "itemCount": {"type": "integer", "description": "The number of tabs in this group."},
+ "itemIndex": {"type": "integer", "description": "The 0-based index of this tab in this group."}
+ }
+ },
+ {
+ "id": "TextBoxDetails",
+ "type": "object",
+ "description": "Information about the state of a text box.",
+ "properties": {
+ "value": {"type": "string", "description": "The value of the text box - the entered text."},
+ "isPassword": {"type": "boolean", "description": "True if this control contains password text whose contents should be obscured."},
+ "selectionStart": {"type": "integer", "description": "The index of the character where the selection starts, if this control contains editable text."},
+ "selectionEnd": {"type": "integer", "description": "The index of the character where the selection ends, if this control contains editable text."}
+ }
+ }
+ ],
+ "functions": [
+ {
+ "name": "setAccessibilityEnabled",
+ "type": "function",
+ "description": "Enable or disable the accessibility extension api. This must be set to true before event listeners or getFocusedControl will work.",
+ "parameters": [
+ {
+ "type": "boolean",
+ "name": "enabled",
+ "description": "True if accessibility support should be enabled."
+ }
+ ]
+ },
+ {
+ "name": "getFocusedControl",
+ "type": "function",
+ "description": "Get information about the currently focused control.",
+ "parameters": [
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "control",
+ "description": "Details of the currently focused control, or null if nothing is focused.",
+ "choices": [
+ { "$ref": "AccessibilityObject" },
+ { "type": "null" }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "onWindowOpened",
+ "type": "function",
+ "description": "Fired when a window is opened.",
+ "parameters": [
+ {
+ "$ref": "AccessibilityObject",
+ "name": "window",
+ "description": "Information about the window that was opened."
+ }
+ ]
+ },
+ {
+ "name": "onWindowClosed",
+ "type": "function",
+ "description": "Fired when a window is closed.",
+ "parameters": [
+ {
+ "$ref": "AccessibilityObject",
+ "name": "window",
+ "description": "Information about the window that was closed."
+ }
+ ]
+ },
+ {
+ "name": "onControlFocused",
+ "type": "function",
+ "description": "Fired when a control is focused.",
+ "parameters": [
+ {
+ "$ref": "AccessibilityObject",
+ "name": "control",
+ "description": "Details of the control that was focused."
+ }
+ ]
+ },
+ {
+ "name": "onControlAction",
+ "type": "function",
+ "description": "Fired when a control's action is taken, like pressing a button or toggling a checkbox.",
+ "parameters": [
+ {
+ "$ref": "AccessibilityObject",
+ "name": "control",
+ "description": "Details of the control whose action was taken."
+ }
+ ]
+ },
+ {
+ "name": "onTextChanged",
+ "type": "function",
+ "description": "Fired when text changes in an editable text control.",
+ "parameters": [
+ {
+ "$ref": "AccessibilityObject",
+ "name": "control",
+ "description": "Details of the control where the text changed."
+ }
+ ]
+ }
+ ]
+ },
+ {
"namespace": "experimental.extension",
"nodoc": true,
"types": [],
« no previous file with comments | « chrome/common/accessibility_events.cc ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698