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

Unified Diff: chrome/browser/ui/cocoa/handoff_active_url_observer.cc

Issue 2682723002: Convert HandoffActiveURLObserver to use the new navigation callbacks. (Closed)
Patch Set: Created 3 years, 10 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 | « chrome/browser/ui/cocoa/handoff_active_url_observer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/handoff_active_url_observer.cc
diff --git a/chrome/browser/ui/cocoa/handoff_active_url_observer.cc b/chrome/browser/ui/cocoa/handoff_active_url_observer.cc
index ba154b25d8edcec69b1b345c15c1af16d0b111d8..ac38078ff826aff1efd268d2d70470e18e5939ab 100644
--- a/chrome/browser/ui/cocoa/handoff_active_url_observer.cc
+++ b/chrome/browser/ui/cocoa/handoff_active_url_observer.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/cocoa/handoff_active_url_observer_delegate.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
HandoffActiveURLObserver::HandoffActiveURLObserver(
@@ -48,9 +49,11 @@ void HandoffActiveURLObserver::ActiveTabChanged(
delegate_->HandoffActiveURLChanged(new_contents);
}
-void HandoffActiveURLObserver::DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) {
+void HandoffActiveURLObserver::DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) {
+ if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted())
+ return;
+
delegate_->HandoffActiveURLChanged(web_contents());
}
« no previous file with comments | « chrome/browser/ui/cocoa/handoff_active_url_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698