Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(879)

Unified Diff: chrome/renderer/extensions/dispatcher.h

Issue 15855010: Make ExtensionMsg_MessageInvoke run a module system function rather than a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: go Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/extensions/dispatcher.h
diff --git a/chrome/renderer/extensions/dispatcher.h b/chrome/renderer/extensions/dispatcher.h
index 44e80bf44e97ad21f503d2273b15fc36d3db76cf..d5b22e115e38b70c22eac817bb7d49669af37358 100644
--- a/chrome/renderer/extensions/dispatcher.h
+++ b/chrome/renderer/extensions/dispatcher.h
@@ -129,6 +129,18 @@ class Dispatcher : public content::RenderProcessObserver {
bool CheckContextAccessToExtensionAPI(
const std::string& function_name, ChromeV8Context* context) const;
+ // Dispatches the event named |event_name| to all render views.
+ void DispatchEvent(const std::string& extension_id,
+ const std::string& event_name) const;
+
+ // Calls a method |method_name| in a module |module_name| belonging to the
+ // module system from |context|. Intended as a callback target from
+ // ChromeV8ContextSet::ForEach. Public to be called from ExtensionHelper.
+ static void CallModuleMethod(const std::string& module_name,
+ const std::string& method_name,
+ const base::ListValue* args,
+ ChromeV8Context* context);
+
private:
friend class RenderViewTest;
FRIEND_TEST_ALL_PREFIXES(RendererPermissionsPolicyDelegateTest,
@@ -144,6 +156,7 @@ class Dispatcher : public content::RenderProcessObserver {
void OnSetChannel(int channel);
void OnMessageInvoke(const std::string& extension_id,
+ const std::string& module_name,
const std::string& function_name,
const base::ListValue& args,
bool user_gesture);

Powered by Google App Engine
This is Rietveld 408576698