Skip to content

Commit

Permalink
don't attach overlay handler when child frame is inspected
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Jul 12, 2019
1 parent 08ad13d commit c1b40d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/browser/devtools/render_frame_devtools_agent_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ bool RenderFrameDevToolsAgentHost::AttachSession(DevToolsSession* session) {
session->AddHandler(std::make_unique<protocol::InspectorHandler>());
session->AddHandler(std::make_unique<protocol::IOHandler>(GetIOContext()));
session->AddHandler(std::make_unique<protocol::MemoryHandler>());
RenderWidgetHostViewBase* view =
static_cast<RenderWidgetHostViewBase*>(web_contents()->GetMainFrame()->GetView());
if (!view->IsRenderWidgetHostViewChildFrame())
if (!frame_tree_node_ || !frame_tree_node_->parent())
session->AddHandler(std::make_unique<protocol::OverlayHandler>());
session->AddHandler(std::make_unique<protocol::NetworkHandler>(
Expand Down

0 comments on commit c1b40d0

Please sign in to comment.