1 // Copyright (c) 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.
7 "namespace": "webview",
9 "dependencies": ["contextMenusInternal"],
14 "description": "A set of data types. Missing data types are interpreted as <code>false</code>.",
19 "description": "Websites' appcaches."
24 "description": "The browser's cookies."
29 "description": "Websites' file systems."
34 "description": "Websites' IndexedDB data."
39 "description": "Websites' local storage data."
44 "description": "Websites' WebSQL data."
49 "id": "ContextMenuItem",
51 "description": "An item in the context menu.",
55 "description": "label of the item",
60 "description": "id of the input item"
65 "id": "RemovalOptions",
67 "description": "Options that determine exactly what data will be removed.",
72 "description": "Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the <code>getTime</code> method of the JavaScript <code>Date</code> object). If absent, defaults to 0 (which would remove all browsing data)."
79 "name": "contextMenusCreate",
83 { "type": "integer" },
86 "description": "The ID of the newly created item."
96 "name": "createProperties",
100 "enum": ["normal", "checkbox", "radio", "separator"],
102 "description": "The type of menu item. Defaults to 'normal' if not specified."
107 "description": "The unique ID to assign to this item. Cannot be the same as another ID for this webview."
112 "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\"."
117 "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."
123 // |launcher| isn't actually supported, this is listed here so that we can build |contexts| using the same code from chrome.contextMenus API.
124 "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher"]
128 "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>."
133 "description": "A function that will be called back when the menu item is clicked.",
137 "$ref": "contextMenusInternal.OnClickData",
138 "description": "Information about the item clicked and the context where the click happened."
144 { "type": "integer" },
148 "description": "The ID of a parent menu item; this makes the item a child of a previously added item."
150 "documentUrlPatterns": {
152 "items": {"type": "string"},
154 "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.html'>Match Patterns</a>."
156 "targetUrlPatterns": {
158 "items": {"type": "string"},
160 "description": "Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags."
165 "description": "Whether this context menu item is enabled or disabled. Defaults to true."
173 "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.",
179 "name": "contextMenusUpdate",
181 "description": "Updates a previously created context menu item.",
185 "name": "instanceId",
190 { "type": "integer" },
194 "description": "The ID of the item to update."
197 "name": "updateProperties",
198 "description": "The properties to update. Accepts the same values as the create function.",
202 "enum": ["normal", "checkbox", "radio", "separator"],
217 // |launcher| isn't actually supported, this is listed here so that we can build |contexts| using the same code from chrome.contextMenus API.
218 "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher"]
222 "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>."
230 { "type": "integer" },
234 "description": "Note: You cannot change an item to be a child of one of its own descendants."
236 "documentUrlPatterns": {
238 "items": {"type": "string"},
241 "targetUrlPatterns": {
243 "items": {"type": "string"},
257 "description": "Called when the context menu has been updated."
262 "name": "contextMenusRemove",
264 "description": "Removes a context menu item.",
268 "name": "instanceId",
273 { "type": "integer" },
276 "name": "menuItemId",
277 "description": "The ID of the context menu item to remove."
284 "description": "Called when the context menu has been removed."
289 "name": "contextMenusRemoveAll",
291 "description": "Removes all context menu items added by this webview.",
295 "name": "instanceId",
303 "description": "Called when removal is complete."
310 "description": "Clears various types of browsing data stored in a storage partition of a <webview>.",
314 "name": "instanceId",
315 "description": "The instance ID of the guest <webview> process."
318 "$ref": "RemovalOptions",
322 "name": "dataToRemove",
323 "$ref": "DataTypeSet",
324 "description": "The set of data types to remove."
329 "description": "Called when deletion has completed.",
336 "name": "executeScript",
338 "description": "Injects JavaScript code into a <webview> page.",
342 "name": "instanceId",
343 "description": "The instance ID of the guest <webview> process."
348 "description": "The src of the guest <webview> process."
351 "$ref": "tabs.InjectDetails",
353 "description": "Details of the script to run."
359 "description": "Called after all the JavaScript has been executed.",
365 "items": {"type": "any", "minimum": 0},
366 "description": "The result of the script in every injected frame."
375 "description": "Injects JavaScript code into a <webview> page.",
379 "name": "instanceId",
380 "description": "The instance ID of the guest <webview> process."
385 "description": "The src of the guest <webview> process."
388 "$ref": "tabs.InjectDetails",
390 "description": "Details of the script to run."
396 "description": "Called after all the JavaScript has been executed.",
402 "items": {"type": "any", "minimum": 0},
403 "description": "The result of the script in every injected frame."
410 "name": "captureVisibleRegion",
412 "description": "Captures the visible area of the currently loaded page inside <webview>.",
416 "name": "instanceId",
417 "description": "The instance ID of the guest <webview> process."
420 "$ref": "types.ImageDetails",
425 "type": "function", "name": "callback", "parameters": [
426 {"type": "string", "name": "dataUrl", "description": "A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display."}
437 "name": "instanceId",
438 "description": "The instance ID of the guest <webview> process."
442 "name": "zoomFactor",
443 "description" : "The new zoom factor."
448 "description": "Called after the zoom message has been sent to the guest process.",
460 "name": "instanceId",
461 "description": "The instance ID of the guest <webview> process."
466 "description": "Called after the current zoom factor is retreived.",
470 "name": "zoomFactor",
471 "description": "The current zoom factor."
480 "description": "Initiates a find-in-page request.",
484 "name": "instanceId",
485 "description": "The instance ID of the guest <webview> process."
489 "name": "searchText",
490 "description": "The string to find in the page."
499 "description": "Flag to find matches in reverse order.",
504 "description": "Flag to match |searchText| with case-sensitivity.",
512 "description": "Called after all find results have been returned for this find request.",
522 "description": "The number of times |searchText| was matched on the page."
524 "activeMatchOrdinal": {
526 "description": "The ordinal number of the current match."
530 "description": "Describes a rectangle around the active match.",
548 "description": "Indicates whether this find request was canceled."
557 "name": "stopFinding",
559 "description": "Ends the current find session (clearing all highlighting) and cancels all find requests in progress.",
563 "name": "instanceId",
564 "description": "The instance ID of the guest <webview> process."
569 "description": "Determines what to do with the active match after the find session has ended. 'clear' will clear the highlighting over the active match; 'keep' will keep the active match highlighted; 'activate' will keep the active match highlighted and simulate a user click on that match.",
571 "enum": ["clear", "keep", "activate"]
585 "name": "relativeIndex"
590 "name": "overrideUserAgent",
599 "name": "userAgentOverride"
614 "name": "setPermission",
628 "enum": ["allow", "deny", "default"]
674 "$ref": "contextMenusInternal.onClicked"