summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_process_manager.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 02:34:08 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 02:34:08 +0000
commitf34e7963c796bda1eb7fd35f5eda0d878c2df4e6 (patch)
tree1c67e594a5d25adb0b842858f622e3038146b8b7 /chrome/browser/extensions/extension_process_manager.cc
parentb304b6162c3a78063f1ed775e33995d8f2205ed4 (diff)
downloadchromium_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/browser/extensions/extension_process_manager.cc')
-rw-r--r--chrome/browser/extensions/extension_process_manager.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_process_manager.cc b/chrome/browser/extensions/extension_process_manager.cc
index 410165f..7432102 100644
--- a/chrome/browser/extensions/extension_process_manager.cc
+++ b/chrome/browser/extensions/extension_process_manager.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -119,6 +119,17 @@ ExtensionHost* ExtensionProcessManager::CreatePopup(const GURL& url,
return CreateView(url, browser, ViewType::EXTENSION_POPUP);
}
+ExtensionHost* ExtensionProcessManager::CreateInfobar(Extension* extension,
+ const GURL& url,
+ Browser* browser) {
+ return CreateView(extension, url, browser, ViewType::EXTENSION_INFOBAR);
+}
+
+ExtensionHost* ExtensionProcessManager::CreateInfobar(const GURL& url,
+ Browser* browser) {
+ return CreateView(url, browser, ViewType::EXTENSION_INFOBAR);
+}
+
ExtensionHost* ExtensionProcessManager::CreateBackgroundHost(
Extension* extension, const GURL& url) {
ExtensionHost* host =