| Index: chrome/browser/ui/webui/inspect_ui.cc
|
| diff --git a/chrome/browser/ui/webui/inspect_ui.cc b/chrome/browser/ui/webui/inspect_ui.cc
|
| index 02a7116c176f9b6140220af38b16ef8220e817a3..48e8dba6f074b1e6db9b6dd9a903742f79ffb711 100644
|
| --- a/chrome/browser/ui/webui/inspect_ui.cc
|
| +++ b/chrome/browser/ui/webui/inspect_ui.cc
|
| @@ -20,6 +20,7 @@
|
| #include "components/ui_devtools/devtools_server.h"
|
| #include "content/public/browser/devtools_agent_host.h"
|
| #include "content/public/browser/navigation_entry.h"
|
| +#include "content/public/browser/navigation_handle.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_source.h"
|
| #include "content/public/browser/notification_types.h"
|
| @@ -286,9 +287,8 @@ class DevToolsUIBindingsEnabler
|
| private:
|
| // contents::WebContentsObserver overrides.
|
| void WebContentsDestroyed() override;
|
| - void DidNavigateMainFrame(
|
| - const content::LoadCommittedDetails& details,
|
| - const content::FrameNavigateParams& params) override;
|
| + void DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) override;
|
|
|
| DevToolsUIBindings bindings_;
|
| GURL url_;
|
| @@ -311,10 +311,12 @@ void DevToolsUIBindingsEnabler::WebContentsDestroyed() {
|
| delete this;
|
| }
|
|
|
| -void DevToolsUIBindingsEnabler::DidNavigateMainFrame(
|
| - const content::LoadCommittedDetails& details,
|
| - const content::FrameNavigateParams& params) {
|
| - if (url_ != params.url)
|
| +void DevToolsUIBindingsEnabler::DidFinishNavigation(
|
| + content::NavigationHandle* navigation_handle) {
|
| + if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
|
| + return;
|
| +
|
| + if (url_ != navigation_handle->GetURL())
|
| delete this;
|
| }
|
|
|
|
|