Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / extensions / common / api / virtual_keyboard_private.json
blobf8dd8268e27b56336a5a527d9ca464d8e083c56c
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
3 // found in the LICENSE file.
6   {
7     "namespace": "virtualKeyboardPrivate",
8     "compiler_options": {
9       "implemented_in": "extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api.h"
10     },
11     "platforms": ["chromeos"],
12     "description": "none",
13     "types": [
14       {
15         "id": "VirtualKeyboardEventType",
16         "type": "string",
17         "description": "One of keyup or keydown.",
18         "enum": ["keyup", "keydown"]
19       },
20       {
21         "id": "VirtualKeyboardEvent",
22         "type": "object",
23         "properties": {
24           "type": {"$ref": "VirtualKeyboardEventType"},
25           "charValue": {"type": "integer", "description": "Unicode value of the key."},
26           "keyCode": {"type": "integer", "description": "Virtual key code, which is independent of the keyboard layout or modifier state."},
27           "keyName": {"type": "string", "description": "Name of the key, which is independent of modifier state."},
28           "modifiers": {"type": "integer", "optional": true, "description": "Flag for modifiers that are active. None = 0, Shift = 2, Control = 4, Alt = 8."}
29         }
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 box.",
41         "enum": ["text", "number", "password", "date", "url", "tel", "email"]
42       },
43       {
44         "id": "Bounds",
45         "type": "object",
46         "properties": {
47           "left": {"type": "integer", "description": "The position of the virtual keyboard window's left edge."},
48           "top": {"type": "integer", "description": "The position of the virtual keyboard window's top edge."},
49           "width": {"type": "integer", "description": "The width of the virtual keyboard window."},
50           "height": {"type": "integer", "description": "The height of the virtual keyboard window."}
51         }
52       }
53     ],
54     "functions": [
55       {
56         "name": "insertText",
57         "type": "function",
58         "description": "Inserts text into the currently focused text field.",
59         "parameters": [
60           { "name": "text",
61             "type": "string",
62             "description": "The text that will be inserted."
63           },
64           { "type": "function",
65             "name": "callback",
66             "optional": true,
67             "description": "Called when the insertion is completed.",
68             "parameters": []
69           }
70         ]
71       },
72       {
73         "name": "moveCursor",
74         "type": "function",
75         "description": "Move cursor on the current focused textfield by swipe.",
76         "parameters": [
77           { "name": "swipe_direction",
78             "type": "integer",
79             "discription": "The direction of the cursor movement."
80           },
81           { "name": "modifier_flags",
82             "type": "integer",
83             "description": "Bitmask representing the state of the system modifier keys."
84           },
85           { "type": "function",
86             "name": "callback",
87             "optional": true,
88             "decription": "called when the swipe movement is completed.",
89             "parameters": []
90           }
91         ]
92       },
93       {
94         "name": "sendKeyEvent",
95         "type": "function",
96         "description": "Sends a fabricated key event to the focused input field.",
97         "parameters": [
98           { "name": "keyEvent",
99             "$ref": "VirtualKeyboardEvent",
100             "description": ""
101           },
102           { "name": "callback",
103             "type": "function",
104             "optional": true,
105             "description": "Called after processing the event.",
106             "parameters": []
107           }
108         ]
109       },
110       {
111         "name": "hideKeyboard",
112         "type": "function",
113         "description": "Hides the virtual keyboard.",
114         "parameters": [
115           { "type": "function",
116             "name": "callback",
117             "optional": true,
118             "description": "Called when the keyboard is hidden.",
119             "parameters": []
120           }
121         ]
122       },
123       {
124         "name": "lockKeyboard",
125         "type": "function",
126         "description": "Sets the lock state of the virtual keyboard. A locked keyboard remains visible even after a text area loses input focus.",
127         "parameters": [
128           {
129             "type": "boolean",
130             "name": "lock"
131           }
132         ]
133       },
134       {
135         "name": "keyboardLoaded",
136         "type": "function",
137         "description": "Inform the system that the keyboard has loaded.",
138         "parameters": [
139           { "type": "function",
140             "name": "callback",
141             "optional": true,
142             "description": "Called when load acknowledgement is complete.",
143             "parameters": []
144           }
145         ]
146       },
147       {
148         "name": "getKeyboardConfig",
149         "type": "function",
150         "description": "Gets the virtual keyboard configuration.",
151         "parameters": [
152           {
153             "type": "function",
154             "name": "callback",
155             "optional": true,
156             "description": "Called when querying virtual keyboard configuration is complete.",
157             "parameters": [
158               {
159                 "type": "object",
160                 "name": "config",
161                 "properties": {
162                   "layout": {
163                     "type": "string",
164                     "minLength": 1,
165                     "description": "Virtual keyboard layout string."
166                   },
167                   "a11ymode": {
168                     "type": "boolean",
169                     "description": "True if accessibility virtual keyboard is enabled."
170                   },
171                   "features": {
172                     "type": "array",
173                     "items": { "type": "string" },
174                     "description": "List of experimental feature flags."
175                   }
176                 }
177               }
178             ]
179           }
180         ]
181       },
182       {
183         "name": "openSettings",
184         "type": "function",
185         "description": "Opens chrome://settings/languages page.",
186         "parameters": [
187         ]
188       },
189       {
190         "name": "setMode",
191         "type": "function",
192         "description": "Sets the virtual keyboard mode.",
193         "parameters": [
194           {
195             "$ref": "KeyboardMode",
196             "name": "mode",
197             "description": "The value of the virtual keyboard mode to set to."
198           }
199         ]
200       }
202     ],
203     "events": [
204       {
205         "name": "onTextInputBoxFocused",
206         "type": "function",
207         "description": "This event is sent when focus enters a text input box.",
208         "parameters": [
209           {
210             "type": "object",
211             "name": "context",
212             "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.",
213             "properties": {
214               "type": {
215                 "$ref": "OnTextInputBoxFocusedType",
216                 "description": "The value of type attribute of the focused text input box."
217               }
218             }
219           }
220         ]
221       },
222       {
223         "name": "onBoundsChanged",
224         "type": "function",
225         "description": "This event is sent when virtual keyboard bounds changed and overscroll/resize is enabled.",
226         "parameters": [
227           {
228             "name": "bounds",
229             "description": "The virtual keyboard bounds",
230             "$ref": "Bounds"
231           }
232         ]
233       }
234     ]
235   }