UNPKG

sinon-chrome

Version:

Mock of chrome extensions API for unit testing under nodejs

1,553 lines 511 kB
[ { "events": [ { "description": "Fired when an alarm has expired. Useful for transient background pages.", "name": "onAlarm", "parameters": [ { "$ref": "Alarm", "description": "The alarm that has expired.", "name": "name" } ], "type": "function" } ], "functions": [ { "description": "Creates an alarm. After the delay is expired, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.", "name": "create", "parameters": [ { "description": "Optional name to identify this alarm. Defaults to the empty string.", "name": "name", "optional": true, "type": "string" }, { "description": "Details about the alarm. The alarm first fires either at 'when' milliseconds past the epoch (if 'when' is provided), after 'delayInMinutes' minutes from the current time (if 'delayInMinutes' is provided instead), or after 'periodInMinutes' minutes from the current time (if only 'periodInMinutes' is provided). Users should never provide both 'when' and 'delayInMinutes'. If 'periodInMinutes' is provided, then the alarm recurs repeatedly after that many minutes.", "name": "alarmInfo", "properties": { "delayInMinutes": { "description": "Number of minutes from the current time after which the alarm should first fire.", "optional": true, "type": "number" }, "periodInMinutes": { "description": "Number of minutes after which the alarm should recur repeatedly.", "optional": true, "type": "number" }, "when": { "description": "Time when the alarm is scheduled to first fire, in milliseconds past the epoch.", "optional": true, "type": "number" } }, "type": "object" } ], "type": "function" }, { "async": "callback", "description": "Retrieves details about the specified alarm.", "name": "get", "parameters": [ { "description": "The name of the alarm to get. Defaults to the empty string.", "name": "name", "optional": true, "type": "string" }, { "name": "callback", "parameters": [ { "$ref": "Alarm", "name": "alarm", "optional": true } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Gets an array of all the alarms.", "name": "getAll", "parameters": [ { "name": "callback", "parameters": [ { "items": { "$ref": "Alarm" }, "name": "alarms", "type": "array" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears the alarm with the given name.", "name": "clear", "parameters": [ { "description": "The name of the alarm to clear. Defaults to the empty string.", "name": "name", "optional": true, "type": "string" }, { "name": "callback", "parameters": [ { "description": "Whether an alarm of the given name was found to clear.", "name": "wasCleared", "type": "boolean" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears all alarms.", "name": "clearAll", "parameters": [ { "name": "callback", "parameters": [ { "description": "Whether any alarm was found to clear.", "name": "wasCleared", "type": "boolean" } ], "type": "function" } ], "type": "function" } ], "namespace": "alarms", "permissions": [ "alarms" ], "types": [ { "id": "Alarm", "properties": { "name": { "description": "Name of this alarm.", "type": "string" }, "periodInMinutes": { "description": "When present, signals that the alarm triggers periodically after so many minutes.", "optional": true, "type": "number" }, "scheduledTime": { "description": "Time when the alarm is scheduled to fire, in milliseconds past the epoch.", "type": "number" } }, "type": "object" } ] }, { "description": "Use the <code>browser.bookmarks</code> API to create, organize, and otherwise manipulate bookmarks. Also see $(topic:override)[Override Pages], which you can use to create a custom Bookmark Manager page.", "events": [ { "description": "Fired when a bookmark or folder is created.", "name": "onCreated", "parameters": [ { "name": "id", "type": "string" }, { "$ref": "BookmarkTreeNode", "name": "bookmark" } ], "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.", "name": "onRemoved", "parameters": [ { "name": "id", "type": "string" }, { "name": "removeInfo", "properties": { "index": { "type": "integer" }, "node": { "$ref": "BookmarkTreeNode" }, "parentId": { "type": "string" } }, "type": "object" } ], "type": "function" }, { "description": "Fired when a bookmark or folder changes. <b>Note:</b> Currently, only title and url changes trigger this.", "name": "onChanged", "parameters": [ { "name": "id", "type": "string" }, { "name": "changeInfo", "properties": { "title": { "type": "string" }, "url": { "optional": true, "type": "string" } }, "type": "object" } ], "type": "function" }, { "description": "Fired when a bookmark or folder is moved to a different parent folder.", "name": "onMoved", "parameters": [ { "name": "id", "type": "string" }, { "name": "moveInfo", "properties": { "index": { "type": "integer" }, "oldIndex": { "type": "integer" }, "oldParentId": { "type": "string" }, "parentId": { "type": "string" } }, "type": "object" } ], "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().", "name": "onChildrenReordered", "parameters": [ { "name": "id", "type": "string" }, { "name": "reorderInfo", "properties": { "childIds": { "items": { "type": "string" }, "type": "array" } }, "type": "object" } ], "type": "function", "unsupported": true }, { "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.", "name": "onImportBegan", "parameters": [], "type": "function", "unsupported": true }, { "description": "Fired when a bookmark import session is ended.", "name": "onImportEnded", "parameters": [], "type": "function", "unsupported": true } ], "functions": [ { "async": "callback", "description": "Retrieves the specified BookmarkTreeNode(s).", "name": "get", "parameters": [ { "choices": [ { "type": "string" }, { "items": { "type": "string" }, "minItems": 1, "type": "array" } ], "description": "A single string-valued id, or an array of string-valued ids", "name": "idOrIdList" }, { "name": "callback", "parameters": [ { "items": { "$ref": "BookmarkTreeNode" }, "name": "results", "type": "array" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Retrieves the children of the specified BookmarkTreeNode id.", "name": "getChildren", "parameters": [ { "name": "id", "type": "string" }, { "name": "callback", "parameters": [ { "items": { "$ref": "BookmarkTreeNode" }, "name": "results", "type": "array" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Retrieves the recently added bookmarks.", "name": "getRecent", "parameters": [ { "description": "The maximum number of items to return.", "minimum": 1, "name": "numberOfItems", "type": "integer" }, { "name": "callback", "parameters": [ { "items": { "$ref": "BookmarkTreeNode" }, "name": "results", "type": "array" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Retrieves the entire Bookmarks hierarchy.", "name": "getTree", "parameters": [ { "name": "callback", "parameters": [ { "items": { "$ref": "BookmarkTreeNode" }, "name": "results", "type": "array" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Retrieves part of the Bookmarks hierarchy, starting at the specified node.", "name": "getSubTree", "parameters": [ { "description": "The ID of the root of the subtree to retrieve.", "name": "id", "type": "string" }, { "name": "callback", "parameters": [ { "items": { "$ref": "BookmarkTreeNode" }, "name": "results", "type": "array" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.", "name": "search", "parameters": [ { "choices": [ { "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles.", "type": "string" }, { "description": "An object specifying properties and values to match when searching. Produces bookmarks matching all properties.", "properties": { "query": { "description": "A string of words and quoted phrases that are matched against bookmark URLs and titles.", "optional": true, "type": "string" }, "title": { "description": "The title of the bookmark; matches verbatim.", "optional": true, "type": "string" }, "url": { "description": "The URL of the bookmark; matches verbatim. Note that folders have no URL.", "format": "url", "optional": true, "type": "string" } }, "type": "object" } ], "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.", "name": "query" }, { "name": "callback", "parameters": [ { "items": { "$ref": "BookmarkTreeNode" }, "name": "results", "type": "array" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.", "name": "create", "parameters": [ { "$ref": "CreateDetails", "name": "bookmark" }, { "name": "callback", "optional": true, "parameters": [ { "$ref": "BookmarkTreeNode", "name": "result" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Moves the specified BookmarkTreeNode to the provided location.", "name": "move", "parameters": [ { "name": "id", "type": "string" }, { "name": "destination", "properties": { "index": { "minimum": 0, "optional": true, "type": "integer" }, "parentId": { "optional": true, "type": "string" } }, "type": "object" }, { "name": "callback", "optional": true, "parameters": [ { "$ref": "BookmarkTreeNode", "name": "result" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "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.", "name": "update", "parameters": [ { "name": "id", "type": "string" }, { "name": "changes", "properties": { "title": { "optional": true, "type": "string" }, "url": { "optional": true, "type": "string" } }, "type": "object" }, { "name": "callback", "optional": true, "parameters": [ { "$ref": "BookmarkTreeNode", "name": "result" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Removes a bookmark or an empty bookmark folder.", "name": "remove", "parameters": [ { "name": "id", "type": "string" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Recursively removes a bookmark folder.", "name": "removeTree", "parameters": [ { "name": "id", "type": "string" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Imports bookmarks from an html bookmark file", "name": "import", "parameters": [ { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function", "unsupported": true }, { "async": "callback", "description": "Exports bookmarks to an html bookmark file", "name": "export", "parameters": [ { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function", "unsupported": true } ], "namespace": "bookmarks", "permissions": [ "bookmarks" ], "types": [ { "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).", "enum": [ "managed" ], "id": "BookmarkTreeNodeUnmodifiable", "type": "string" }, { "description": "Indicates the type of a BookmarkTreeNode, which can be one of bookmark, folder or separator.", "enum": [ "bookmark", "folder", "separator" ], "id": "BookmarkTreeNodeType", "type": "string" }, { "description": "A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder.", "id": "BookmarkTreeNode", "properties": { "children": { "description": "An ordered list of children of this node.", "items": { "$ref": "BookmarkTreeNode" }, "optional": true, "type": "array" }, "dateAdded": { "description": "When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>).", "optional": true, "type": "number" }, "dateGroupModified": { "description": "When the contents of this folder last changed, in milliseconds since the epoch.", "optional": true, "type": "number" }, "id": { "description": "The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted.", "type": "string" }, "index": { "description": "The 0-based position of this node within its parent folder.", "optional": true, "type": "integer" }, "parentId": { "description": "The <code>id</code> of the parent folder. Omitted for the root node.", "optional": true, "type": "string" }, "title": { "description": "The text displayed for the node.", "type": "string" }, "type": { "$ref": "BookmarkTreeNodeType", "description": "Indicates the type of the BookmarkTreeNode, which can be one of bookmark, folder or separator.", "optional": true }, "unmodifiable": { "$ref": "BookmarkTreeNodeUnmodifiable", "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).", "optional": true }, "url": { "description": "The URL navigated to when a user clicks the bookmark. Omitted for folders.", "optional": true, "type": "string" } }, "type": "object" }, { "description": "Object passed to the create() function.", "id": "CreateDetails", "properties": { "index": { "minimum": 0, "optional": true, "type": "integer" }, "parentId": { "description": "Defaults to the Other Bookmarks folder.", "optional": true, "type": "string" }, "title": { "optional": true, "type": "string" }, "type": { "$ref": "BookmarkTreeNodeType", "description": "Indicates the type of BookmarkTreeNode to create, which can be one of bookmark, folder or separator.", "optional": true }, "url": { "optional": true, "type": "string" } }, "type": "object" } ] }, { "description": "Use browser actions to put icons in the main browser toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.", "events": [ { "description": "Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.", "name": "onClicked", "parameters": [ { "$ref": "tabs.Tab", "name": "tab" } ], "type": "function" } ], "functions": [ { "async": "callback", "description": "Sets the title of the browser action. This shows up in the tooltip.", "name": "setTitle", "parameters": [ { "name": "details", "properties": { "tabId": { "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.", "optional": true, "type": "integer" }, "title": { "description": "The string the browser action should display when moused over.", "type": "string" } }, "type": "object" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Gets the title of the browser action.", "name": "getTitle", "parameters": [ { "name": "details", "properties": { "tabId": { "description": "Specify the tab to get the title from. If no tab is specified, the non-tab-specific title is returned.", "optional": true, "type": "integer" } }, "type": "object" }, { "name": "callback", "parameters": [ { "name": "result", "type": "string" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "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.", "name": "setIcon", "parameters": [ { "name": "details", "properties": { "imageData": { "choices": [ { "$ref": "ImageDataType" }, { "patternProperties": { "^[1-9]\\d*$": { "$ref": "ImageDataType" } }, "type": "object" } ], "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> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'", "optional": true }, "path": { "choices": [ { "type": "string" }, { "patternProperties": { "^[1-9]\\d*$": { "type": "string" } }, "type": "object" } ], "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> * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'", "optional": true }, "tabId": { "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.", "optional": true, "type": "integer" } }, "type": "object" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.", "name": "setPopup", "parameters": [ { "name": "details", "properties": { "popup": { "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown.", "type": "string" }, "tabId": { "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.", "minimum": 0, "optional": true, "type": "integer" } }, "type": "object" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Gets the html document set as the popup for this browser action.", "name": "getPopup", "parameters": [ { "name": "details", "properties": { "tabId": { "description": "Specify the tab to get the popup from. If no tab is specified, the non-tab-specific popup is returned.", "optional": true, "type": "integer" } }, "type": "object" }, { "name": "callback", "parameters": [ { "name": "result", "type": "string" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.", "name": "setBadgeText", "parameters": [ { "name": "details", "properties": { "tabId": { "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.", "optional": true, "type": "integer" }, "text": { "description": "Any number of characters can be passed, but only about four can fit in the space.", "type": "string" } }, "type": "object" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.", "name": "getBadgeText", "parameters": [ { "name": "details", "properties": { "tabId": { "description": "Specify the tab to get the badge text from. If no tab is specified, the non-tab-specific badge text is returned.", "optional": true, "type": "integer" } }, "type": "object" }, { "name": "callback", "parameters": [ { "name": "result", "type": "string" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Sets the background color for the badge.", "name": "setBadgeBackgroundColor", "parameters": [ { "name": "details", "properties": { "color": { "choices": [ { "type": "string" }, { "$ref": "ColorArray" } ], "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>." }, "tabId": { "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.", "optional": true, "type": "integer" } }, "type": "object" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Gets the background color of the browser action.", "name": "getBadgeBackgroundColor", "parameters": [ { "name": "details", "properties": { "tabId": { "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.", "optional": true, "type": "integer" } }, "type": "object" }, { "name": "callback", "parameters": [ { "$ref": "ColorArray", "name": "result" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Enables the browser action for a tab. By default, browser actions are enabled.", "name": "enable", "parameters": [ { "description": "The id of the tab for which you want to modify the browser action.", "minimum": 0, "name": "tabId", "optional": true, "type": "integer" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Disables the browser action for a tab.", "name": "disable", "parameters": [ { "description": "The id of the tab for which you want to modify the browser action.", "minimum": 0, "name": "tabId", "optional": true, "type": "integer" }, { "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": true, "description": "Opens the extension popup window in the active window.", "name": "openPopup", "parameters": [], "requireUserInput": true, "type": "function" } ], "namespace": "browserAction", "permissions": [ "manifest:browser_action" ], "types": [ { "id": "ColorArray", "items": { "maximum": 255, "minimum": 0, "type": "integer" }, "maxItems": 4, "minItems": 4, "type": "array" }, { "additionalProperties": { "type": "any" }, "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element).", "id": "ImageDataType", "isInstanceOf": "ImageData", "postprocess": "convertImageDataToURL", "type": "object" } ] }, { "description": "Use the <code>browser.browserSettings</code> API to control global settings of the browser.", "namespace": "browserSettings", "permissions": [ "browserSettings" ], "properties": { "allowPopupsForUserEvents": { "$ref": "types.Setting", "description": "Allows or disallows pop-up windows from opening in response to user events." }, "cacheEnabled": { "$ref": "types.Setting", "description": "Enables or disables the browser cache." }, "contextMenuShowEvent": { "$ref": "types.Setting", "description": "Controls after which mouse event context menus popup. This setting's value is of type ContextMenuMouseEvent, which has possible values of <code>mouseup</code> and <code>mousedown</code>." }, "homepageOverride": { "$ref": "types.Setting", "description": "Returns the value of the overridden home page. Read-only." }, "imageAnimationBehavior": { "$ref": "types.Setting", "description": "Controls the behaviour of image animation in the browser. This setting's value is of type ImageAnimationBehavior, defaulting to <code>normal</code>." }, "newTabPageOverride": { "$ref": "types.Setting", "description": "Returns the value of the overridden new tab page. Read-only." }, "webNotificationsDisabled": { "$ref": "types.Setting", "description": "Disables webAPI notifications." } }, "types": [ { "description": "How images should be animated in the browser.", "enum": [ "normal", "none", "once" ], "id": "ImageAnimationBehavior", "type": "string" }, { "description": "After which mouse event context menus should popup.", "enum": [ "mouseup", "mousedown" ], "id": "ContextMenuMouseEvent", "type": "string" } ] }, { "description": "Use the <code>chrome.browsingData</code> API to remove browsing data from a user's local profile.", "functions": [ { "async": "callback", "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.", "name": "settings", "parameters": [ { "name": "callback", "parameters": [ { "name": "result", "properties": { "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." }, "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>." }, "options": { "$ref": "RemovalOptions" } }, "type": "object" } ], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears various types of browsing data stored in a user's profile.", "name": "remove", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "$ref": "DataTypeSet", "description": "The set of data types to remove.", "name": "dataToRemove" }, { "description": "Called when deletion has completed.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears websites' appcache data.", "name": "removeAppcache", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when websites' appcache data has been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function", "unsupported": true }, { "async": "callback", "description": "Clears the browser's cache.", "name": "removeCache", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when the browser's cache has been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears the browser's cookies and server-bound certificates modified within a particular timeframe.", "name": "removeCookies", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when the browser's cookies and server-bound certificates have been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears the browser's list of downloaded files (<em>not</em> the downloaded files themselves).", "name": "removeDownloads", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when the browser's list of downloaded files has been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears websites' file system data.", "name": "removeFileSystems", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when websites' file systems have been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function", "unsupported": true }, { "async": "callback", "description": "Clears the browser's stored form data (autofill).", "name": "removeFormData", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when the browser's form data has been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears the browser's history.", "name": "removeHistory", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when the browser's history has cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears websites' IndexedDB data.", "name": "removeIndexedDB", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when websites' IndexedDB data has been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function", "unsupported": true }, { "async": "callback", "description": "Clears websites' local storage data.", "name": "removeLocalStorage", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when websites' local storage has been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears plugins' data.", "name": "removePluginData", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when plugins' data has been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears the browser's stored passwords.", "name": "removePasswords", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when the browser's passwords have been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function" }, { "async": "callback", "description": "Clears websites' WebSQL data.", "name": "removeWebSQL", "parameters": [ { "$ref": "RemovalOptions", "name": "options" }, { "description": "Called when websites' WebSQL databases have been cleared.", "name": "callback", "optional": true, "parameters": [], "type": "function" } ], "type": "function", "unsupported": true } ], "namespace": "browsingData", "permissions": [ "browsingData" ], "types": [ { "description": "Options that determine exactly what data will be removed.", "id": "RemovalOptions", "properties": { "hostnames": { "description": "Only remove data associated with these hostnames (only applies to cookies and localStorage).", "items": { "format": "hostname", "type": "string" }, "optional": true, "type": "array" }, "originTypes": { "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'.", "optional": true, "properties": { "extension": { "description": "Extensions and packaged applications a user has installed (be _really_ careful!).", "optional": true, "type": "boolean" }, "protectedWeb": { "description": "Websites that have been installed as hosted applications (be careful!).", "optional": true, "type": "boolean" }, "unprotectedWeb": { "description": "Normal websites.", "optional": true, "type": "boolean" }