Properly attach InfoBarContainer when it is swapped to a new WebContents
[chromium-blink-merge.git] / chrome / common / extensions / api / input_method_private.json
blobd2a5af6d6a2ddfbc9bc529846ece0298739d91f7
1 // Copyright (c) 2012 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": "inputMethodPrivate",
8     "description": "none",
9     "functions": [
10       {
11         "name": "getInputMethodConfig",
12         "type": "function",
13         "description": "Gets configurations for input methods.",
14         "parameters": [
15           {
16             "name": "callback",
17             "type": "function",
18             "optional": false,
19             "description": "Callback which is called with the config object.",
20             "parameters": [
21               {
22                 "name": "config",
23                 "type": "object",
24                 "description": "The input method config object.",
25                 "properties": {
26                   "isPhysicalKeyboardAutocorrectEnabled": {"type": "boolean"},
27                   "isNewMDInputViewEnabled": {"type": "boolean"},
28                   "isVoiceInputEnabled": {"type": "boolean"}
29                 }
30               }
31             ]
32           }
33         ]
34       }, {
35         "name": "getInputMethods",
36         "type": "function",
37         "description": "Gets all whitelisted input methods.",
38         "parameters": [
39           {
40             "name": "callback",
41             "type": "function",
42             "optional": false,
43             "description": "Callback which is called with the input method objects.",
44             "parameters": [
45               {
46                 "name": "inputMethods",
47                 "type": "array",
48                 "description": "Whitelisted input method objects.",
49                 "items": {
50                   "type": "object",
51                   "properties": {
52                     "id": {"type": "string"},
53                     "name": {"type": "string"},
54                     "indicator": {"type": "string"}
55                   }
56                 }
57               }
58             ]
59           }
60         ]
61       }, {
62         "name": "getCurrentInputMethod",
63         "type": "function",
64         "description": "Gets the current input method.",
65         "parameters": [
66           {
67             "name": "callback",
68             "type": "function",
69             "optional": false,
70             "description": "Callback which is called with the current input method.",
71             "parameters": [
72               {
73                 "name": "inputMethodId",
74                 "type": "string",
75                 "description": "Current input method."
76               }
77             ]
78           }
79         ]
80       }, {
81         "name": "setCurrentInputMethod",
82         "type": "function",
83         "description": "Sets the current input method.",
84         "parameters": [
85           {
86             "name": "inputMethodId",
87             "type": "string",
88             "optional": false,
89             "description": "The input method ID to be set as current input method."
90           },
91           {
92             "name": "callback",
93             "type": "function",
94             "optional": true,
95             "description": "Callback which is called once the current input method is set. If unsuccessful $(ref:runtime.lastError) is set.",
96             "parameters": []
97           }
98         ]
99       }, {
100         "name": "fetchAllDictionaryWords",
101         "type": "function",
102         "description": "Fetches a list of all the words currently in the dictionary.",
103         "parameters": [
104           {
105             "name": "callback",
106             "type": "function",
107             "optional": false,
108             "description": "Callback which is called once the list of dictionary words are ready.",
109             "parameters": [
110               {
111                 "name": "words",
112                 "type": "array",
113                 "description": "List of dictionary words.",
114                 "items": {
115                   "type": "string"
116                 }
117               }
118             ]
119           }
120         ]
121       }, {
122         "name": "addWordToDictionary",
123         "type": "function",
124         "description": "Adds a single word to be stored in the dictionary.",
125         "parameters": [
126           {
127             "name": "word",
128             "type": "string",
129             "optional": false,
130             "description": "A new word to add to the dictionary."
131           },
132           {
133             "name": "callback",
134             "type": "function",
135             "optional": true,
136             "description": "Callback which is called once the word is added. If unsuccessful $(ref:runtime.lastError) is set.",
137             "parameters": []
138           }
139         ]
140       }
141     ],
142     "events": [
143       {
144         "name": "onChanged",
145         "type": "function",
146         "description": "Fired when the input method is changed.",
147         "parameters": [
148           {
149             "name": "newInputMethodId",
150             "type": "string",
151             "description": "New input method which is being used."
152           }
153         ]
154       }, {
155         "name": "onCompositionBoundsChanged",
156         "type": "function",
157         "description": "Fired when the composition bounds or cursor bounds are changed.",
158         "parameters": [
159           {
160             "name": "bounds",
161             "type": "array",
162             "description": "List of bounds information.",
163             "items": {
164               "type": "object",
165               "properties": {
166                 "x": {"type": "integer"},
167                 "y": {"type": "integer"},
168                 "w": {"type": "integer"},
169                 "h": {"type": "integer"}
170               }
171             }
172           }
173         ]
174       }, {
175         "name": "onDictionaryLoaded",
176         "type": "function",
177         "description": "Fired when the custom spelling dictionary is loaded.",
178         "parameters": []
179       }, {
180         "name": "onDictionaryChanged",
181         "type": "function",
182         "description": "Fired when words are added or removed from the custom spelling dictionary.",
183         "parameters": [
184           {
185             "name": "added",
186             "type": "array",
187             "description": "List of added words.",
188             "items": {
189               "type": "string"
190             }
191           }, {
192             "name": "removed",
193             "type": "array",
194             "description": "List of removed words.",
195             "items": {
196               "type": "string"
197             }
198           }
199         ]
200       }
201     ]
202   }