sinon-chrome
Version:
Mock of chrome extensions API for unit testing under nodejs
1,610 lines (1,609 loc) • 631 kB
JSON
[
{
"types": [
{
"id": "Alarm",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"scheduledTime": {
"type": "number"
},
"periodInMinutes": {
"type": "number",
"nullable": true
}
}
},
{
"id": "AlarmCreateInfo",
"type": "object",
"properties": {
"when": {
"type": "number",
"nullable": true
},
"delayInMinutes": {
"type": "number",
"nullable": true
},
"periodInMinutes": {
"type": "number",
"nullable": true
}
}
}
],
"functions": [
{
"name": "create",
"type": "function",
"parameters": [
{
"type": "string",
"optional": true,
"name": "name"
},
{
"$ref": "AlarmCreateInfo",
"optional": false,
"name": "alarmInfo"
}
],
"static": true
},
{
"name": "get",
"type": "function",
"parameters": [
{
"type": "string",
"optional": true,
"name": "name"
},
{
"optional": false,
"name": "callback",
"type": "function",
"parameters": [
{
"$ref": "Alarm",
"optional": true,
"name": "alarm"
}
]
}
],
"static": true
},
{
"name": "getAll",
"type": "function",
"parameters": [
{
"optional": false,
"name": "callback",
"type": "function",
"parameters": [
{
"type": "array",
"items": {
"$ref": "Alarm"
},
"optional": false,
"name": "alarms"
}
]
}
],
"static": true
},
{
"name": "clear",
"type": "function",
"parameters": [
{
"type": "string",
"optional": true,
"name": "name"
},
{
"optional": true,
"name": "callback",
"type": "function",
"parameters": [
{
"type": "boolean",
"optional": false,
"name": "wasCleared"
}
]
}
],
"static": true
},
{
"name": "clearAll",
"type": "function",
"parameters": [
{
"optional": true,
"name": "callback",
"type": "function",
"parameters": [
{
"type": "boolean",
"optional": false,
"name": "wasCleared"
}
]
}
],
"static": true
}
],
"events": [
{
"name": "onAlarm",
"type": "function",
"parameters": [
{
"$ref": "Alarm",
"optional": false,
"name": "alarm"
}
]
}
],
"namespace": "alarms",
"dependencies": [
"permission:alarms"
]
},
{
"namespace": "bookmarks",
"description": "Use the <code>chrome.bookmarks</code> API to create, organize, and otherwise manipulate bookmarks. Also see <a href='override'>Override Pages</a>, which you can use to create a custom Bookmark Manager page.",
"properties": {
"MAX_WRITE_OPERATIONS_PER_HOUR": {
"value": 1000000,
"deprecated": "Bookmark write operations are no longer limited by Chrome.",
"description": ""
},
"MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE": {
"value": 1000000,
"deprecated": "Bookmark write operations are no longer limited by Chrome.",
"description": ""
}
},
"types": [
{
"id": "BookmarkTreeNodeUnmodifiable",
"type": "string",
"enum": [
"managed"
],
"description": "Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default)."
},
{
"id": "BookmarkTreeNode",
"type": "object",
"description": "A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.",
"properties": {
"id": {
"type": "string",
"minimum": 0,
"description": "The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted."
},
"parentId": {
"type": "string",
"minimum": 0,
"optional": true,
"description": "The <code>id</code> of the parent folder. Omitted for the root node."
},
"index": {
"type": "integer",
"optional": true,
"description": "The 0-based position of this node within its parent folder."
},
"url": {
"type": "string",
"optional": true,
"description": "The URL navigated to when a user clicks the bookmark. Omitted for folders."
},
"title": {
"type": "string",
"description": "The text displayed for the node."
},
"dateAdded": {
"type": "number",
"optional": true,
"description": "When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>)."
},
"dateGroupModified": {
"type": "number",
"optional": true,
"description": "When the contents of this folder last changed, in milliseconds since the epoch."
},
"unmodifiable": {
"$ref": "BookmarkTreeNodeUnmodifiable",
"optional": true,
"description": "Indicates the reason why this node is unmodifiable. The <var>managed</var> value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default)."
},
"children": {
"type": "array",
"optional": true,
"items": {
"$ref": "BookmarkTreeNode"
},
"description": "An ordered list of children of this node."
}
}
},
{
"id": "CreateDetails",
"description": "Object passed to the create() function.",
"inline_doc": true,
"type": "object",
"properties": {
"parentId": {
"type": "string",
"serialized_type": "int64",
"optional": true,
"description": "Defaults to the Other Bookmarks folder."
},
"index": {
"type": "integer",
"minimum": 0,
"optional": true
},
"title": {
"type": "string",
"optional": true
},
"url": {
"type": "string",
"optional": true
}
}
}
],
"functions": [
{
"name": "get",
"type": "function",
"description": "Retrieves the specified BookmarkTreeNode(s).",
"parameters": [
{
"name": "idOrIdList",
"description": "A single string-valued id, or an array of string-valued ids",
"choices": [
{
"type": "string",
"serialized_type": "int64"
},
{
"type": "array",
"items": {
"type": "string",
"serialized_type": "int64"
},
"minItems": 1
}
]
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "results",
"type": "array",
"items": {
"$ref": "BookmarkTreeNode"
}
}
]
}
]
},
{
"name": "getChildren",
"type": "function",
"description": "Retrieves the children of the specified BookmarkTreeNode id.",
"parameters": [
{
"type": "string",
"serialized_type": "int64",
"name": "id"
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "results",
"type": "array",
"items": {
"$ref": "BookmarkTreeNode"
}
}
]
}
]
},
{
"name": "getRecent",
"type": "function",
"description": "Retrieves the recently added bookmarks.",
"parameters": [
{
"type": "integer",
"minimum": 1,
"name": "numberOfItems",
"description": "The maximum number of items to return."
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "results",
"type": "array",
"items": {
"$ref": "BookmarkTreeNode"
}
}
]
}
]
},
{
"name": "getTree",
"type": "function",
"description": "Retrieves the entire Bookmarks hierarchy.",
"parameters": [
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "results",
"type": "array",
"items": {
"$ref": "BookmarkTreeNode"
}
}
]
}
]
},
{
"name": "getSubTree",
"type": "function",
"description": "Retrieves part of the Bookmarks hierarchy, starting at the specified node.",
"parameters": [
{
"type": "string",
"serialized_type": "int64",
"name": "id",
"description": "The ID of the root of the subtree to retrieve."
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "results",
"type": "array",
"items": {
"$ref": "BookmarkTreeNode"
}
}
]
}
]
},
{
"name": "search",
"type": "function",
"description": "Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.",
"parameters": [
{
"name": "query",
"description": "Either a string of words and quoted phrases that are matched against bookmark URLs and titles, or an object. If an object, the properties <code>query</code>, <code>url</code>, and <code>title</code> may be specified and bookmarks matching all specified properties will be produced.",
"choices": [
{
"type": "string",
"description": "A string of words and quoted phrases that are matched against bookmark URLs and titles."
},
{
"type": "object",
"description": "An object specifying properties and values to match when searching. Produces bookmarks matching all properties.",
"properties": {
"query": {
"type": "string",
"optional": true,
"description": "A string of words and quoted phrases that are matched against bookmark URLs and titles."
},
"url": {
"type": "string",
"optional": true,
"description": "The URL of the bookmark; matches verbatim. Note that folders have no URL."
},
"title": {
"type": "string",
"optional": true,
"description": "The title of the bookmark; matches verbatim."
}
}
}
]
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "results",
"type": "array",
"items": {
"$ref": "BookmarkTreeNode"
}
}
]
}
]
},
{
"name": "create",
"type": "function",
"description": "Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.",
"parameters": [
{
"$ref": "CreateDetails",
"name": "bookmark"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "result",
"$ref": "BookmarkTreeNode"
}
]
}
]
},
{
"name": "move",
"type": "function",
"description": "Moves the specified BookmarkTreeNode to the provided location.",
"parameters": [
{
"type": "string",
"serialized_type": "int64",
"name": "id"
},
{
"type": "object",
"name": "destination",
"properties": {
"parentId": {
"type": "string",
"optional": true
},
"index": {
"type": "integer",
"minimum": 0,
"optional": true
}
}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "result",
"$ref": "BookmarkTreeNode"
}
]
}
]
},
{
"name": "update",
"type": "function",
"description": "Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. <b>Note:</b> Currently, only 'title' and 'url' are supported.",
"parameters": [
{
"type": "string",
"serialized_type": "int64",
"name": "id"
},
{
"type": "object",
"name": "changes",
"properties": {
"title": {
"type": "string",
"optional": true
},
"url": {
"type": "string",
"optional": true
}
}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "result",
"$ref": "BookmarkTreeNode"
}
]
}
]
},
{
"name": "remove",
"type": "function",
"description": "Removes a bookmark or an empty bookmark folder.",
"parameters": [
{
"type": "string",
"serialized_type": "int64",
"name": "id"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeTree",
"type": "function",
"description": "Recursively removes a bookmark folder.",
"parameters": [
{
"type": "string",
"serialized_type": "int64",
"name": "id"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": []
}
]
},
{
"name": "import",
"type": "function",
"description": "Imports bookmarks from a chrome html bookmark file",
"nodoc": "true",
"parameters": [
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": []
}
]
},
{
"name": "export",
"type": "function",
"description": "Exports bookmarks to a chrome html bookmark file",
"nodoc": "true",
"parameters": [
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": []
}
]
}
],
"events": [
{
"name": "onCreated",
"type": "function",
"description": "Fired when a bookmark or folder is created.",
"parameters": [
{
"type": "string",
"name": "id"
},
{
"$ref": "BookmarkTreeNode",
"name": "bookmark"
}
]
},
{
"name": "onRemoved",
"type": "function",
"description": "Fired when a bookmark or folder is removed. When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.",
"parameters": [
{
"type": "string",
"name": "id"
},
{
"type": "object",
"name": "removeInfo",
"properties": {
"parentId": {
"type": "string"
},
"index": {
"type": "integer"
},
"node": {
"$ref": "BookmarkTreeNode"
}
}
}
]
},
{
"name": "onChanged",
"type": "function",
"description": "Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.",
"parameters": [
{
"type": "string",
"name": "id"
},
{
"type": "object",
"name": "changeInfo",
"properties": {
"title": {
"type": "string"
},
"url": {
"type": "string",
"optional": true
}
}
}
]
},
{
"name": "onMoved",
"type": "function",
"description": "Fired when a bookmark or folder is moved to a different parent folder.",
"parameters": [
{
"type": "string",
"name": "id"
},
{
"type": "object",
"name": "moveInfo",
"properties": {
"parentId": {
"type": "string"
},
"index": {
"type": "integer"
},
"oldParentId": {
"type": "string"
},
"oldIndex": {
"type": "integer"
}
}
}
]
},
{
"name": "onChildrenReordered",
"type": "function",
"description": "Fired when the children of a folder have changed their order due to the order being sorted in the UI. This is not called as a result of a move().",
"parameters": [
{
"type": "string",
"name": "id"
},
{
"type": "object",
"name": "reorderInfo",
"properties": {
"childIds": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
]
},
{
"name": "onImportBegan",
"type": "function",
"description": "Fired when a bookmark import session is begun. Expensive observers should ignore onCreated updates until onImportEnded is fired. Observers should still handle other notifications immediately.",
"parameters": []
},
{
"name": "onImportEnded",
"type": "function",
"description": "Fired when a bookmark import session is ended.",
"parameters": []
}
],
"dependencies": [
"permission:bookmarks"
]
},
{
"namespace": "browserAction",
"description": "Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its <a href='browserAction#icon'>icon</a>, a browser action can also have a <a href='browserAction#tooltip'>tooltip</a>, a <a href='browserAction#badge'>badge</a>, and a <a href='browserAction#popups'>popup</a>.",
"types": [
{
"id": "ColorArray",
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"minItems": 4,
"maxItems": 4
},
{
"id": "ImageDataType",
"type": "object",
"isInstanceOf": "ImageData",
"additionalProperties": {
"type": "any"
},
"description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element)."
}
],
"functions": [
{
"name": "setTitle",
"type": "function",
"description": "Sets the title of the browser action. This shows up in the tooltip.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The string the browser action should display when moused over."
},
"tabId": {
"type": "integer",
"optional": true,
"description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
}
}
}
]
},
{
"name": "getTitle",
"type": "function",
"description": "Gets the title of the browser action.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"description": "Specify the tab to get the title from. If no tab is specified, the non-tab-specific title is returned."
}
}
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "result",
"type": "string"
}
]
}
]
},
{
"name": "setIcon",
"type": "function",
"description": "Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"imageData": {
"choices": [
{
"$ref": "ImageDataType"
},
{
"type": "object",
"additionalProperties": {
"type": "any"
}
}
],
"optional": true,
"description": "Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}'"
},
"path": {
"choices": [
{
"type": "string"
},
{
"type": "object",
"additionalProperties": {
"type": "any"
}
}
],
"optional": true,
"description": "Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals <code>scale</code>, then image with size <code>scale</code> * n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.path = {'16': foo}'"
},
"tabId": {
"type": "integer",
"optional": true,
"description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
}
}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": []
}
]
},
{
"name": "setPopup",
"type": "function",
"description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"minimum": 0,
"description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
},
"popup": {
"type": "string",
"description": "The html file to show in a popup. If set to the empty string (''), no popup is shown."
}
}
}
]
},
{
"name": "getPopup",
"type": "function",
"description": "Gets the html document set as the popup for this browser action.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"description": "Specify the tab to get the popup from. If no tab is specified, the non-tab-specific popup is returned."
}
}
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "result",
"type": "string"
}
]
}
]
},
{
"name": "setBadgeText",
"type": "function",
"description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Any number of characters can be passed, but only about four can fit in the space."
},
"tabId": {
"type": "integer",
"optional": true,
"description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
}
}
}
]
},
{
"name": "getBadgeText",
"type": "function",
"description": "Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"description": "Specify the tab to get the badge text from. If no tab is specified, the non-tab-specific badge text is returned."
}
}
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "result",
"type": "string"
}
]
}
]
},
{
"name": "setBadgeBackgroundColor",
"type": "function",
"description": "Sets the background color for the badge.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"color": {
"description": "An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>. Can also be a string with a CSS value, with opaque red being <code>#FF0000</code> or <code>#F00</code>.",
"choices": [
{
"type": "string"
},
{
"$ref": "ColorArray"
}
]
},
"tabId": {
"type": "integer",
"optional": true,
"description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
}
}
}
]
},
{
"name": "getBadgeBackgroundColor",
"type": "function",
"description": "Gets the background color of the browser action.",
"parameters": [
{
"name": "details",
"type": "object",
"properties": {
"tabId": {
"type": "integer",
"optional": true,
"description": "Specify the tab to get the badge background color from. If no tab is specified, the non-tab-specific badge background color is returned."
}
}
},
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "result",
"$ref": "ColorArray"
}
]
}
]
},
{
"name": "enable",
"type": "function",
"description": "Enables the browser action for a tab. By default, browser actions are enabled.",
"parameters": [
{
"type": "integer",
"optional": true,
"name": "tabId",
"minimum": 0,
"description": "The id of the tab for which you want to modify the browser action."
}
]
},
{
"name": "disable",
"type": "function",
"description": "Disables the browser action for a tab.",
"parameters": [
{
"type": "integer",
"optional": true,
"name": "tabId",
"minimum": 0,
"description": "The id of the tab for which you want to modify the browser action."
}
]
},
{
"name": "openPopup",
"type": "function",
"description": "Opens the extension popup window in the active window but does not grant tab permissions.",
"nodoc": true,
"parameters": [
{
"type": "function",
"name": "callback",
"parameters": [
{
"name": "popupView",
"type": "object",
"optional": true,
"description": "JavaScript 'window' object for the popup window if it was succesfully opened.",
"additionalProperties": {
"type": "any"
}
}
]
}
]
}
],
"events": [
{
"name": "onClicked",
"type": "function",
"description": "Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.",
"parameters": [
{
"name": "tab",
"$ref": "tabs.Tab"
}
]
}
],
"dependencies": [
"manifest:browser_action"
]
},
{
"namespace": "browsingData",
"description": "Use the <code>chrome.browsingData</code> API to remove browsing data from a user's local profile.",
"types": [
{
"id": "RemovalOptions",
"type": "object",
"description": "Options that determine exactly what data will be removed.",
"properties": {
"since": {
"type": "number",
"optional": true,
"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)."
},
"originTypes": {
"type": "object",
"optional": true,
"description": "An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only \"unprotected\" origins. Please ensure that you <em>really</em> want to remove application data before adding 'protectedWeb' or 'extensions'.",
"properties": {
"unprotectedWeb": {
"type": "boolean",
"optional": true,
"description": "Normal websites."
},
"protectedWeb": {
"type": "boolean",
"optional": true,
"description": "Websites that have been installed as hosted applications (be careful!)."
},
"extension": {
"type": "boolean",
"optional": true,
"description": "Extensions and packaged applications a user has installed (be _really_ careful!)."
}
}
}
}
},
{
"id": "DataTypeSet",
"type": "object",
"description": "A set of data types. Missing data types are interpreted as <code>false</code>.",
"properties": {
"appcache": {
"type": "boolean",
"optional": true,
"description": "Websites' appcaches."
},
"cache": {
"type": "boolean",
"optional": true,
"description": "The browser's cache. Note: when removing data, this clears the <em>entire</em> cache: it is not limited to the range you specify."
},
"cookies": {
"type": "boolean",
"optional": true,
"description": "The browser's cookies."
},
"downloads": {
"type": "boolean",
"optional": true,
"description": "The browser's download list."
},
"fileSystems": {
"type": "boolean",
"optional": true,
"description": "Websites' file systems."
},
"formData": {
"type": "boolean",
"optional": true,
"description": "The browser's stored form data."
},
"history": {
"type": "boolean",
"optional": true,
"description": "The browser's history."
},
"indexedDB": {
"type": "boolean",
"optional": true,
"description": "Websites' IndexedDB data."
},
"localStorage": {
"type": "boolean",
"optional": true,
"description": "Websites' local storage data."
},
"serverBoundCertificates": {
"type": "boolean",
"optional": true,
"description": "Server-bound certificates."
},
"passwords": {
"type": "boolean",
"optional": true,
"description": "Stored passwords."
},
"pluginData": {
"type": "boolean",
"optional": true,
"description": "Plugins' data."
},
"serviceWorkers": {
"type": "boolean",
"optional": true,
"description": "Service Workers."
},
"webSQL": {
"type": "boolean",
"optional": true,
"description": "Websites' WebSQL data."
}
}
}
],
"functions": [
{
"name": "settings",
"description": "Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.",
"type": "function",
"parameters": [
{
"name": "callback",
"type": "function",
"parameters": [
{
"name": "result",
"type": "object",
"properties": {
"options": {
"$ref": "RemovalOptions"
},
"dataToRemove": {
"$ref": "DataTypeSet",
"description": "All of the types will be present in the result, with values of <code>true</code> if they are both selected to be removed and permitted to be removed, otherwise <code>false</code>."
},
"dataRemovalPermitted": {
"$ref": "DataTypeSet",
"description": "All of the types will be present in the result, with values of <code>true</code> if they are permitted to be removed (e.g., by enterprise policy) and <code>false</code> if not."
}
}
}
]
}
]
},
{
"name": "remove",
"description": "Clears various types of browsing data stored in a user's profile.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "dataToRemove",
"$ref": "DataTypeSet",
"description": "The set of data types to remove."
},
{
"name": "callback",
"type": "function",
"description": "Called when deletion has completed.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeAppcache",
"description": "Clears websites' appcache data.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when websites' appcache data has been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeCache",
"description": "Clears the browser's cache.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when the browser's cache has been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeCookies",
"description": "Clears the browser's cookies and server-bound certificates modified within a particular timeframe.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when the browser's cookies and server-bound certificates have been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeDownloads",
"description": "Clears the browser's list of downloaded files (<em>not</em> the downloaded files themselves).",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when the browser's list of downloaded files has been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeFileSystems",
"description": "Clears websites' file system data.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when websites' file systems have been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeFormData",
"description": "Clears the browser's stored form data (autofill).",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when the browser's form data has been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeHistory",
"description": "Clears the browser's history.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when the browser's history has cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeIndexedDB",
"description": "Clears websites' IndexedDB data.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when websites' IndexedDB data has been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeLocalStorage",
"description": "Clears websites' local storage data.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when websites' local storage has been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removePluginData",
"description": "Clears plugins' data.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when plugins' data has been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removePasswords",
"description": "Clears the browser's stored passwords.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when the browser's passwords have been cleared.",
"optional": true,
"parameters": []
}
]
},
{
"name": "removeWebSQL",
"description": "Clears websites' WebSQL data.",
"type": "function",
"parameters": [
{
"$ref": "RemovalOptions",
"name": "options"
},
{
"name": "callback",
"type": "function",
"description": "Called when websites' WebSQL databases have been cleared.",
"optional": true,
"parameters": []
}
]
}
],
"dependencies": [
"permission:browsingData"
]
},
{
"namespace": "commands",
"description": "Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension.",
"types": [
{
"id": "Command",
"type": "object",
"properties": {
"name": {
"type": "string",
"optional": true,
"description": "The name of the Extension Command"
},
"description": {
"type": "string",
"optional": true,
"description": "The Extension Command description"
},
"shortcut": {
"type": "string",
"optional": true,
"description": "The shortcut active for this command, or blank if not active."
}
}
}
],
"events": [
{
"name": "onCommand",
"description": "Fired when a registered command is activated using a keyboard shortcut.",
"type": "function",
"parameters": [
{
"name": "command",
"type": "string"
}
]
}
],
"functions": [
{
"name": "getAll",
"type": "function",
"description": "Returns all the registered extension commands for this extension and their shortcut (if active).",
"parameters": [
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "commands",
"type": "array",
"items": {
"$ref": "Command"
}
}
],
"description": "Called to return the registered commands."
}
]
}
],
"dependencies": [
"manifest:commands"
]
},
{
"namespace": "contentSettings",
"description": "Use the <code>chrome.contentSettings</code> API to change settings that control whether websites can use features such as cookies, JavaScript, and plugins. More generally speaking, content settings allow you to customize Chrome's behavior on a per-site basis instead of globally.",
"compiler_options": {
"generate_type_functions": true
},
"types": [
{
"id": "ResourceIdentifier",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The resource identifier for the given content type."
},
"description": {
"type": "string",
"optional": true,
"description": "A human readable description of the resource."
}
},
"description": "The only content type using resource identifiers is $(ref:contentSettings.plugins). For more information, see <a href=\"contentSettings#resource-identifiers\">Resource Identifiers</a>."
},
{
"id": "Scope",
"type": "string",
"enum": [
"regular",
"incognito_session_only"
],
"description": "The scope of the ContentSetting. One of<br><var>regular</var>: setting for regular profile (which is inherited by the incognito profile if not overridden elsewhere),<br><var>incognito_session_only</var>: setting for incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular settings)."
},
{
"id": "ContentSetting",
"js_module": "ContentSetting",
"type": "object",
"functions": [
{
"name": "clear",