summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_function_dispatcher.h
diff options
context:
space:
mode:
authorerikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 16:44:43 +0000
committererikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-04 16:44:43 +0000
commit9c45b718e0b24664945c98d7a6315e4666fe7c22 (patch)
tree8697f8b5890b4a0f6121a76adf17a00045943068 /chrome/browser/extensions/extension_function_dispatcher.h
parent79ae821680fd8d84cc567063ead475072b799bc9 (diff)
downloadchromium_src-9c45b718e0b24664945c98d7a6315e4666fe7c22.zip
chromium_src-9c45b718e0b24664945c98d7a6315e4666fe7c22.tar.gz
chromium_src-9c45b718e0b24664945c98d7a6315e4666fe7c22.tar.bz2
mole API - take 2
originally reviewed / committed as http://codereview.chromium.org/160276 TBR=mpcomplete,phadjan.jr Review URL: http://codereview.chromium.org/159854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function_dispatcher.h')
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h
index 0e79882..7a47b3f 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.h
+++ b/chrome/browser/extensions/extension_function_dispatcher.h
@@ -14,6 +14,7 @@
class Browser;
class ExtensionFunction;
+class ExtensionHost;
class Profile;
class RenderViewHost;
class RenderViewHostDelegate;
@@ -29,6 +30,7 @@ class ExtensionFunctionDispatcher {
class Delegate {
public:
virtual Browser* GetBrowser() = 0;
+ virtual ExtensionHost* GetExtensionHost() { return NULL; }
};
// The peer object allows us to notify ExtensionFunctions when we are
@@ -68,6 +70,10 @@ class ExtensionFunctionDispatcher {
// example, for positioning windows, or alert boxes, or creating tabs.
Browser* GetBrowser();
+ // Gets the ExtensionHost associated with this object. In the case of
+ // tab hosted extension pages, this will return NULL.
+ ExtensionHost* GetExtensionHost();
+
// Handle a malformed message. Possibly the result of an attack, so kill
// the renderer.
void HandleBadMessage(ExtensionFunction* api);