diff options
Diffstat (limited to 'chrome/common/extensions/api/extension_api.json')
-rw-r--r-- | chrome/common/extensions/api/extension_api.json | 241 |
1 files changed, 241 insertions, 0 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index 670d72b..5004d84 100644 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -3476,6 +3476,247 @@ "events": [] }, { + "namespace": "experimental.sidebar", + "types": [], + "functions": [ + { + "name": "hide", + "type": "function", + "description": "Hides sidebar's mini tab for the specified tab and collapses sidebar if it was in 'active' state (see getState). Has no effect if the sidebar is already hidden.", + "parameters": [ + { + "type": "object", + "name": "details", + "optional": true, + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + } + } + } + ] + }, + { + "name": "show", + "type": "function", + "description": "Shows sidebar mini tab (in 'shown' state) for the specified tab. Has no effect if already expanded, otherwise changes status to 'shown'.", + "parameters": [ + { + "type": "object", + "name": "details", + "optional": true, + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + } + } + } + ] + }, + { + "name": "expand", + "type": "function", + "description": "Expands sidebar and switches to the specified content (if it was displaying another extension's sidebar content) for the specified tab. Extension is allowed to expand sidebar only in response to an explicit user gesture.", + "parameters": [ + { + "type": "object", + "name": "details", + "optional": true, + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + } + } + } + ] + }, + { + "name": "collapse", + "type": "function", + "description": "Collapses sidebar for the specified tab. Has no effect if sidebar is not in its 'active' state (see getState).", + "parameters": [ + { + "type": "object", + "name": "details", + "optional": true, + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + } + } + } + ] + }, + { + "name": "navigate", + "type": "function", + "description": "Navigates sidebar for the specified tab to the specified URL.", + "parameters": [ + { + "type": "object", + "name": "details", + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + }, + "url": { "type": "string" } + } + } + ] + }, + { + "name": "getState", + "type": "function", + "description": "Returns current sidebar state for the specified tab.", + "parameters": [ + { + "type": "object", + "name": "details", + "optional": true, + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + } + } + }, + { + "type": "function", + "name": "callback", + "parameters": [ + { + "name": "state", + "type": "string", + "enum": ["hidden", "shown", "active"], + "description": "'hidden' indicates sidebar is not defined for the specified tab (show was never called or hide() was called). Nothing is displayed for this sidebar.</br>'shown' means sidebar is defined for the specified tab; mini tab is displayed for this sidebar. Sidebar UI is either collapsed or displaying a content of some other extension's sidebar.</br>'active' indicates that sidebar is defined for the specified tab; sidebar UI is expanded and displaying this sidebar's content." + } + ] + } + ] + }, + { + "name": "setBadgeText", + "type": "function", + "description": "Sets sidebar's mini tab badge text for the specified tab.", + "parameters": [ + { + "type": "object", + "name": "details", + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + }, + "text": { + "type": "string", + "description": "The sidebar's badge text. The badge is displayed on top of the sidebar's icon on the mini tab. Any number of characters can be passed, but only about four can fit in the space." + } + } + } + ] + }, + { + "name": "setIcon", + "type": "function", + "description": "Sets sidebar's mini tab icon for the specified tab.", + "parameters": [ + { + "type": "object", + "name": "details", + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + }, + "imageData": { + "type": "object", + "isInstanceOf": "ImageData", + "properties": {}, + "additionalProperties": { "type": "any" }, + "description": "Pixel data for an image to show on the sidebar's mini tab. Must be an ImageData object (for example, from a <code>canvas</code> element). Only one of the imagePath/imageData parameters all owed. The extension's icon is used by default. The preferred size of the icon is 16x16 pixels, any other size will be scaled to 16x16.", + "optional": true + }, + "path": { + "type": "string", + "optional": true, + "description": "Relative path to an image in the extension to show on the sidebar's mini tab. Only one of the imagePath/imageData parameters all owed. The extension's icon is used by default. The preferred size of the icon is 16x16 pixels, any other size will be scaled to 16x16." + } + } + } + ] + }, + { + "name": "setTitle", + "type": "function", + "description": "Sets sidebar's mini tab title for the specified tab.", + "parameters": [ + { + "type": "object", + "name": "details", + "properties": { + "tabId": { + "type": "integer", + "minimum": 0, + "optional": true, + "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>." + }, + "title": { + "type": "string", + "description": "The sidebar's title. It is displayed in a tooltip over the sidebar's mini tab." + } + } + } + ] + } + ], + "events": [ + { + "name": "onStateChanged", + "perExtensionEvent": true, + "unprivileged": true, + "type": "function", + "description": "Notifies about sidebar state changes.", + "parameters": [ + { + "type": "object", + "name": "details", + "properties": { + "tabId": { + "type": "integer", + "minimum": 0 + }, + "state": { + "type": "string", + "enum": ["hidden", "shown", "active"] + } + } + } + ] + } + ] + }, + { "namespace": "experimental.omnibox", "types": [ { |