summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 21:30:32 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-18 21:30:32 +0000
commitdf3bdcf1d352aeaf38218da358d3dbf387c92cde (patch)
treebe6580763293feca29d7ac0ab524cfef86034190 /chrome/browser/extensions
parent96e284571293e7706dc95acf919f2be8ac621127 (diff)
downloadchromium_src-df3bdcf1d352aeaf38218da358d3dbf387c92cde.zip
chromium_src-df3bdcf1d352aeaf38218da358d3dbf387c92cde.tar.gz
chromium_src-df3bdcf1d352aeaf38218da358d3dbf387c92cde.tar.bz2
Minor extension infobar changes.
Addressing review comments that were submitted after I checked in. BUG=26463 TEST=None Review URL: http://codereview.chromium.org/1097002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_host.h2
-rw-r--r--chrome/browser/extensions/extension_infobar_delegate.h4
-rw-r--r--chrome/browser/extensions/extension_infobar_module.cc9
-rw-r--r--chrome/browser/extensions/extension_infobar_module.h2
4 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index ad26e9f..509bc1f 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -99,7 +99,7 @@ class ExtensionHost : public RenderViewHostDelegate,
// Sets |url_| and navigates |render_view_host_|.
void NavigateToURL(const GURL& url);
- // Insert a default style sheet for Extension InfoBars.
+ // Insert a default style sheet for Extension Infobars.
void InsertInfobarCSS();
// Insert the theme CSS for a toolstrip/mole.
diff --git a/chrome/browser/extensions/extension_infobar_delegate.h b/chrome/browser/extensions/extension_infobar_delegate.h
index 485b288..483155e 100644
--- a/chrome/browser/extensions/extension_infobar_delegate.h
+++ b/chrome/browser/extensions/extension_infobar_delegate.h
@@ -12,8 +12,8 @@ class Extension;
class ExtensionHost;
class TabContents;
-// An interface derived from InfoBarDelegate to form the base interface for
-// extension InfoBars.
+// The InfobarDelegate for creating and managing state for the ExtensionInfobar
+// plus monitor when the extension goes away.
class ExtensionInfoBarDelegate : public InfoBarDelegate,
public NotificationObserver {
public:
diff --git a/chrome/browser/extensions/extension_infobar_module.cc b/chrome/browser/extensions/extension_infobar_module.cc
index 491b278..fb5b2ed 100644
--- a/chrome/browser/extensions/extension_infobar_module.cc
+++ b/chrome/browser/extensions/extension_infobar_module.cc
@@ -6,12 +6,14 @@
#include "app/l10n_util.h"
#include "chrome/browser/browser.h"
+#include "chrome/browser/extensions/extension_host.h"
#include "chrome/browser/extensions/extension_infobar_module_constants.h"
#include "chrome/browser/extensions/extension_infobar_delegate.h"
#include "chrome/browser/extensions/extension_tabs_module.h"
#include "chrome/browser/extensions/extension_tabs_module_constants.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/tab_contents/tab_contents.h"
+#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
#include "grit/generated_resources.h"
@@ -24,9 +26,8 @@ bool ShowInfoBarFunction::RunImpl() {
std::string html_path;
EXTENSION_FUNCTION_VALIDATE(args->GetString(keys::kHtmlPath, &html_path));
- GURL url = GURL(std::string(chrome::kExtensionScheme) +
- chrome::kStandardSchemeSeparator +
- extension_id() + "/" + html_path);
+ Extension* extension = dispatcher()->GetExtension();
+ GURL url = extension->GetResourceURL(extension->url(), html_path);
Browser* browser = dispatcher()->GetBrowser(true);
if (!browser) {
@@ -40,7 +41,7 @@ bool ShowInfoBarFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(args->GetInteger(keys::kTabId, &tab_id));
EXTENSION_FUNCTION_VALIDATE(ExtensionTabUtil::GetTabById(
- tab_id, browser->profile(), false, // No incognito.
+ tab_id, browser->profile(), true, // Allow infobar in incognito.
NULL, NULL, &tab_contents, NULL));
} else {
tab_contents = browser->GetSelectedTabContents();
diff --git a/chrome/browser/extensions/extension_infobar_module.h b/chrome/browser/extensions/extension_infobar_module.h
index 3414b19..e05dbf1 100644
--- a/chrome/browser/extensions/extension_infobar_module.h
+++ b/chrome/browser/extensions/extension_infobar_module.h
@@ -10,7 +10,7 @@
class ShowInfoBarFunction : public SyncExtensionFunction {
~ShowInfoBarFunction() {}
virtual bool RunImpl();
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.infoBar.show")
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.infobars.show")
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFOBAR_MODULE_H_