summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_host.h
diff options
context:
space:
mode:
authortwiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 01:59:11 +0000
committertwiz@google.com <twiz@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-10 01:59:11 +0000
commita95631cb9427e4d20c243dcd0f36da3fd3e7cb55 (patch)
tree09da2c4493a7303671961051b32718830c451ad7 /chrome/browser/extensions/extension_host.h
parent2007ad49132097b2a2eb10d0025361d1bf7a9340 (diff)
downloadchromium_src-a95631cb9427e4d20c243dcd0f36da3fd3e7cb55.zip
chromium_src-a95631cb9427e4d20c243dcd0f36da3fd3e7cb55.tar.gz
chromium_src-a95631cb9427e4d20c243dcd0f36da3fd3e7cb55.tar.bz2
A collection of fixes allowing the chrome.experimental.popup.* set of APIs to function in circumstances where there is no Browser instance present. This is a symptom of a tab-contents view hosted in an ExternalTabContainer.The major change here is the removal of the explicit dependency on a Browser instance across all of the delegates involved when showing a pop-up API. I modified the following delegates:- ExtensionPopupHost::Delegate- TabContentsDelegate- ExtensionFunctionDispatcher::DelegateBecause the pop-up requires a Profile, and a gfx::NativeWindow, I added methods to the above interfaces to provide them.BUG=noneTEST=ExtensionApiTest.FLAKY_Popup
Review URL: http://codereview.chromium.org/434046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_host.h')
-rw-r--r--chrome/browser/extensions/extension_host.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index 76f20d2..5a27030 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -65,7 +65,10 @@ class ExtensionHost : public ExtensionPopupHost::PopupDelegate,
void* view() const { return NULL; }
#endif
- // Create an ExtensionView and tie it to this host and |browser|.
+ // Create an ExtensionView and tie it to this host and |browser|. Note NULL
+ // is a valid argument for |browser|. Extension views may be bound to
+ // tab-contents hosted in ExternalTabContainer objects, which do not
+ // instantiate Browser objects.
void CreateView(Browser* browser);
Extension* extension() { return extension_; }
@@ -187,7 +190,7 @@ class ExtensionHost : public ExtensionPopupHost::PopupDelegate,
// If this ExtensionHost has a view, this returns the Browser that view is a
// part of. If this is a global background page, we use the active Browser
// instead.
- virtual Browser* GetBrowser();
+ virtual Browser* GetBrowser() const;
virtual ExtensionHost* GetExtensionHost() { return this; }
// ExtensionPopupHost::Delegate