1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 "namespace": "browserAction",
8 "description": "The browserAction API.",
9 "dependencies": [ "tabs" ],
27 "description": "Sets the title of the browser action. This shows up in the tooltip.",
35 "description": "The string the browser action should display when moused over."
40 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
49 "description": "Gets the title of the browser action.",
58 "description": "Specify the tab to get the title from. If no tab is specified, the non-tab-specific title is returned."
77 "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. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
85 "isInstanceOf": "ImageData",
86 "additionalProperties": { "type": "any" },
87 "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element).",
92 "description": "Relative path to an image in the extension to show in the browser action.",
98 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
107 "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
117 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
121 "description": "The html file to show in a popup. If set to the empty string (''), no popup is shown."
130 "description": "Gets the html document set as the popup for this browser action.",
139 "description": "Specify the tab to get the popup from. If no tab is specified, the non-tab-specific popup is returned."
156 "name": "setBadgeText",
158 "description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.",
166 "description": "Any number of characters can be passed, but only about four can fit in the space."
171 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
178 "name": "getBadgeText",
180 "description": "Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.",
189 "description": "Specify the tab to get the badge text from. If no tab is specified, the non-tab-specific badge text is returned."
206 "name": "setBadgeBackgroundColor",
208 "description": "Sets the background color for the badge.",
215 "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>.",
218 {"$ref": "ColorArray"}
224 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
231 "name": "getBadgeBackgroundColor",
233 "description": "Gets the background color of the browser action.",
242 "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."
263 "description": "Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.",