Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1249)

Unified Diff: chrome/browser/devtools/devtools_ui_bindings.cc

Issue 2660713002: Convert DevToolsUIBindings to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_ui_bindings.cc
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc
index aea197f17799bdc717b7b9366d59d0f1eba6b890..6909150f96729aea88238c987997e1fdfa6d91fc 100644
--- a/chrome/browser/devtools/devtools_ui_bindings.cc
+++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -449,9 +449,8 @@ class DevToolsUIBindings::FrontendWebContentsObserver
content::NavigationHandle* navigation_handle) override;
void DocumentAvailableInMainFrame() override;
void DocumentOnLoadCompletedInMainFrame() override;
- void DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) override;
+ void DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) override;
DevToolsUIBindings* devtools_bindings_;
DISALLOW_COPY_AND_ASSIGN(FrontendWebContentsObserver);
@@ -506,9 +505,8 @@ void DevToolsUIBindings::FrontendWebContentsObserver::RenderProcessGone(
void DevToolsUIBindings::FrontendWebContentsObserver::ReadyToCommitNavigation(
content::NavigationHandle* navigation_handle) {
- if (!navigation_handle->IsInMainFrame())
- return;
- devtools_bindings_->UpdateFrontendHost(navigation_handle);
+ if (navigation_handle->IsInMainFrame())
+ devtools_bindings_->UpdateFrontendHost(navigation_handle);
}
void DevToolsUIBindings::FrontendWebContentsObserver::
@@ -521,10 +519,10 @@ void DevToolsUIBindings::FrontendWebContentsObserver::
devtools_bindings_->DocumentOnLoadCompletedInMainFrame();
}
-void DevToolsUIBindings::FrontendWebContentsObserver::
- DidNavigateMainFrame(const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) {
- devtools_bindings_->DidNavigateMainFrame();
+void DevToolsUIBindings::FrontendWebContentsObserver::DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) {
+ if (navigation_handle->IsInMainFrame() && navigation_handle->HasCommitted())
+ devtools_bindings_->DidNavigateMainFrame();
}
// DevToolsUIBindings ---------------------------------------------------------
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698