diff options
author | rdevlin.cronin <rdevlin.cronin@chromium.org> | 2015-06-23 14:29:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-23 21:29:34 +0000 |
commit | c5d9a0ea754aba8264a36e59d2a60a6722fd56b3 (patch) | |
tree | 5164bed777068a3bee85414a81df97bc1e05574b /extensions/renderer/messaging_bindings.cc | |
parent | f148b2547d6914bc596a10791ceb795ffb838693 (diff) | |
download | chromium_src-c5d9a0ea754aba8264a36e59d2a60a6722fd56b3.zip chromium_src-c5d9a0ea754aba8264a36e59d2a60a6722fd56b3.tar.gz chromium_src-c5d9a0ea754aba8264a36e59d2a60a6722fd56b3.tar.bz2 |
[Extensions OOPI] Change ExtensionMsg_MessageInvoke to use RenderFrames
Change ExtensionMsg_MessageInvoke to use RenderFrames instead of RenderViews.
This also makes it easy to change ScriptContextSet to implement a ForEach with
RenderFrames.
BUG=455776
TBR=thestig@chromium.org (micro chrome_content_renderer_client change)
Review URL: https://codereview.chromium.org/1198203003
Cr-Commit-Position: refs/heads/master@{#335753}
Diffstat (limited to 'extensions/renderer/messaging_bindings.cc')
-rw-r--r-- | extensions/renderer/messaging_bindings.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/extensions/renderer/messaging_bindings.cc b/extensions/renderer/messaging_bindings.cc index be135e9..cbdd283 100644 --- a/extensions/renderer/messaging_bindings.cc +++ b/extensions/renderer/messaging_bindings.cc @@ -515,13 +515,9 @@ void MessagingBindings::DispatchOnConnect( const ExtensionMsg_ExternalConnectionInfo& info, const std::string& tls_channel_id, content::RenderFrame* restrict_to_render_frame) { - // TODO(robwu): ScriptContextSet.ForEach should accept RenderFrame*. - content::RenderView* restrict_to_render_view = - restrict_to_render_frame ? restrict_to_render_frame->GetRenderView() - : NULL; bool port_created = false; context_set.ForEach( - info.target_id, restrict_to_render_view, + info.target_id, restrict_to_render_frame, base::Bind(&DispatchOnConnectToScriptContext, target_port_id, channel_name, &source, info, tls_channel_id, &port_created)); @@ -539,12 +535,8 @@ void MessagingBindings::DeliverMessage( int target_port_id, const Message& message, content::RenderFrame* restrict_to_render_frame) { - // TODO(robwu): ScriptContextSet.ForEach should accept RenderFrame*. - content::RenderView* restrict_to_render_view = - restrict_to_render_frame ? restrict_to_render_frame->GetRenderView() - : NULL; context_set.ForEach( - restrict_to_render_view, + restrict_to_render_frame, base::Bind(&DeliverMessageToScriptContext, message, target_port_id)); } @@ -554,12 +546,8 @@ void MessagingBindings::DispatchOnDisconnect( int port_id, const std::string& error_message, content::RenderFrame* restrict_to_render_frame) { - // TODO(robwu): ScriptContextSet.ForEach should accept RenderFrame*. - content::RenderView* restrict_to_render_view = - restrict_to_render_frame ? restrict_to_render_frame->GetRenderView() - : NULL; context_set.ForEach( - restrict_to_render_view, + restrict_to_render_frame, base::Bind(&DispatchOnDisconnectToScriptContext, port_id, error_message)); } |