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

Side by Side 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, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "virtualKeyboardPrivate", 7 "namespace": "virtualKeyboardPrivate",
8 "compiler_options": { 8 "compiler_options": {
9 "implemented_in": "extensions/browser/api/virtual_keyboard_private/virtual _keyboard_private_api.h" 9 "implemented_in": "extensions/browser/api/virtual_keyboard_private/virtual _keyboard_private_api.h"
10 }, 10 },
11 "platforms": ["chromeos"], 11 "platforms": ["chromeos"],
12 "description": "none", 12 "description": "none",
13 "types": [ 13 "types": [
14 { 14 {
15 "id": "VirtualKeyboardEventType",
16 "type": "string",
17 "description": "One of keyup or keydown.",
18 "enum": ["keyup", "keydown"]
19 },
20 {
15 "id": "VirtualKeyboardEvent", 21 "id": "VirtualKeyboardEvent",
16 "type": "object", 22 "type": "object",
17 "properties": { 23 "properties": {
18 "type": {"type": "string", "description": "One of keyup or keydown.", "enum": ["keyup", "keydown"]}, 24 "type": {"$ref": "VirtualKeyboardEventType"},
19 "charValue": {"type": "integer", "description": "Unicode value of the key."}, 25 "charValue": {"type": "integer", "description": "Unicode value of the key."},
20 "keyCode": {"type": "integer", "description": "Virtual key code, which is independent of the keyboard layout or modifier state."}, 26 "keyCode": {"type": "integer", "description": "Virtual key code, which is independent of the keyboard layout or modifier state."},
21 "keyName": {"type": "string", "description": "Name of the key, which i s independent of modifier state."}, 27 "keyName": {"type": "string", "description": "Name of the key, which i s independent of modifier state."},
22 "modifiers": {"type": "integer", "optional": true, "description": "Fla g for modifiers that are active. None = 0, Shift = 2, Control = 4, Alt = 8."} 28 "modifiers": {"type": "integer", "optional": true, "description": "Fla g for modifiers that are active. None = 0, Shift = 2, Control = 4, Alt = 8."}
23 } 29 }
24 } 30 },
31 {
32 "id": "KeyboardMode",
33 "type": "string",
34 "enum": [ "FULL_WIDTH", "FLOATING" ],
35 "description": "The value of the virtual keyboard mode to set to."
36 },
37 {
38 "id": "OnTextInputBoxFocusedType",
39 "type": "string",
40 "description": "The value of type attribute of the focused text input bo x.",
41 "enum": ["text", "number", "password", "date", "url", "tel", "email"]
42 }
25 ], 43 ],
26 "functions": [ 44 "functions": [
27 { 45 {
28 "name": "insertText", 46 "name": "insertText",
29 "type": "function", 47 "type": "function",
30 "description": "Inserts text into the currently focused text field.", 48 "description": "Inserts text into the currently focused text field.",
31 "parameters": [ 49 "parameters": [
32 { "name": "text", 50 { "name": "text",
33 "type": "string", 51 "type": "string",
34 "description": "The text that will be inserted." 52 "description": "The text that will be inserted."
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 "description": "Opens chrome://settings/languages page.", 179 "description": "Opens chrome://settings/languages page.",
162 "parameters": [ 180 "parameters": [
163 ] 181 ]
164 }, 182 },
165 { 183 {
166 "name": "setMode", 184 "name": "setMode",
167 "type": "function", 185 "type": "function",
168 "description": "Sets the virtual keyboard mode.", 186 "description": "Sets the virtual keyboard mode.",
169 "parameters": [ 187 "parameters": [
170 { 188 {
171 "type": "string", 189 "$ref": "KeyboardMode",
172 "enum": [ "FULL_WIDTH", "FLOATING" ],
173 "name": "mode", 190 "name": "mode",
174 "description": "The value of the virtual keyboard mode to set to." 191 "description": "The value of the virtual keyboard mode to set to."
175 } 192 }
176 ] 193 ]
177 } 194 }
178 195
179 ], 196 ],
180 "events": [ 197 "events": [
181 { 198 {
182 "name": "onTextInputBoxFocused", 199 "name": "onTextInputBoxFocused",
183 "type": "function", 200 "type": "function",
184 "description": "This event is sent when focus enters a text input box.", 201 "description": "This event is sent when focus enters a text input box.",
185 "parameters": [ 202 "parameters": [
186 { 203 {
187 "type": "object", 204 "type": "object",
188 "name": "context", 205 "name": "context",
189 "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 use d by non-ime virtual keyboard only. Normal ime virtual keyboard should use chrom e.input.ime.onFocus to get the more detailed InputContext.", 206 "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 use d by non-ime virtual keyboard only. Normal ime virtual keyboard should use chrom e.input.ime.onFocus to get the more detailed InputContext.",
190 "properties": { 207 "properties": {
191 "type": { 208 "type": {
192 "type": "string", 209 "$ref": "OnTextInputBoxFocusedType",
193 "description": "The value of type attribute of the focused text input box.", 210 "description": "The value of type attribute of the focused text input box."
194 "enum": ["text", "number", "password", "date", "url", "tel", "em ail"]
195 } 211 }
196 } 212 }
197 } 213 }
198 ] 214 ]
199 } 215 }
200 ] 216 ]
201 } 217 }
202 ] 218 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698