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

Unified Diff: extensions/renderer/dispatcher.cc

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 | « no previous file | extensions/renderer/extension_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 71971591816fb86c06c8a44bc5cda5816f496628..6098ee91e4d3e5607055112a75897ad4768e8ee0 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -391,7 +391,6 @@ void Dispatcher::DispatchEvent(const std::string& extension_id,
// Needed for Windows compilation, since kEventBindings is declared extern.
const char* local_event_bindings = kEventBindings;
script_context_set_.ForEach(extension_id,
- NULL, // all render views
base::Bind(&CallModuleMethod,
local_event_bindings,
kEventDispatchFunction,
@@ -576,7 +575,7 @@ void Dispatcher::OnDeliverMessage(int target_port_id, const Message& message) {
new RequestSender::ScopedTabID(request_sender(), it->second));
}
- MessagingBindings::DeliverMessage(script_context_set_.GetAll(),
+ MessagingBindings::DeliverMessage(script_context_set_,
target_port_id,
message,
NULL); // All render views.
@@ -594,20 +593,18 @@ void Dispatcher::OnDispatchOnConnect(
source_tab.GetInteger("id", &sender_tab_id);
port_to_tab_id_map_[target_port_id] = sender_tab_id;
- MessagingBindings::DispatchOnConnect(script_context_set_.GetAll(),
+ MessagingBindings::DispatchOnConnect(script_context_set_,
target_port_id,
channel_name,
source_tab,
- info.source_id,
- info.target_id,
- info.source_url,
+ info,
tls_channel_id,
NULL); // All render views.
}
void Dispatcher::OnDispatchOnDisconnect(int port_id,
const std::string& error_message) {
- MessagingBindings::DispatchOnDisconnect(script_context_set_.GetAll(),
+ MessagingBindings::DispatchOnDisconnect(script_context_set_,
port_id,
error_message,
NULL); // All render views.
@@ -842,7 +839,6 @@ void Dispatcher::EnableCustomElementWhiteList() {
void Dispatcher::UpdateBindings(const std::string& extension_id) {
script_context_set().ForEach(extension_id,
- NULL, // all render views
base::Bind(&Dispatcher::UpdateBindingsForContext,
base::Unretained(this)));
}
« no previous file with comments | « no previous file | extensions/renderer/extension_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698