| Index: chrome/common/extensions/api/input_ime.json
|
| diff --git a/chrome/common/extensions/api/input_ime.json b/chrome/common/extensions/api/input_ime.json
|
| index cc186dc0b6d89ce102030646cc7ef821e8a73ccf..cb41d2934f73c2121dccb8d7d40d1188836eeb5a 100644
|
| --- a/chrome/common/extensions/api/input_ime.json
|
| +++ b/chrome/common/extensions/api/input_ime.json
|
| @@ -8,11 +8,16 @@
|
| "description": "Use the <code>chrome.input.ime</code> API to implement a custom IME for Chrome OS. This allows your extension to handle keystrokes, set the composition, and manage the candidate window.",
|
| "types": [
|
| {
|
| + "id": "KeyboardEventType",
|
| + "type": "string",
|
| + "enum": ["keyup", "keydown"]
|
| + },
|
| + {
|
| "id": "KeyboardEvent",
|
| "type": "object",
|
| "description": "See http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent",
|
| "properties": {
|
| - "type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]},
|
| + "type": {"$ref": "KeyboardEventType", "description": "One of keyup or keydown."},
|
| "requestId": {"type": "string", "description": "The ID of the request."},
|
| "extensionId": {"type": "string", "optional": true, "description": "The extension ID of the sender of this keyevent."},
|
| "key": {"type": "string", "description": "Value of the key being pressed"},
|
| @@ -25,18 +30,30 @@
|
| }
|
| },
|
| {
|
| + "id": "InputContextType",
|
| + "type": "string",
|
| + "description": "Type of value this text field edits, (Text, Number, URL, etc)",
|
| + "enum": ["text", "search", "tel", "url", "email", "number", "password"]
|
| + },
|
| + {
|
| "id": "InputContext",
|
| "type": "object",
|
| "description": "Describes an input Context",
|
| "properties": {
|
| "contextID": {"type": "integer", "description": "This is used to specify targets of text field operations. This ID becomes invalid as soon as onBlur is called."},
|
| - "type": {"type": "string", "description": "Type of value this text field edits, (Text, Number, URL, etc)", "enum": ["text", "search", "tel", "url", "email", "number", "password"]},
|
| + "type": {"$ref": "InputContextType", "description": "Type of value this text field edits, (Text, Number, URL, etc)"},
|
| "autoCorrect": {"type": "boolean", "description": "Whether the text field wants auto-correct."},
|
| "autoComplete": {"type": "boolean", "description": "Whether the text field wants auto-complete."},
|
| "spellCheck": {"type": "boolean", "description": "Whether the text field wants spell-check."}
|
| }
|
| },
|
| {
|
| + "id": "MenuItemStyle",
|
| + "type": "string",
|
| + "description": "The type of menu item. Radio buttons between separators are considered grouped.",
|
| + "enum": ["check", "radio", "separator"]
|
| + },
|
| + {
|
| "id": "MenuItem",
|
| "type": "object",
|
| "description": "A menu item used by an input method to interact with the user from the language menu.",
|
| @@ -44,15 +61,43 @@
|
| "id": {"type": "string", "description": "String that will be passed to callbacks referencing this MenuItem."},
|
| "label": {"type": "string", "optional": true, "description": "Text displayed in the menu for this item."},
|
| "style": {
|
| - "type": "string",
|
| + "$ref": "MenuItemStyle",
|
| "optional": true,
|
| - "description": "Enum representing if this item is: check, radio, or a separator. Radio buttons between separators are considered grouped.",
|
| - "enum": ["check", "radio", "separator"]
|
| + "description": "The type of menu item."
|
| },
|
| "visible": {"type": "boolean", "optional": true, "description": "Indicates this item is visible."},
|
| "checked": {"type": "boolean", "optional": true, "description": "Indicates this item should be drawn with a check."},
|
| "enabled": {"type": "boolean", "optional": true, "description": "Indicates this item is enabled."}
|
| }
|
| + },
|
| + {
|
| + "id": "UnderlineStyle",
|
| + "type": "string",
|
| + "description": "The type of the underline to modify this segment.",
|
| + "enum": ["underline", "doubleUnderline", "noUnderline"]
|
| + },
|
| + {
|
| + "id": "WindowPosition",
|
| + "type": "string",
|
| + "description": "Where to display the candidate window. If set to 'cursor', the window follows the cursor. If set to 'composition', the window is locked to the beginning of the composition.",
|
| + "enum": ["cursor", "composition"]
|
| + },
|
| + {
|
| + "id": "ScreenType",
|
| + "type": "string",
|
| + "enum": ["normal", "login", "lock", "secondary-login"],
|
| + "description": "The screen type under which the IME is activated."
|
| + },
|
| + {
|
| + "id": "CallbackStyle",
|
| + "type": "string",
|
| + "enum": ["async"]
|
| + },
|
| + {
|
| + "id": "MouseButton",
|
| + "type": "string",
|
| + "description": "Which mouse buttons was clicked.",
|
| + "enum": ["left", "middle", "right"]
|
| }
|
| ],
|
| "functions": [
|
| @@ -103,9 +148,8 @@
|
| "type": "integer"
|
| },
|
| "style": {
|
| - "description": "The type of the underline to modify this segment.",
|
| - "enum": ["underline", "doubleUnderline", "noUnderline"],
|
| - "type": "string"
|
| + "$ref": "UnderlineStyle",
|
| + "description": "The type of the underline to modify this segment."
|
| }
|
| }
|
| }
|
| @@ -272,9 +316,8 @@
|
| "description": "True to display the auxiliary text, false to hide it."
|
| },
|
| "windowPosition": {
|
| - "type": "string",
|
| - "description": "Where to display the candidate window. If set to 'cursor', the window follows the cursor. If set to 'composition', the window is locked to the beginning of the composition.",
|
| - "enum": ["cursor", "composition"],
|
| + "$ref": "WindowPosition",
|
| + "description": "Where to display the candidate window.",
|
| "optional": true
|
| }
|
| }
|
| @@ -501,9 +544,8 @@
|
| "description": "ID of the engine receiving the event"
|
| },
|
| {
|
| - "type": "string",
|
| "name": "screen",
|
| - "enum": ["normal", "login", "lock", "secondary-login"],
|
| + "$ref": "ScreenType",
|
| "description": "The screen type under which the IME is activated."
|
| }
|
| ]
|
| @@ -585,8 +627,7 @@
|
| "name": "extraInfoSpec",
|
| "description": "Array of extra information that specifies how the callback is invoked.",
|
| "items": {
|
| - "type": "string",
|
| - "enum": ["async"]
|
| + "$ref": "CallbackStyle"
|
| }
|
| }
|
| ],
|
| @@ -612,10 +653,9 @@
|
| "description": "ID of the candidate that was clicked."
|
| },
|
| {
|
| - "type": "string",
|
| "name": "button",
|
| - "description": "Which mouse buttons was clicked.",
|
| - "enum": ["left", "middle", "right"]
|
| + "$ref": "MouseButton",
|
| + "description": "Which mouse buttons was clicked."
|
| }
|
| ]
|
| },
|
|
|