diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 02:34:08 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 02:34:08 +0000 |
commit | f34e7963c796bda1eb7fd35f5eda0d878c2df4e6 (patch) | |
tree | 1c67e594a5d25adb0b842858f622e3038146b8b7 /chrome/common/extensions/api | |
parent | b304b6162c3a78063f1ed775e33995d8f2205ed4 (diff) | |
download | chromium_src-f34e7963c796bda1eb7fd35f5eda0d878c2df4e6.zip chromium_src-f34e7963c796bda1eb7fd35f5eda0d878c2df4e6.tar.gz chromium_src-f34e7963c796bda1eb7fd35f5eda0d878c2df4e6.tar.bz2 |
First cut at adding Extension Infobars to the experimental API.
Originally described here:
http://code.google.com/p/chromium/wiki/InfoBarExtensionAPI
The API is simple:
chrome.experimental.infoBar.show(
{"htmlPath": "infobar.html"}, function(window) {
// |window| is where the infobar was shown.
});
To close it, you can simply call window.close() from within the InfoBar (infoBar.hide is not provided).
The api is privileged (not available to content scripts directly).
The minimum height for the infobar is regular height for our infobars (32 pixels), maximum is twice that and the actual size is determined by the content (within these constraints mentioned).
See screenshot in bug. The icon on the far left is an extension icon with a dropdown menu showing the menu that shows when you right-click on the extension icon in the Omnibox/browser action container.
BUG=26463
TEST=None (for now).
Review URL: http://codereview.chromium.org/1049001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/api')
-rwxr-xr-x | chrome/common/extensions/api/extension_api.json | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json index c53700d..afdfc24 100755 --- a/chrome/common/extensions/api/extension_api.json +++ b/chrome/common/extensions/api/extension_api.json @@ -1392,6 +1392,44 @@ ] }, { + "namespace": "experimental.infoBar", + "types": [], + "functions": [ + { + "name": "show", + "type": "function", + "description": "Shows an infobar in the specified tab.", + "parameters": [ + { + "name": "details", + "type": "object", + "properties": { + "tabId": { + "type": "integer", + "description": "The tab id for the tab to display the infobar in. If not specified the current tab will be used.", + "optional": true + }, + "htmlPath": { + "type": "string", + "description": "The html file that contains the infobar." + } + } + }, + { + "type": "function", + "name": "callback", + "parameters": [ + { + "name": "window", "$ref": "Window", "description": "Contains details about the window in which the infobar was created.", + "optional": true + } + ] + } + ] + } + ] + }, + { "namespace": "bookmarks", "types": [ { |