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

Unified Diff: chrome/browser/ui/ash/launcher/browser_status_monitor.cc

Issue 2660643003: Convert BrowserStatusMonitor 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/ui/ash/launcher/browser_status_monitor.cc
diff --git a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
index a9bc3f6888dc28a0f99b429b85908515784b37a2..4c7e7c2bf4c912066727cb1bf38e010ca60f1282 100644
--- a/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
+++ b/chrome/browser/ui/ash/launcher/browser_status_monitor.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/web_applications/web_app.h"
+#include "content/public/browser/navigation_handle.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/aura/window.h"
@@ -37,9 +38,12 @@ class BrowserStatusMonitor::LocalWebContentsObserver
~LocalWebContentsObserver() override {}
// content::WebContentsObserver
- void DidNavigateMainFrame(
- const content::LoadCommittedDetails& details,
- const content::FrameNavigateParams& params) override {
+ void DidFinishNavigation(
+ content::NavigationHandle* navigation_handle) override {
+ if (!navigation_handle->IsInMainFrame() ||
+ !navigation_handle->HasCommitted())
Mr4D (OOO till 08-26) 2017/01/30 16:28:25 Just checking: Is it guaranteed that we will be ca
jam 2017/01/30 16:36:59 This line is to keep parity between the old code:
+ return;
+
ChromeLauncherController::AppState state =
ChromeLauncherController::APP_STATE_INACTIVE;
Browser* browser = chrome::FindBrowserWithWebContents(web_contents());
« 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