summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_function_dispatcher.h
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 06:28:15 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-11 06:28:15 +0000
commitc7ad50f409be00bda164b2f60c29e2733eed1c94 (patch)
treeaed183fbb1b944e6ef18c87e77cb49370ace834b /chrome/browser/extensions/extension_function_dispatcher.h
parent7e922f33d88905196067d901a14910a62c48ac21 (diff)
downloadchromium_src-c7ad50f409be00bda164b2f60c29e2733eed1c94.zip
chromium_src-c7ad50f409be00bda164b2f60c29e2733eed1c94.tar.gz
chromium_src-c7ad50f409be00bda164b2f60c29e2733eed1c94.tar.bz2
Don't allow updating tabs to javascript URLs without host
permissions to that tab. Cleaned up a few things along the way: - added a GetExtension() method to ExtensionFunctionDispatcher and ExtensionFunction since it was used in more than one place. - Removed first param from chrome.test.failCallback() since it wasn't used anywhere. - Added a convenience CanAccessHost() method to Extension, since it seems likely to be commonly used. - Refactored setup of mock host resolver in browsertest, since the way it was, you could only customize it at the testsuite level, not the test level. Review URL: http://codereview.chromium.org/199074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25971 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function_dispatcher.h')
-rw-r--r--chrome/browser/extensions/extension_function_dispatcher.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_function_dispatcher.h b/chrome/browser/extensions/extension_function_dispatcher.h
index 7a47b3f..492c431e 100644
--- a/chrome/browser/extensions/extension_function_dispatcher.h
+++ b/chrome/browser/extensions/extension_function_dispatcher.h
@@ -13,6 +13,7 @@
#include "googleurl/src/gurl.h"
class Browser;
+class Extension;
class ExtensionFunction;
class ExtensionHost;
class Profile;
@@ -74,6 +75,10 @@ class ExtensionFunctionDispatcher {
// tab hosted extension pages, this will return NULL.
ExtensionHost* GetExtensionHost();
+ // Gets the extension the function is being invoked by. This should not ever
+ // return NULL.
+ Extension* GetExtension();
+
// Handle a malformed message. Possibly the result of an attack, so kill
// the renderer.
void HandleBadMessage(ExtensionFunction* api);