Revert "Only store leading 13 bits of password hash."
[chromium-blink-merge.git] / chrome / common / extensions / api / chrome_web_view_internal.json
blob69729c5d6a094c9c7f1ce0e3bbb5cd0abe25f111
1 // Copyright 2014 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": "chromeWebViewInternal",
8     "description": "none",
9     "compiler_options": {
10       "implemented_in": "chrome/browser/extensions/api/web_view/chrome_web_view_internal_api.h"
11     },
12     "dependencies": ["contextMenusInternal"],
13     "types": [
14       {
15         "id": "ContextMenuItem",
16         "type": "object",
17         "description": "An item in the context menu.",
18         "properties": {
19           "label": {
20             "type": "string",
21             "description": "label of the item",
22             "optional": true
23           },
24           "commandId": {
25             "type": "integer",
26             "description": "id of the input item"
27           }
28         }
29       }
30     ],
31     "functions": [
32       {
33         "name": "contextMenusCreate",
34         "type": "function",
35         "returns": {
36           "choices": [
37             { "type": "integer" },
38             { "type": "string" }
39           ],
40           "description": "The ID of the newly created item."
41         },
42         "parameters": [
43           {
44             "type": "integer",
45             "name": "instanceId",
46             "nodoc": true
47           },
48           {
49             "type": "object",
50             "name": "createProperties",
51             "properties": {
52               "type": {
53                 "type": "string",
54                 "enum": ["normal", "checkbox", "radio", "separator"],
55                 "optional": true,
56                 "description": "The type of menu item. Defaults to 'normal' if not specified."
57               },
58               "id": {
59                 "type": "string",
60                 "optional": true,
61                 "description": "The unique ID to assign to this item. Cannot be the same as another ID for this webview."
62               },
63               "title": {
64                 "type": "string",
65                 "optional": true,
66                 "description": "The text to be displayed in the item; this is <em>required</em> unless <em>type</em> is 'separator'. When the context is 'selection', you can use <code>%s</code> within the string to show the selected text. For example, if this parameter's value is \"Translate '%s' to Pig Latin\" and the user selects the word \"cool\", the context menu item for the selection is \"Translate 'cool' to Pig Latin\"."
67               },
68               "checked": {
69                 "type": "boolean",
70                 "optional": true,
71                 "description": "The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items."
72               },
73               "contexts": {
74                 "type": "array",
75                 "items": {
76                   "type": "string",
77                   // |launcher| isn't actually supported, this is listed here so that we can build |contexts| using the same code from chrome.contextMenus API.
78                   "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher", "browser_action", "page_action"]
79                 },
80                 "minItems": 1,
81                 "optional": true,
82                 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified. Specifying ['all'] is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is not supported for <webview>."
83               },
84               "onclick": {
85                 "type": "function",
86                 "optional": true,
87                 "description": "A function that will be called back when the menu item is clicked.",
88                 "parameters": [
89                   {
90                     "name": "info",
91                     "$ref": "contextMenusInternal.OnClickData",
92                     "description": "Information about the item clicked and the context where the click happened."
93                   }
94                 ]
95               },
96               "parentId": {
97                 "choices": [
98                   { "type": "integer" },
99                   { "type": "string" }
100                 ],
101                 "optional": true,
102                 "description": "The ID of a parent menu item; this makes the item a child of a previously added item."
103               },
104               "documentUrlPatterns": {
105                 "type": "array",
106                 "items": {"type": "string"},
107                 "optional": true,
108                 "description": "Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see <a href='match_patterns'>Match Patterns</a>."
109               },
110               "targetUrlPatterns": {
111                 "type": "array",
112                 "items": {"type": "string"},
113                 "optional": true,
114                 "description": "Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags."
115               },
116               "enabled": {
117                 "type": "boolean",
118                 "optional": true,
119                 "description": "Whether this context menu item is enabled or disabled. Defaults to true."
120               }
121             }
122           },
123           {
124             "type": "function",
125             "name": "callback",
126             "optional": true,
127             "description": "Called when the item has been created in the browser. If there were any problems creating the item, details will be available in chrome.runtime.lastError.",
128             "parameters": []
129           }
130         ]
131       },
132       {
133         "name": "contextMenusUpdate",
134         "type": "function",
135         "description": "Updates a previously created context menu item.",
136         "parameters": [
137           {
138             "type": "integer",
139             "name": "instanceId",
140             "nodoc": true
141           },
142           {
143             "choices": [
144               { "type": "integer" },
145               { "type": "string" }
146             ],
147             "name": "id",
148             "description": "The ID of the item to update."
149           },
150           { "type": "object",
151             "name": "updateProperties",
152             "description": "The properties to update. Accepts the same values as the create function.",
153             "properties": {
154               "type": {
155                 "type": "string",
156                 "enum": ["normal", "checkbox", "radio", "separator"],
157                 "optional": true
158               },
159               "title": {
160                 "type": "string",
161                 "optional": true
162               },
163               "checked": {
164                 "type": "boolean",
165                 "optional": true
166               },
167               "contexts": {
168                 "type": "array",
169                 "items": {
170                   "type": "string",
171                   // |launcher| isn't actually supported, this is listed here so that we can build |contexts| using the same code from chrome.contextMenus API.
172                   "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher", "browser_action", "page_action"]
173                 },
174                 "minItems": 1,
175                 "optional": true,
176                 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified. Specifying ['all'] is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is not supported for <webview>."
177               },
178               "onclick": {
179                 "type": "function",
180                 "optional": true
181               },
182               "parentId": {
183                 "choices": [
184                   { "type": "integer" },
185                   { "type": "string" }
186                 ],
187                 "optional": true,
188                 "description": "Note: You cannot change an item to be a child of one of its own descendants."
189               },
190               "documentUrlPatterns": {
191                 "type": "array",
192                 "items": {"type": "string"},
193                 "optional": true
194               },
195               "targetUrlPatterns": {
196                 "type": "array",
197                 "items": {"type": "string"},
198                 "optional": true
199               },
200               "enabled": {
201                 "type": "boolean",
202                 "optional": true
203               }
204             }
205           },
206           {
207             "type": "function",
208             "name": "callback",
209             "optional": true,
210             "parameters": [],
211             "description": "Called when the context menu has been updated."
212           }
213         ]
214       },
215       {
216         "name": "contextMenusRemove",
217         "type": "function",
218         "description": "Removes a context menu item.",
219         "parameters": [
220           {
221             "type": "integer",
222             "name": "instanceId",
223             "nodoc": true
224           },
225           {
226             "choices": [
227               { "type": "integer" },
228               { "type": "string" }
229             ],
230             "name": "menuItemId",
231             "description": "The ID of the context menu item to remove."
232           },
233           {
234             "type": "function",
235             "name": "callback",
236             "optional": true,
237             "parameters": [],
238             "description": "Called when the context menu has been removed."
239           }
240         ]
241       },
242       {
243         "name": "contextMenusRemoveAll",
244         "type": "function",
245         "description": "Removes all context menu items added by this webview.",
246         "parameters": [
247           {
248             "type": "integer",
249             "name": "instanceId",
250             "nodoc": true
251           },
252           {
253             "type": "function",
254             "name": "callback",
255             "optional": true,
256             "parameters": [],
257             "description": "Called when removal is complete."
258           }
259         ]
260       },
261       {
262         "name": "showContextMenu",
263         "type": "function",
264         "parameters": [
265           {
266             "type": "integer",
267             "name": "instanceId",
268             "description": "The instance ID of the guest &lt;webview&gt; process. This not exposed to developers through the API."
269           },
270           {
271             "type": "integer",
272             "name": "requestId",
273             "description": "The strictly increasing request counter that serves as ID for the context menu. This not exposed to developers through the API."
274           },
275           {
276             "type": "array",
277             "name": "itemsToShow",
278             "items": {"$ref": "ContextMenuItem"},
279             "description": "Items to be shown in the context menu. These are top level items as opposed to children items.",
280             "optional": true
281           }
282         ]
283       }
284     ],
285     "events": [
286       {
287         "name": "onClicked",
288         "type": "function",
289         "nodoc": true,
290         "$ref": "contextMenusInternal.onClicked"
291       }
292     ]
293   }