Chromium Code Reviews| Index: content/browser/devtools/render_view_devtools_agent_host.cc |
| diff --git a/content/browser/devtools/render_view_devtools_agent_host.cc b/content/browser/devtools/render_view_devtools_agent_host.cc |
| index d9d8aaec0f83479e752bfefcf1168c7de0a50f9f..b9acb4f659d7ad74c04045df60f6c24eeb3fab4c 100644 |
| --- a/content/browser/devtools/render_view_devtools_agent_host.cc |
| +++ b/content/browser/devtools/render_view_devtools_agent_host.cc |
| @@ -112,6 +112,23 @@ void RenderViewDevToolsAgentHost::OnCancelPendingNavigation( |
| agent_host->ConnectRenderViewHost(current); |
| } |
| +// static |
| +bool RenderViewDevToolsAgentHost::DispatchIPCMessage( |
| + RenderViewHost* source, |
| + const IPC::Message& message) { |
| + if (g_instances == NULL) |
| + return false; |
| + RenderViewDevToolsAgentHost* agent_host = nullptr; |
| + for (Instances::iterator it = g_instances.Get().begin(); |
| + it != g_instances.Get().end(); ++it) { |
| + if (source == (*it)->render_view_host_) { |
| + agent_host = *it; |
| + break; |
| + } |
| + } |
| + return agent_host && agent_host->DispatchIPCMessage(message); |
| +} |
| + |
| RenderViewDevToolsAgentHost::RenderViewDevToolsAgentHost(RenderViewHost* rvh) |
| : render_view_host_(NULL), |
| dom_handler_(new devtools::dom::DOMHandler()), |
| @@ -329,17 +346,6 @@ void RenderViewDevToolsAgentHost::RenderProcessGone( |
| } |
| } |
| -bool RenderViewDevToolsAgentHost::OnMessageReceived( |
|
Charlie Reis
2014/11/20 23:11:10
Can all of your messages go through here instead?
yurys
2014/11/21 08:14:14
How can we force all messages go this path and not
Charlie Reis
2014/11/22 00:38:17
I think they have to be sent through RenderFrame{H
yurys
2014/11/24 13:19:30
Done.
|
| - const IPC::Message& message, |
| - RenderFrameHost* render_frame_host) { |
| - return DispatchIPCMessage(message); |
| -} |
| - |
| -bool RenderViewDevToolsAgentHost::OnMessageReceived( |
| - const IPC::Message& message) { |
| - return DispatchIPCMessage(message); |
| -} |
| - |
| void RenderViewDevToolsAgentHost::DidAttachInterstitialPage() { |
| page_handler_->DidAttachInterstitialPage(); |