mirror of
https://github.com/electron/electron.git
synced 2026-01-28 08:48:14 -05:00
No more need to override DidFinishLoad
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user