summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_function_dispatcher.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-24 22:02:19 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-24 22:02:19 +0000
commitc2732efe31f3ed2cefd9ef8ab35c71aed97d0a98 (patch)
tree8e57ebacf09b7a9fa4819b115fe7c7d0ca0a864b /chrome/browser/extensions/extension_function_dispatcher.h
parent2c533896e85de3047519c4890f6b22e824d77669 (diff)
downloadchromium_src-c2732efe31f3ed2cefd9ef8ab35c71aed97d0a98.zip
chromium_src-c2732efe31f3ed2cefd9ef8ab35c71aed97d0a98.tar.gz
chromium_src-c2732efe31f3ed2cefd9ef8ab35c71aed97d0a98.tar.bz2
Pass the ExtensionID to the ExtensionFunctionDispatcher.
This is needed for PageActions that deal with IDs, so that we can check if one PageAction is trying to change another PageAction. This converts the object ExtensionFunctionDispatcher in RenderViewHost from a member to a scoped ptr so we can reset it on navigate. BUG=None TEST=Extensions should work as before (no visible change). Review URL: http://codereview.chromium.org/93125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function_dispatcher.h')
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h
index 13057d8..ab3a07d 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.h
+++ b/chrome/browser/extensions/extension_function_dispatcher.h
@@ -22,7 +22,8 @@ class ExtensionFunctionDispatcher {
// Gets a list of all known extension function names.
static void GetAllFunctionNames(std::vector<std::string>* names);
- ExtensionFunctionDispatcher(RenderViewHost* render_view_host);
+ ExtensionFunctionDispatcher(RenderViewHost* render_view_host,
+ const std::string& extension_id);
// Handle a request to execute an extension function.
void HandleRequest(const std::string& name, const std::string& args,
@@ -35,11 +36,16 @@ class ExtensionFunctionDispatcher {
// the renderer.
void HandleBadMessage(ExtensionFunction* api);
+ // Gets the ID for this extension.
+ std::string extension_id() { return extension_id_; }
+
// The profile that this dispatcher is associated with.
Profile* profile();
private:
RenderViewHost* render_view_host_;
+
+ std::string extension_id_;
};
#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_FUNCTION_DISPATCHER_H_