Chromium Code Reviews| Index: content/browser/devtools/render_frame_devtools_agent_host.cc |
| diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc |
| index 6646dcdbf47c312cb9b59f53c6a4341c49b66388..e4f987e93a055dd461bc90b75a06ba9dbffbf0be 100644 |
| --- a/content/browser/devtools/render_frame_devtools_agent_host.cc |
| +++ b/content/browser/devtools/render_frame_devtools_agent_host.cc |
| @@ -13,6 +13,7 @@ |
| #include "content/browser/child_process_security_policy_impl.h" |
| #include "content/browser/devtools/devtools_frame_trace_recorder.h" |
| #include "content/browser/devtools/devtools_protocol_handler.h" |
| +#include "content/browser/devtools/page_navigation_throttle.h" |
| #include "content/browser/devtools/protocol/browser_handler.h" |
| #include "content/browser/devtools/protocol/dom_handler.h" |
| #include "content/browser/devtools/protocol/emulation_handler.h" |
| @@ -345,6 +346,19 @@ void RenderFrameDevToolsAgentHost::OnBeforeNavigation( |
| agent_host->AboutToNavigate(navigation_handle); |
| } |
| +// static |
| +std::unique_ptr<NavigationThrottle> |
| +RenderFrameDevToolsAgentHost::GetThrottleForNavigation( |
| + NavigationHandle* navigation_handle) { |
| + RenderFrameDevToolsAgentHost* agent_host = |
| + FindAgentHost(navigation_handle->GetWebContents()); |
| + if (agent_host) { |
| + return agent_host->page_handler_->GetThrottleForNavigation( |
|
dgozman
2016/07/08 19:20:00
Not that page_handler_ may be null for subframes D
alex clarke (OOO till 29th)
2016/07/08 20:55:37
Done.
|
| + navigation_handle); |
| + } |
| + return nullptr; |
| +} |
| + |
| RenderFrameDevToolsAgentHost::RenderFrameDevToolsAgentHost( |
| RenderFrameHostImpl* host) |
| : browser_handler_(new devtools::browser::BrowserHandler()), |