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

Unified Diff: extensions/renderer/messaging_bindings.h

Issue 327953002: Make MessagingBindings use ScriptContextSet::ForEach (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ForEach shortcuts Created 6 years, 6 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
« no previous file with comments | « extensions/renderer/extension_helper.cc ('k') | extensions/renderer/messaging_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/messaging_bindings.h
diff --git a/extensions/renderer/messaging_bindings.h b/extensions/renderer/messaging_bindings.h
index 721b4340404dd8ccf0953f8c8e490949b979451b..422dcae7ae9356f208f1cedea3471a3d7c142dda 100644
--- a/extensions/renderer/messaging_bindings.h
+++ b/extensions/renderer/messaging_bindings.h
@@ -9,6 +9,8 @@
#include "extensions/renderer/script_context_set.h"
+struct ExtensionMsg_ExternalConnectionInfo;
+
namespace base {
class DictionaryValue;
}
@@ -25,6 +27,7 @@ namespace extensions {
class Dispatcher;
struct Message;
class ObjectBackedNativeHandler;
+class ScriptContextSet;
// Manually implements JavaScript bindings for extension messaging.
//
@@ -38,29 +41,27 @@ class MessagingBindings {
ScriptContext* context);
// Dispatches the onConnect content script messaging event to some contexts
- // in |contexts|. If |restrict_to_render_view| is specified, only contexts in
- // that render view will receive the message.
- static void DispatchOnConnect(const ScriptContextSet::ContextSet& contexts,
+ // in |context_set|. If |restrict_to_render_view| is specified, only contexts
+ // in that render view will receive the message.
+ static void DispatchOnConnect(const ScriptContextSet& context_set,
int target_port_id,
const std::string& channel_name,
const base::DictionaryValue& source_tab,
- const std::string& source_extension_id,
- const std::string& target_extension_id,
- const GURL& source_url,
+ const ExtensionMsg_ExternalConnectionInfo& info,
const std::string& tls_channel_id,
content::RenderView* restrict_to_render_view);
// Delivers a message sent using content script messaging to some of the
// contexts in |bindings_context_set|. If |restrict_to_render_view| is
// specified, only contexts in that render view will receive the message.
- static void DeliverMessage(const ScriptContextSet::ContextSet& context_set,
+ static void DeliverMessage(const ScriptContextSet& context_set,
int target_port_id,
const Message& message,
content::RenderView* restrict_to_render_view);
// Dispatches the onDisconnect event in response to the channel being closed.
static void DispatchOnDisconnect(
- const ScriptContextSet::ContextSet& context_set,
+ const ScriptContextSet& context_set,
int port_id,
const std::string& error_message,
content::RenderView* restrict_to_render_view);
« no previous file with comments | « extensions/renderer/extension_helper.cc ('k') | extensions/renderer/messaging_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698