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

Unified Diff: extensions/common/api/virtual_keyboard_private.json

Issue 1055673002: [Extensions API] Remove inline enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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."
}
}
}

Powered by Google App Engine
This is Rietveld 408576698