| Index: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
|
| index 4437ee335deeecbd5e3a7e45dcefb2f9494a7291..e43f9c7389194a7b613c350553ddde8e307738b5 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
|
| @@ -38,6 +38,7 @@
|
| #include "core/dom/Document.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/LocalFrame.h"
|
| +#include "core/frame/LocalFrameClient.h"
|
| #include "core/frame/Settings.h"
|
| #include "core/frame/VisualViewport.h"
|
| #include "core/html/HTMLFrameOwnerElement.h"
|
| @@ -380,6 +381,11 @@ Response InspectorPageAgent::enable() {
|
| enabled_ = true;
|
| state_->setBoolean(PageAgentState::kPageAgentEnabled, true);
|
| instrumenting_agents_->addInspectorPageAgent(this);
|
| +
|
| + // Tell the browser the ids for all existing frames.
|
| + for (LocalFrame* frame : *inspected_frames_) {
|
| + frame->Client()->SetDevToolsFrameId(FrameId(frame));
|
| + }
|
| return Response::OK();
|
| }
|
|
|
| @@ -674,8 +680,10 @@ void InspectorPageAgent::FrameAttachedToParent(LocalFrame* frame) {
|
| parent_frame = 0;
|
| std::unique_ptr<SourceLocation> location =
|
| SourceLocation::CaptureWithFullStackTrace();
|
| + String frame_id = FrameId(frame);
|
| + frame->Client()->SetDevToolsFrameId(frame_id);
|
| GetFrontend()->frameAttached(
|
| - FrameId(frame), FrameId(ToLocalFrame(parent_frame)),
|
| + frame_id, FrameId(ToLocalFrame(parent_frame)),
|
| location ? location->BuildInspectorObject() : nullptr);
|
| }
|
|
|
|
|