diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 3242316989..5d109e123e 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -284,6 +284,11 @@ void InspectableWebContentsImpl::CloseWindow() { void InspectableWebContentsImpl::LoadCompleted() { frontend_loaded_ = true; + view_->ShowDevTools(); + + // If the devtools can dock, "SetIsDocked" will be called by devtools itself. + if (!can_dock_) + SetIsDocked(DispatchCallback(), false); } void InspectableWebContentsImpl::SetInspectedPageBounds(const gfx::Rect& rect) { @@ -482,18 +487,6 @@ void InspectableWebContentsImpl::AboutToNavigateRenderFrame( frontend_host_.reset(content::DevToolsFrontendHost::Create(new_host, this)); } -void InspectableWebContentsImpl::DidFinishLoad(content::RenderFrameHost* render_frame_host, - const GURL& validated_url) { - if (render_frame_host->GetParent()) - return; - - view_->ShowDevTools(); - - // If the devtools can dock, "SetIsDocked" will be called by devtools itself. - if (!can_dock_) - SetIsDocked(DispatchCallback(), false); -} - void InspectableWebContentsImpl::WebContentsDestroyed() { Observe(nullptr); Detach(); diff --git a/brightray/browser/inspectable_web_contents_impl.h b/brightray/browser/inspectable_web_contents_impl.h index aec9548b98..249d0867da 100644 --- a/brightray/browser/inspectable_web_contents_impl.h +++ b/brightray/browser/inspectable_web_contents_impl.h @@ -128,8 +128,6 @@ class InspectableWebContentsImpl : // content::WebContentsObserver: void AboutToNavigateRenderFrame(content::RenderFrameHost* old_host, content::RenderFrameHost* new_host) override; - void DidFinishLoad(content::RenderFrameHost* render_frame_host, - const GURL& validated_url) override; void WebContentsDestroyed() override; // content::WebContentsDelegate: