mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 14:57:32 +09:00
Issue #303 Part 1: Move basilisk files from /browser to /application/basilisk
This commit is contained in:
parent
a951f19dfd
commit
177b28a898
1938 changed files with 0 additions and 0 deletions
|
|
@ -0,0 +1,27 @@
|
|||
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
@ -0,0 +1,568 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "Permission",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"bookmarks"
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"namespace": "bookmarks",
|
||||
"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.",
|
||||
"permissions": ["bookmarks"],
|
||||
"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",
|
||||
"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",
|
||||
"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.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"parentId": {
|
||||
"type": "string",
|
||||
"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).",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "idOrIdList",
|
||||
"description": "A single string-valued id, or an array of string-valued ids",
|
||||
"choices": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "id"
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "results",
|
||||
"type": "array",
|
||||
"items": { "$ref": "BookmarkTreeNode"}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getRecent",
|
||||
"type": "function",
|
||||
"description": "Retrieves the recently added bookmarks.",
|
||||
"async": "callback",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"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",
|
||||
"format": "url",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "id"
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "removeTree",
|
||||
"type": "function",
|
||||
"description": "Recursively removes a bookmark folder.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "id"
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "import",
|
||||
"unsupported": true,
|
||||
"type": "function",
|
||||
"description": "Imports bookmarks from an html bookmark file",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "export",
|
||||
"unsupported": true,
|
||||
"type": "function",
|
||||
"description": "Exports bookmarks to an html bookmark file",
|
||||
"async": "callback",
|
||||
"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",
|
||||
"unsupported": true,
|
||||
"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",
|
||||
"unsupported": true,
|
||||
"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",
|
||||
"unsupported": true,
|
||||
"type": "function",
|
||||
"description": "Fired when a bookmark import session is ended.",
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,430 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "WebExtensionManifest",
|
||||
"properties": {
|
||||
"browser_action": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "UnrecognizedProperty" },
|
||||
"properties": {
|
||||
"default_title": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"preprocess": "localize"
|
||||
},
|
||||
"default_icon": {
|
||||
"$ref": "IconPath",
|
||||
"optional": true
|
||||
},
|
||||
"default_popup": {
|
||||
"type": "string",
|
||||
"format": "relativeUrl",
|
||||
"optional": true,
|
||||
"preprocess": "localize"
|
||||
},
|
||||
"browser_style": {
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"namespace": "browserAction",
|
||||
"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.",
|
||||
"permissions": ["manifest:browser_action"],
|
||||
"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" },
|
||||
"postprocess": "convertImageDataToURL",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getTitle",
|
||||
"type": "function",
|
||||
"description": "Gets the title of the browser action.",
|
||||
"async": "callback",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"imageData": {
|
||||
"choices": [
|
||||
{ "$ref": "ImageDataType" },
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "ImageDataType"}
|
||||
}
|
||||
],
|
||||
"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> * 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}'"
|
||||
},
|
||||
"path": {
|
||||
"choices": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": {"type": "string"}
|
||||
}
|
||||
],
|
||||
"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> * 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}'"
|
||||
},
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getPopup",
|
||||
"type": "function",
|
||||
"description": "Gets the html document set as the popup for this browser action.",
|
||||
"async": "callback",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"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."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getBadgeBackgroundColor",
|
||||
"type": "function",
|
||||
"description": "Gets the background color of the browser action.",
|
||||
"async": "callback",
|
||||
"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.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"name": "tabId",
|
||||
"minimum": 0,
|
||||
"description": "The id of the tab for which you want to modify the browser action."
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "disable",
|
||||
"type": "function",
|
||||
"description": "Disables the browser action for a tab.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"name": "tabId",
|
||||
"minimum": 0,
|
||||
"description": "The id of the tab for which you want to modify the browser action."
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "openPopup",
|
||||
"type": "function",
|
||||
"description": "Opens the extension popup window in the active window but does not grant tab permissions.",
|
||||
"unsupported": true,
|
||||
"async": "callback",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"id": "KeyName",
|
||||
"choices": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^\\s*(Alt|Ctrl|Command|MacCtrl)\\s*\\+\\s*(Shift\\s*\\+\\s*)?([A-Z0-9]|Comma|Period|Home|End|PageUp|PageDown|Space|Insert|Delete|Up|Down|Left|Right)\\s*$"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^(MediaNextTrack|MediaPlayPause|MediaPrevTrack|MediaStop)$"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"$extend": "WebExtensionManifest",
|
||||
"properties": {
|
||||
"commands": {
|
||||
"type": "object",
|
||||
"optional": true,
|
||||
"additionalProperties": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "UnrecognizedProperty" },
|
||||
"properties": {
|
||||
"suggested_key": {
|
||||
"type": "object",
|
||||
"optional": true,
|
||||
"properties": {
|
||||
"default": {
|
||||
"$ref": "KeyName",
|
||||
"optional": true
|
||||
},
|
||||
"mac": {
|
||||
"$ref": "KeyName",
|
||||
"optional": true
|
||||
},
|
||||
"linux": {
|
||||
"$ref": "KeyName",
|
||||
"optional": true
|
||||
},
|
||||
"windows": {
|
||||
"$ref": "KeyName",
|
||||
"optional": true
|
||||
},
|
||||
"chromeos": {
|
||||
"type": "string",
|
||||
"optional": true
|
||||
},
|
||||
"android": {
|
||||
"type": "string",
|
||||
"optional": true
|
||||
},
|
||||
"ios": {
|
||||
"type": "string",
|
||||
"optional": true
|
||||
},
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"deprecated": "Unknown platform name",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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 xtension.",
|
||||
"permissions": ["manifest:commands"],
|
||||
"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",
|
||||
"async": "callback",
|
||||
"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."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,424 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "Permission",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"contextMenus"
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"namespace": "contextMenus",
|
||||
"description": "Use the <code>browser.contextMenus</code> API to add items to the browser's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.",
|
||||
"permissions": ["contextMenus"],
|
||||
"properties": {
|
||||
"ACTION_MENU_TOP_LEVEL_LIMIT": {
|
||||
"value": 6,
|
||||
"description": "The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored."
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"id": "ContextType",
|
||||
"type": "string",
|
||||
"enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio", "launcher", "browser_action", "page_action"],
|
||||
"description": "The different contexts a menu can appear in. Specifying 'all' is equivalent to the combination of all other contexts except for 'launcher'. The 'launcher' context is only supported by apps and is used to add menu items to the context menu that appears when clicking on the app icon in the launcher/taskbar/dock/etc. Different platforms might put limitations on what is actually supported in a launcher context menu."
|
||||
},
|
||||
{
|
||||
"id": "ItemType",
|
||||
"type": "string",
|
||||
"enum": ["normal", "checkbox", "radio", "separator"],
|
||||
"description": "The type of menu item."
|
||||
},
|
||||
{
|
||||
"id": "OnClickData",
|
||||
"type": "object",
|
||||
"description": "Information sent when a context menu item is clicked.",
|
||||
"properties": {
|
||||
"menuItemId": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "The ID of the menu item that was clicked."
|
||||
},
|
||||
"parentMenuItemId": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"optional": true,
|
||||
"description": "The parent ID, if any, for the item clicked."
|
||||
},
|
||||
"mediaType": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements."
|
||||
},
|
||||
"linkUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "If the element is a link, the URL it points to."
|
||||
},
|
||||
"srcUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "Will be present for elements with a 'src' URL."
|
||||
},
|
||||
"pageUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu."
|
||||
},
|
||||
"frameUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame."
|
||||
},
|
||||
"selectionText": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The text for the context selection, if any."
|
||||
},
|
||||
"editable": {
|
||||
"type": "boolean",
|
||||
"description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
|
||||
},
|
||||
"wasChecked": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "A flag indicating the state of a checkbox or radio item before it was clicked."
|
||||
},
|
||||
"checked": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "A flag indicating the state of a checkbox or radio item after it is clicked."
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"name": "create",
|
||||
"type": "function",
|
||||
"description": "Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in $(ref:runtime.lastError)).",
|
||||
"returns": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "The ID of the newly created item."
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"type": "object",
|
||||
"name": "createProperties",
|
||||
"properties": {
|
||||
"type": {
|
||||
"$ref": "ItemType",
|
||||
"optional": true,
|
||||
"description": "The type of menu item. Defaults to 'normal' if not specified."
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension."
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The text to be displayed in the item; this is <em>required</em> unless <code>type</code> 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\"."
|
||||
},
|
||||
"checked": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"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."
|
||||
},
|
||||
"contexts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "ContextType"
|
||||
},
|
||||
"minItems": 1,
|
||||
"optional": true,
|
||||
"description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified."
|
||||
},
|
||||
"onclick": {
|
||||
"type": "function",
|
||||
"optional": true,
|
||||
"description": "A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for $(ref:contextMenus.onClicked).",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "info",
|
||||
"$ref": "contextMenusInternal.OnClickData",
|
||||
"description": "Information about the item clicked and the context where the click happened."
|
||||
},
|
||||
{
|
||||
"name": "tab",
|
||||
"$ref": "tabs.Tab",
|
||||
"description": "The details of the tab where the click took place. Note: this parameter only present for extensions."
|
||||
}
|
||||
]
|
||||
},
|
||||
"parentId": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"optional": true,
|
||||
"description": "The ID of a parent menu item; this makes the item a child of a previously added item."
|
||||
},
|
||||
"documentUrlPatterns": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"optional": true,
|
||||
"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 $(topic:match_patterns)[Match Patterns]."
|
||||
},
|
||||
"targetUrlPatterns": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"optional": true,
|
||||
"description": "Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags."
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "Whether this context menu item is enabled or disabled. Defaults to true."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"description": "Called when the item has been created in the browser. If there were any problems creating the item, details will be available in $(ref:runtime.lastError).",
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "createInternal",
|
||||
"type": "function",
|
||||
"allowedContexts": ["addon_parent_only"],
|
||||
"async": "callback",
|
||||
"description": "Identical to contextMenus.create, except: the 'id' field is required and allows an integer, 'onclick' is not allowed, and the method is async (and the return value is not a menu item ID).",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "object",
|
||||
"name": "createProperties",
|
||||
"properties": {
|
||||
"type": {
|
||||
"$ref": "ItemType",
|
||||
"optional": true
|
||||
},
|
||||
"id": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
]
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"optional": true
|
||||
},
|
||||
"checked": {
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
},
|
||||
"contexts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "ContextType"
|
||||
},
|
||||
"minItems": 1,
|
||||
"optional": true
|
||||
},
|
||||
"parentId": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"optional": true
|
||||
},
|
||||
"documentUrlPatterns": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"optional": true
|
||||
},
|
||||
"targetUrlPatterns": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"optional": true
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "update",
|
||||
"type": "function",
|
||||
"description": "Updates a previously created context menu item.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"name": "id",
|
||||
"description": "The ID of the item to update."
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "updateProperties",
|
||||
"description": "The properties to update. Accepts the same values as the create function.",
|
||||
"properties": {
|
||||
"type": {
|
||||
"$ref": "ItemType",
|
||||
"optional": true
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"optional": true
|
||||
},
|
||||
"checked": {
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
},
|
||||
"contexts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "ContextType"
|
||||
},
|
||||
"minItems": 1,
|
||||
"optional": true
|
||||
},
|
||||
"onclick": {
|
||||
"type": "function",
|
||||
"optional": "omit-key-if-missing",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "info",
|
||||
"$ref": "contextMenusInternal.OnClickData"
|
||||
},
|
||||
{
|
||||
"name": "tab",
|
||||
"$ref": "tabs.Tab",
|
||||
"description": "The details of the tab where the click took place. Note: this parameter only present for extensions."
|
||||
}
|
||||
]
|
||||
},
|
||||
"parentId": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"optional": true,
|
||||
"description": "Note: You cannot change an item to be a child of one of its own descendants."
|
||||
},
|
||||
"documentUrlPatterns": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"optional": true
|
||||
},
|
||||
"targetUrlPatterns": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"},
|
||||
"optional": true
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": [],
|
||||
"description": "Called when the context menu has been updated."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "remove",
|
||||
"type": "function",
|
||||
"description": "Removes a context menu item.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"name": "menuItemId",
|
||||
"description": "The ID of the context menu item to remove."
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": [],
|
||||
"description": "Called when the context menu has been removed."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "removeAll",
|
||||
"type": "function",
|
||||
"description": "Removes all context menu items added by this extension.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": [],
|
||||
"description": "Called when removal is complete."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "onClicked",
|
||||
"type": "function",
|
||||
"description": "Fired when a context menu item is clicked.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "info",
|
||||
"$ref": "OnClickData",
|
||||
"description": "Information about the item clicked and the context where the click happened."
|
||||
},
|
||||
{
|
||||
"name": "tab",
|
||||
"$ref": "tabs.Tab",
|
||||
"description": "The details of the tab where the click took place. If the click did not take place in a tab, this parameter will be missing.",
|
||||
"optional": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "contextMenusInternal",
|
||||
"description": "Use the <code>browser.contextMenus</code> API to add items to the browser's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.",
|
||||
"types": [
|
||||
{
|
||||
"id": "OnClickData",
|
||||
"type": "object",
|
||||
"description": "Information sent when a context menu item is clicked.",
|
||||
"properties": {
|
||||
"menuItemId": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"description": "The ID of the menu item that was clicked."
|
||||
},
|
||||
"parentMenuItemId": {
|
||||
"choices": [
|
||||
{ "type": "integer" },
|
||||
{ "type": "string" }
|
||||
],
|
||||
"optional": true,
|
||||
"description": "The parent ID, if any, for the item clicked."
|
||||
},
|
||||
"mediaType": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements."
|
||||
},
|
||||
"linkUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "If the element is a link, the URL it points to."
|
||||
},
|
||||
"srcUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "Will be present for elements with a 'src' URL."
|
||||
},
|
||||
"pageUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu."
|
||||
},
|
||||
"frameUrl": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame."
|
||||
},
|
||||
"selectionText": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The text for the context selection, if any."
|
||||
},
|
||||
"editable": {
|
||||
"type": "boolean",
|
||||
"description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
|
||||
},
|
||||
"wasChecked": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "A flag indicating the state of a checkbox or radio item before it was clicked."
|
||||
},
|
||||
"checked": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "A flag indicating the state of a checkbox or radio item after it is clicked."
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,316 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "Permission",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"history"
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"namespace": "history",
|
||||
"description": "Use the <code>browser.history</code> API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see $(topic:override)[Override Pages].",
|
||||
"permissions": ["history"],
|
||||
"types": [
|
||||
{
|
||||
"id": "TransitionType",
|
||||
"type": "string",
|
||||
"enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated"],
|
||||
"description": "The $(topic:transition-types)[transition type] for this visit from its referrer."
|
||||
},
|
||||
{
|
||||
"id": "HistoryItem",
|
||||
"type": "object",
|
||||
"description": "An object encapsulating one result of a history query.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The unique identifier for the item."
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The URL navigated to by a user."
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The title of the page when it was last loaded."
|
||||
},
|
||||
"lastVisitTime": {
|
||||
"type": "number",
|
||||
"optional": true,
|
||||
"description": "When this page was last loaded, represented in milliseconds since the epoch."
|
||||
},
|
||||
"visitCount": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The number of times the user has navigated to this page."
|
||||
},
|
||||
"typedCount": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The number of times the user has navigated to this page by typing in the address."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "VisitItem",
|
||||
"type": "object",
|
||||
"description": "An object encapsulating one visit to a URL.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The unique identifier for the item."
|
||||
},
|
||||
"visitId": {
|
||||
"type": "string",
|
||||
"description": "The unique identifier for this visit."
|
||||
},
|
||||
"visitTime": {
|
||||
"type": "number",
|
||||
"optional": true,
|
||||
"description": "When this visit occurred, represented in milliseconds since the epoch."
|
||||
},
|
||||
"referringVisitId": {
|
||||
"type": "string",
|
||||
"description": "The visit ID of the referrer."
|
||||
},
|
||||
"transition": {
|
||||
"$ref": "TransitionType",
|
||||
"description": "The $(topic:transition-types)[transition type] for this visit from its referrer."
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"name": "search",
|
||||
"type": "function",
|
||||
"description": "Searches the history for the last visit time of each page matching the query.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "query",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "A free-text query to the history service. Leave empty to retrieve all pages."
|
||||
},
|
||||
"startTime": {
|
||||
"$ref": "extensionTypes.Date",
|
||||
"optional": true,
|
||||
"description": "Limit results to those visited after this date. If not specified, this defaults to 24 hours in the past."
|
||||
},
|
||||
"endTime": {
|
||||
"$ref": "extensionTypes.Date",
|
||||
"optional": true,
|
||||
"description": "Limit results to those visited before this date."
|
||||
},
|
||||
"maxResults": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"minimum": 1,
|
||||
"description": "The maximum number of results to retrieve. Defaults to 100."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "function",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "results",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "HistoryItem"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getVisits",
|
||||
"type": "function",
|
||||
"description": "Retrieves information about visits to a URL.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The URL for which to retrieve visit information. It must be in the format as returned from a call to history.search."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "function",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "results",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "VisitItem"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "addUrl",
|
||||
"type": "function",
|
||||
"description": "Adds a URL to the history with a default visitTime of the current time and a default $(topic:transition-types)[transition type] of \"link\".",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The URL to add. Must be a valid URL that can be added to history."
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The title of the page."
|
||||
},
|
||||
"transition": {
|
||||
"$ref": "TransitionType",
|
||||
"optional": true,
|
||||
"description": "The $(topic:transition-types)[transition type] for this visit from its referrer."
|
||||
},
|
||||
"visitTime": {
|
||||
"$ref": "extensionTypes.Date",
|
||||
"optional": true,
|
||||
"description": "The date when this visit occurred."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "function",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "deleteUrl",
|
||||
"type": "function",
|
||||
"description": "Removes all occurrences of the given URL from the history.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The URL to remove."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "function",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "deleteRange",
|
||||
"type": "function",
|
||||
"description": "Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "range",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"startTime": {
|
||||
"$ref": "extensionTypes.Date",
|
||||
"description": "Items added to history after this date."
|
||||
},
|
||||
"endTime": {
|
||||
"$ref": "extensionTypes.Date",
|
||||
"description": "Items added to history before this date."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "function",
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "deleteAll",
|
||||
"type": "function",
|
||||
"description": "Deletes all items from the history.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "callback",
|
||||
"type": "function",
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "onVisited",
|
||||
"type": "function",
|
||||
"description": "Fired when a URL is visited, providing the HistoryItem data for that URL. This event fires before the page has loaded.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "result",
|
||||
"$ref": "HistoryItem"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "onVisitRemoved",
|
||||
"type": "function",
|
||||
"description": "Fired when one or more URLs are removed from the history service. When all visits have been removed the URL is purged from history.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "removed",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allHistory": {
|
||||
"type": "boolean",
|
||||
"description": "True if all history was removed. If true, then urls will be empty."
|
||||
},
|
||||
"urls": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
16
application/basilisk/components/webextensions/schemas/jar.mn
Normal file
16
application/basilisk/components/webextensions/schemas/jar.mn
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
browser.jar:
|
||||
content/browser/schemas/bookmarks.json
|
||||
content/browser/schemas/browser_action.json
|
||||
content/browser/schemas/commands.json
|
||||
content/browser/schemas/context_menus.json
|
||||
content/browser/schemas/context_menus_internal.json
|
||||
content/browser/schemas/history.json
|
||||
content/browser/schemas/omnibox.json
|
||||
content/browser/schemas/page_action.json
|
||||
content/browser/schemas/sessions.json
|
||||
content/browser/schemas/tabs.json
|
||||
content/browser/schemas/windows.json
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
JAR_MANIFESTS += ['jar.mn']
|
||||
|
|
@ -0,0 +1,248 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "WebExtensionManifest",
|
||||
"properties": {
|
||||
"omnibox": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "UnrecognizedProperty" },
|
||||
"properties": {
|
||||
"keyword": {
|
||||
"type": "string",
|
||||
"pattern": "^[^?\\s:]([^\\s:]*[^/\\s:])?$"
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"namespace": "omnibox",
|
||||
"description": "The omnibox API allows you to register a keyword with Firefox's address bar.",
|
||||
"permissions": ["manifest:omnibox"],
|
||||
"types": [
|
||||
{
|
||||
"id": "DescriptionStyleType",
|
||||
"type": "string",
|
||||
"description": "The style type.",
|
||||
"enum": ["url", "match", "dim"]
|
||||
},
|
||||
{
|
||||
"id": "OnInputEnteredDisposition",
|
||||
"type": "string",
|
||||
"enum": ["currentTab", "newForegroundTab", "newBackgroundTab"],
|
||||
"description": "The window disposition for the omnibox query. This is the recommended context to display results. For example, if the omnibox command is to navigate to a certain URL, a disposition of 'newForegroundTab' means the navigation should take place in a new selected tab."
|
||||
},
|
||||
{
|
||||
"id": "SuggestResult",
|
||||
"type": "object",
|
||||
"description": "A suggest result.",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed match</match></dim>. You must escape the five predefined entities to display them as text: stackoverflow.com/a/1091953/89484 "
|
||||
},
|
||||
"descriptionStyles": {
|
||||
"optional": true,
|
||||
"unsupported": true,
|
||||
"type": "array",
|
||||
"description": "An array of style ranges for the description, as provided by the extension.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "The style ranges for the description, as provided by the extension.",
|
||||
"properties": {
|
||||
"offset": { "type": "integer" },
|
||||
"type": { "description": "The style type", "$ref": "DescriptionStyleType"},
|
||||
"length": { "type": "integer", "optional": true }
|
||||
}
|
||||
}
|
||||
},
|
||||
"descriptionStylesRaw": {
|
||||
"optional": true,
|
||||
"unsupported": true,
|
||||
"type": "array",
|
||||
"description": "An array of style ranges for the description, as provided by ToValue().",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "The style ranges for the description, as provided by ToValue().",
|
||||
"properties": {
|
||||
"offset": { "type": "integer" },
|
||||
"type": { "type": "integer" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "DefaultSuggestResult",
|
||||
"type": "object",
|
||||
"description": "A suggest result.",
|
||||
"properties": {
|
||||
"description": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"description": "The text that is displayed in the URL dropdown."
|
||||
},
|
||||
"descriptionStyles": {
|
||||
"optional": true,
|
||||
"unsupported": true,
|
||||
"type": "array",
|
||||
"description": "An array of style ranges for the description, as provided by the extension.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "The style ranges for the description, as provided by the extension.",
|
||||
"properties": {
|
||||
"offset": { "type": "integer" },
|
||||
"type": { "description": "The style type", "$ref": "DescriptionStyleType"},
|
||||
"length": { "type": "integer", "optional": true }
|
||||
}
|
||||
}
|
||||
},
|
||||
"descriptionStylesRaw": {
|
||||
"optional": true,
|
||||
"unsupported": true,
|
||||
"type": "array",
|
||||
"description": "An array of style ranges for the description, as provided by ToValue().",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "The style ranges for the description, as provided by ToValue().",
|
||||
"properties": {
|
||||
"offset": { "type": "integer" },
|
||||
"type": { "type": "integer" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"name": "setDefaultSuggestion",
|
||||
"type": "function",
|
||||
"description": "Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "suggestion",
|
||||
"$ref": "DefaultSuggestResult",
|
||||
"description": "A partial SuggestResult object, without the 'content' parameter."
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "onInputStarted",
|
||||
"type": "function",
|
||||
"description": "User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events.",
|
||||
"parameters": []
|
||||
},
|
||||
{
|
||||
"name": "onInputChanged",
|
||||
"type": "function",
|
||||
"description": "User has changed what is typed into the omnibox.",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "text"
|
||||
},
|
||||
{
|
||||
"name": "suggest",
|
||||
"type": "function",
|
||||
"description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "suggestResults",
|
||||
"type": "array",
|
||||
"description": "Array of suggest results",
|
||||
"items": {
|
||||
"$ref": "SuggestResult"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "onInputEntered",
|
||||
"type": "function",
|
||||
"description": "User has accepted what is typed into the omnibox.",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "text"
|
||||
},
|
||||
{
|
||||
"name": "disposition",
|
||||
"$ref": "OnInputEnteredDisposition"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "onInputCancelled",
|
||||
"type": "function",
|
||||
"description": "User has ended the keyword input session without accepting the input.",
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"namespace": "omnibox_internal",
|
||||
"description": "The internal namespace used by the omnibox API.",
|
||||
"defaultContexts": ["addon_parent_only"],
|
||||
"functions": [
|
||||
{
|
||||
"name": "addSuggestions",
|
||||
"type": "function",
|
||||
"async": "callback",
|
||||
"description": "Internal function used by omnibox.onInputChanged for adding search suggestions",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "integer",
|
||||
"description": "The ID of the callback received by onInputChangedInternal"
|
||||
},
|
||||
{
|
||||
"name": "suggestResults",
|
||||
"type": "array",
|
||||
"description": "Array of suggest results",
|
||||
"items": {
|
||||
"$ref": "omnibox.SuggestResult"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "onInputChanged",
|
||||
"type": "function",
|
||||
"description": "Identical to omnibox.onInputChanged except no 'suggest' callback is provided.",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,235 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "WebExtensionManifest",
|
||||
"properties": {
|
||||
"page_action": {
|
||||
"type": "object",
|
||||
"additionalProperties": { "$ref": "UnrecognizedProperty" },
|
||||
"properties": {
|
||||
"default_title": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"preprocess": "localize"
|
||||
},
|
||||
"default_icon": {
|
||||
"$ref": "IconPath",
|
||||
"optional": true
|
||||
},
|
||||
"default_popup": {
|
||||
"type": "string",
|
||||
"format": "relativeUrl",
|
||||
"optional": true,
|
||||
"preprocess": "localize"
|
||||
},
|
||||
"browser_style": {
|
||||
"type": "boolean",
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"namespace": "pageAction",
|
||||
"description": "Use the <code>browser.pageAction</code> API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages.",
|
||||
"permissions": ["manifest:page_action"],
|
||||
"types": [
|
||||
{
|
||||
"id": "ImageDataType",
|
||||
"type": "object",
|
||||
"isInstanceOf": "ImageData",
|
||||
"additionalProperties": { "type": "any" },
|
||||
"postprocess": "convertImageDataToURL",
|
||||
"description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element)."
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"name": "show",
|
||||
"type": "function",
|
||||
"async": "callback",
|
||||
"description": "Shows the page action. The page action is shown whenever the tab is selected.",
|
||||
"parameters": [
|
||||
{"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "hide",
|
||||
"type": "function",
|
||||
"async": "callback",
|
||||
"description": "Hides the page action.",
|
||||
"parameters": [
|
||||
{"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "setTitle",
|
||||
"type": "function",
|
||||
"description": "Sets the title of the page action. This is displayed in a tooltip over the page action.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
|
||||
"title": {"type": "string", "description": "The tooltip string."}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getTitle",
|
||||
"type": "function",
|
||||
"description": "Gets the title of the page action.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tabId": {
|
||||
"type": "integer",
|
||||
"description": "Specify the tab to get the title from."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "result",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "setIcon",
|
||||
"type": "function",
|
||||
"description": "Sets the icon for the page 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.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
|
||||
"imageData": {
|
||||
"choices": [
|
||||
{ "$ref": "ImageDataType" },
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": {"$ref": "ImageDataType"}
|
||||
}
|
||||
],
|
||||
"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> * 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}'"
|
||||
},
|
||||
"path": {
|
||||
"choices": [
|
||||
{ "type": "string" },
|
||||
{
|
||||
"type": "object",
|
||||
"additionalProperties": {"type": "string"}
|
||||
}
|
||||
],
|
||||
"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> * 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}'"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "setPopup",
|
||||
"type": "function",
|
||||
"async": true,
|
||||
"description": "Sets the html document to be opened as a popup when the user clicks on the page action's icon.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
|
||||
"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 page action.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"tabId": {
|
||||
"type": "integer",
|
||||
"description": "Specify the tab to get the popup from."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "result",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "onClicked",
|
||||
"type": "function",
|
||||
"description": "Fired when a page action icon is clicked. This event will not fire if the page action has a popup.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "tab",
|
||||
"$ref": "tabs.Tab"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
// Copyright 2013 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"$extend": "Permission",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"sessions"
|
||||
]
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"namespace": "sessions",
|
||||
"description": "Use the <code>chrome.sessions</code> API to query and restore tabs and windows from a browsing session.",
|
||||
"permissions": ["sessions"],
|
||||
"types": [
|
||||
{
|
||||
"id": "Filter",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"maxResults": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 25,
|
||||
"optional": true,
|
||||
"description": "The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries ($(ref:sessions.MAX_SESSION_RESULTS))."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "Session",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"lastModified": {"type": "integer", "description": "The time when the window or tab was closed or modified, represented in milliseconds since the epoch."},
|
||||
"tab": {"$ref": "tabs.Tab", "optional": true, "description": "The $(ref:tabs.Tab), if this entry describes a tab. Either this or $(ref:sessions.Session.window) will be set."},
|
||||
"window": {"$ref": "windows.Window", "optional": true, "description": "The $(ref:windows.Window), if this entry describes a window. Either this or $(ref:sessions.Session.tab) will be set."}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "Device",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"info": {"type": "string"},
|
||||
"deviceName": {"type": "string", "description": "The name of the foreign device."},
|
||||
"sessions": {"type": "array", "items": {"$ref": "Session"}, "description": "A list of open window sessions for the foreign device, sorted from most recently to least recently modified session."}
|
||||
}
|
||||
}
|
||||
],
|
||||
"functions": [
|
||||
{
|
||||
"name": "getRecentlyClosed",
|
||||
"type": "function",
|
||||
"description": "Gets the list of recently closed tabs and/or windows.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "Filter",
|
||||
"name": "filter",
|
||||
"optional": true,
|
||||
"default": {}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "sessions", "type": "array", "items": { "$ref": "Session" }, "description": "The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index <code>0</code>). The entries may contain either tabs or windows."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getDevices",
|
||||
"unsupported": true,
|
||||
"type": "function",
|
||||
"description": "Retrieves all devices with synced sessions.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "Filter",
|
||||
"name": "filter",
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "devices", "type": "array", "items": { "$ref": "Device" }, "description": "The list of $(ref:sessions.Device) objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. $(ref:tabs.Tab) objects are sorted by recency in the $(ref:windows.Window) of the $(ref:sessions.Session) objects."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "restore",
|
||||
"type": "function",
|
||||
"description": "Reopens a $(ref:windows.Window) or $(ref:tabs.Tab), with an optional callback to run when the entry has been restored.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "sessionId",
|
||||
"optional": true,
|
||||
"description": "The $(ref:windows.Window.sessionId), or $(ref:tabs.Tab.sessionId) to restore. If this parameter is not specified, the most recently closed session is restored."
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "Session",
|
||||
"name": "restoredSession",
|
||||
"description": "A $(ref:sessions.Session) containing the restored $(ref:windows.Window) or $(ref:tabs.Tab) object."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "onChanged",
|
||||
"unsupported": true,
|
||||
"description": "Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes.",
|
||||
"type": "function"
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"MAX_SESSION_RESULTS": {
|
||||
"value": 25,
|
||||
"description": "The maximum number of $(ref:sessions.Session) that will be included in a requested list."
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
1295
application/basilisk/components/webextensions/schemas/tabs.json
Normal file
1295
application/basilisk/components/webextensions/schemas/tabs.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,508 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "windows",
|
||||
"description": "Use the <code>browser.windows</code> API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser.",
|
||||
"types": [
|
||||
{
|
||||
"id": "WindowType",
|
||||
"type": "string",
|
||||
"description": "The type of browser window this is. Under some circumstances a Window may not be assigned type property, for example when querying closed windows from the $(ref:sessions) API.",
|
||||
"enum": ["normal", "popup", "panel", "app", "devtools"]
|
||||
},
|
||||
{
|
||||
"id": "WindowState",
|
||||
"type": "string",
|
||||
"description": "The state of this browser window. Under some circumstances a Window may not be assigned state property, for example when querying closed windows from the $(ref:sessions) API.",
|
||||
"enum": ["normal", "minimized", "maximized", "fullscreen", "docked"]
|
||||
},
|
||||
{
|
||||
"id": "Window",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"minimum": 0,
|
||||
"description": "The ID of the window. Window IDs are unique within a browser session. Under some circumstances a Window may not be assigned an ID, for example when querying windows using the $(ref:sessions) API, in which case a session ID may be present."
|
||||
},
|
||||
"focused": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the window is currently the focused window."
|
||||
},
|
||||
"top": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The offset of the window from the top edge of the screen in pixels. Under some circumstances a Window may not be assigned top property, for example when querying closed windows from the $(ref:sessions) API."
|
||||
},
|
||||
"left": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The offset of the window from the left edge of the screen in pixels. Under some circumstances a Window may not be assigned left property, for example when querying closed windows from the $(ref:sessions) API."
|
||||
},
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The width of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned width property, for example when querying closed windows from the $(ref:sessions) API."
|
||||
},
|
||||
"height": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The height of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned height property, for example when querying closed windows from the $(ref:sessions) API."
|
||||
},
|
||||
"tabs": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "tabs.Tab" },
|
||||
"optional": true,
|
||||
"description": "Array of $(ref:tabs.Tab) objects representing the current tabs in the window."
|
||||
},
|
||||
"incognito": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the window is incognito."
|
||||
},
|
||||
"type": {
|
||||
"$ref": "WindowType",
|
||||
"optional": true,
|
||||
"description": "The type of browser window this is."
|
||||
},
|
||||
"state": {
|
||||
"$ref": "WindowState",
|
||||
"optional": true,
|
||||
"description": "The state of this browser window."
|
||||
},
|
||||
"alwaysOnTop": {
|
||||
"type": "boolean",
|
||||
"description": "Whether the window is set to be always on top."
|
||||
},
|
||||
"sessionId": {
|
||||
"type": "string",
|
||||
"optional": true,
|
||||
"description": "The session ID used to uniquely identify a Window obtained from the $(ref:sessions) API."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "CreateType",
|
||||
"type": "string",
|
||||
"description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.",
|
||||
"enum": ["normal", "popup", "panel", "detached_panel"]
|
||||
}
|
||||
],
|
||||
"properties": {
|
||||
"WINDOW_ID_NONE": {
|
||||
"value": -1,
|
||||
"description": "The windowId value that represents the absence of a browser window."
|
||||
},
|
||||
"WINDOW_ID_CURRENT": {
|
||||
"value": -2,
|
||||
"description": "The windowId value that represents the $(topic:current-window)[current window]."
|
||||
}
|
||||
},
|
||||
"functions": [
|
||||
{
|
||||
"name": "get",
|
||||
"type": "function",
|
||||
"description": "Gets details about a window.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "windowId",
|
||||
"minimum": -2
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "getInfo",
|
||||
"optional": true,
|
||||
"description": "",
|
||||
"properties": {
|
||||
"populate": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
|
||||
},
|
||||
"windowTypes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "WindowType"
|
||||
},
|
||||
"optional": true,
|
||||
"description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "window",
|
||||
"$ref": "Window"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getCurrent",
|
||||
"type": "function",
|
||||
"description": "Gets the $(topic:current-window)[current window].",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "object",
|
||||
"name": "getInfo",
|
||||
"optional": true,
|
||||
"description": "",
|
||||
"properties": {
|
||||
"populate": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
|
||||
},
|
||||
"windowTypes": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "WindowType" },
|
||||
"optional": true,
|
||||
"description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "window",
|
||||
"$ref": "Window"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getLastFocused",
|
||||
"type": "function",
|
||||
"description": "Gets the window that was most recently focused — typically the window 'on top'.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "object",
|
||||
"name": "getInfo",
|
||||
"optional": true,
|
||||
"description": "",
|
||||
"properties": {
|
||||
"populate": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "If true, the $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
|
||||
},
|
||||
"windowTypes": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "WindowType" },
|
||||
"optional": true,
|
||||
"description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "window",
|
||||
"$ref": "Window"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "getAll",
|
||||
"type": "function",
|
||||
"description": "Gets all windows.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "object",
|
||||
"name": "getInfo",
|
||||
"optional": true,
|
||||
"description": "",
|
||||
"properties": {
|
||||
"populate": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "If true, each $(ref:windows.Window) object will have a <var>tabs</var> property that contains a list of the $(ref:tabs.Tab) objects for that window. The <code>Tab</code> objects only contain the <code>url</code>, <code>title</code> and <code>favIconUrl</code> properties if the extension's manifest file includes the <code>\"tabs\"</code> permission."
|
||||
},
|
||||
"windowTypes": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "WindowType" },
|
||||
"optional": true,
|
||||
"description": "If set, the $(ref:windows.Window) returned will be filtered based on its type. If unset the default filter is set to <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "windows",
|
||||
"type": "array",
|
||||
"items": { "$ref": "Window" }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "create",
|
||||
"type": "function",
|
||||
"description": "Creates (opens) a new browser with any optional sizing, position or default URL provided.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "object",
|
||||
"name": "createData",
|
||||
"optional": true,
|
||||
"default": {},
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "A URL or array of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.",
|
||||
"optional": true,
|
||||
"choices": [
|
||||
{ "type": "string", "format": "relativeUrl" },
|
||||
{
|
||||
"type": "array",
|
||||
"items": { "type": "string", "format": "relativeUrl" }
|
||||
}
|
||||
]
|
||||
},
|
||||
"tabId": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"optional": true,
|
||||
"description": "The id of the tab for which you want to adopt to the new window."
|
||||
},
|
||||
"left": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The number of pixels to position the new window from the left edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels."
|
||||
},
|
||||
"top": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels."
|
||||
},
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"optional": true,
|
||||
"description": "The width in pixels of the new window, including the frame. If not specified defaults to a natural width."
|
||||
},
|
||||
"height": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"optional": true,
|
||||
"description": "The height in pixels of the new window, including the frame. If not specified defaults to a natural height."
|
||||
},
|
||||
"focused": {
|
||||
"unsupported": true,
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "If true, opens an active window. If false, opens an inactive window."
|
||||
},
|
||||
"incognito": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "Whether the new window should be an incognito window."
|
||||
},
|
||||
"type": {
|
||||
"$ref": "CreateType",
|
||||
"optional": true,
|
||||
"description": "Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set."
|
||||
},
|
||||
"state": {
|
||||
"$ref": "WindowState",
|
||||
"optional": true,
|
||||
"description": "The initial state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'."
|
||||
},
|
||||
"allowScriptsToClose": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "Allow scripts to close the window."
|
||||
}
|
||||
},
|
||||
"optional": true
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": [
|
||||
{
|
||||
"name": "window",
|
||||
"$ref": "Window",
|
||||
"description": "Contains details about the created window.",
|
||||
"optional": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "update",
|
||||
"type": "function",
|
||||
"description": "Updates the properties of a window. Specify only the properties that you want to change; unspecified properties will be left unchanged.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "windowId",
|
||||
"minimum": -2
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "updateInfo",
|
||||
"properties": {
|
||||
"left": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The offset from the left edge of the screen to move the window to in pixels. This value is ignored for panels."
|
||||
},
|
||||
"top": {
|
||||
"type": "integer",
|
||||
"optional": true,
|
||||
"description": "The offset from the top edge of the screen to move the window to in pixels. This value is ignored for panels."
|
||||
},
|
||||
"width": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"optional": true,
|
||||
"description": "The width to resize the window to in pixels. This value is ignored for panels."
|
||||
},
|
||||
"height": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"optional": true,
|
||||
"description": "The height to resize the window to in pixels. This value is ignored for panels."
|
||||
},
|
||||
"focused": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "If true, brings the window to the front. If false, brings the next window in the z-order to the front."
|
||||
},
|
||||
"drawAttention": {
|
||||
"type": "boolean",
|
||||
"optional": true,
|
||||
"description": "If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request."
|
||||
},
|
||||
"state": {
|
||||
"$ref": "WindowState",
|
||||
"optional": true,
|
||||
"description": "The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": [
|
||||
{
|
||||
"name": "window",
|
||||
"$ref": "Window"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "remove",
|
||||
"type": "function",
|
||||
"description": "Removes (closes) a window, and all the tabs inside it.",
|
||||
"async": "callback",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "windowId",
|
||||
"minimum": 0
|
||||
},
|
||||
{
|
||||
"type": "function",
|
||||
"name": "callback",
|
||||
"optional": true,
|
||||
"parameters": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"name": "onCreated",
|
||||
"type": "function",
|
||||
"description": "Fired when a window is created.",
|
||||
"filters": [
|
||||
{
|
||||
"name": "windowTypes",
|
||||
"type": "array",
|
||||
"items": { "$ref": "WindowType" },
|
||||
"description": "Conditions that the window's type being created must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "Window",
|
||||
"name": "window",
|
||||
"description": "Details of the window that was created."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "onRemoved",
|
||||
"type": "function",
|
||||
"description": "Fired when a window is removed (closed).",
|
||||
"filters": [
|
||||
{
|
||||
"name": "windowTypes",
|
||||
"type": "array",
|
||||
"items": { "$ref": "WindowType" },
|
||||
"description": "Conditions that the window's type being removed must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "windowId",
|
||||
"minimum": 0,
|
||||
"description": "ID of the removed window."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "onFocusChanged",
|
||||
"type": "function",
|
||||
"description": "Fired when the currently focused window changes. Will be $(ref:windows.WINDOW_ID_NONE) if all browser windows have lost focus. Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one browser window to another.",
|
||||
"filters": [
|
||||
{
|
||||
"name": "windowTypes",
|
||||
"type": "array",
|
||||
"items": { "$ref": "WindowType" },
|
||||
"description": "Conditions that the window's type being removed must satisfy. By default it will satisfy <code>['app', 'normal', 'panel', 'popup']</code>, with <code>'app'</code> and <code>'panel'</code> window types limited to the extension's own windows."
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "windowId",
|
||||
"minimum": -1,
|
||||
"description": "ID of the newly focused window."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue