Index: extensions/common/api/virtual_keyboard_private.json |
diff --git a/extensions/common/api/virtual_keyboard_private.json b/extensions/common/api/virtual_keyboard_private.json |
index 6bce48c778dfca13684ac2288c94cc5312f75cf6..d79e76a5984e1a4f6191b7928321823ce30c4a29 100644 |
--- a/extensions/common/api/virtual_keyboard_private.json |
+++ b/extensions/common/api/virtual_keyboard_private.json |
@@ -12,16 +12,34 @@ |
"description": "none", |
"types": [ |
{ |
+ "id": "VirtualKeyboardEventType", |
+ "type": "string", |
+ "description": "One of keyup or keydown.", |
+ "enum": ["keyup", "keydown"] |
+ }, |
+ { |
"id": "VirtualKeyboardEvent", |
"type": "object", |
"properties": { |
- "type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]}, |
+ "type": {"$ref": "VirtualKeyboardEventType"}, |
"charValue": {"type": "integer", "description": "Unicode value of the key."}, |
"keyCode": {"type": "integer", "description": "Virtual key code, which is independent of the keyboard layout or modifier state."}, |
"keyName": {"type": "string", "description": "Name of the key, which is independent of modifier state."}, |
"modifiers": {"type": "integer", "optional": true, "description": "Flag for modifiers that are active. None = 0, Shift = 2, Control = 4, Alt = 8."} |
} |
- } |
+ }, |
+ { |
+ "id": "KeyboardMode", |
+ "type": "string", |
+ "enum": [ "FULL_WIDTH", "FLOATING" ], |
+ "description": "The value of the virtual keyboard mode to set to." |
+ }, |
+ { |
+ "id": "OnTextInputBoxFocusedType", |
+ "type": "string", |
+ "description": "The value of type attribute of the focused text input box.", |
+ "enum": ["text", "number", "password", "date", "url", "tel", "email"] |
+ } |
], |
"functions": [ |
{ |
@@ -168,8 +186,7 @@ |
"description": "Sets the virtual keyboard mode.", |
"parameters": [ |
{ |
- "type": "string", |
- "enum": [ "FULL_WIDTH", "FLOATING" ], |
+ "$ref": "KeyboardMode", |
"name": "mode", |
"description": "The value of the virtual keyboard mode to set to." |
} |
@@ -189,9 +206,8 @@ |
"description": "Describes the text input box that has acquired focus. Note only the type of text input box is passed. This API is intended to be used by non-ime virtual keyboard only. Normal ime virtual keyboard should use chrome.input.ime.onFocus to get the more detailed InputContext.", |
"properties": { |
"type": { |
- "type": "string", |
- "description": "The value of type attribute of the focused text input box.", |
- "enum": ["text", "number", "password", "date", "url", "tel", "email"] |
+ "$ref": "OnTextInputBoxFocusedType", |
+ "description": "The value of type attribute of the focused text input box." |
} |
} |
} |