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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java

Issue 2642303002: PlzNavigate: Chrome UI changes for new methods of WebContentsObserver (Closed)
Patch Set: jam@ comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.ActivityManager; 10 import android.app.ActivityManager;
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 // Discard startup navigation measurements when the user interfe red and started the 1114 // Discard startup navigation measurements when the user interfe red and started the
1115 // 2nd navigation (in activity lifetime) in parallel. 1115 // 2nd navigation (in activity lifetime) in parallel.
1116 if (!mIsFirstPageLoadStart) { 1116 if (!mIsFirstPageLoadStart) {
1117 UmaUtils.setRunningApplicationStart(false); 1117 UmaUtils.setRunningApplicationStart(false);
1118 } else { 1118 } else {
1119 mIsFirstPageLoadStart = false; 1119 mIsFirstPageLoadStart = false;
1120 } 1120 }
1121 } 1121 }
1122 1122
1123 @Override 1123 @Override
1124 public void onDidNavigateMainFrame(Tab tab, String url, String baseU rl, 1124 public void onDidFinishNavigation(Tab tab, String url, boolean isInM ainFrame,
1125 boolean isNavigationToDifferentPage, boolean isFragmentNavig ation, 1125 boolean isErrorPage, boolean hasCommitted, boolean isSamePag e,
1126 int statusCode) { 1126 boolean isFragmentNavigation, Integer pageTransition, int er rorCode,
1127 DataReductionPromoInfoBar.maybeLaunchPromoInfoBar(ChromeTabbedAc tivity.this, 1127 int httpStatusCode) {
1128 tab.getWebContents(), url, tab.isShowingErrorPage(), isF ragmentNavigation, 1128 if (hasCommitted && isInMainFrame) {
1129 statusCode); 1129 DataReductionPromoInfoBar.maybeLaunchPromoInfoBar(ChromeTabb edActivity.this,
1130 tab.getWebContents(), url, tab.isShowingErrorPage(),
1131 isFragmentNavigation, httpStatusCode);
1132 }
1130 } 1133 }
1131 }; 1134 };
1132 1135
1133 if (startIncognito) mTabModelSelectorImpl.selectModel(true); 1136 if (startIncognito) mTabModelSelectorImpl.selectModel(true);
1134 1137
1135 return mTabModelSelectorImpl; 1138 return mTabModelSelectorImpl;
1136 } 1139 }
1137 1140
1138 @Override 1141 @Override
1139 protected Pair<TabbedModeTabCreator, TabbedModeTabCreator> createTabCreators () { 1142 protected Pair<TabbedModeTabCreator, TabbedModeTabCreator> createTabCreators () {
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 1827
1825 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT IVITY_SERVICE); 1828 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT IVITY_SERVICE);
1826 for (AppTask task : manager.getAppTasks()) { 1829 for (AppTask task : manager.getAppTasks()) {
1827 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task); 1830 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task);
1828 if (info == null) continue; 1831 if (info == null) continue;
1829 if (info.id == sMergedInstanceTaskId) return true; 1832 if (info.id == sMergedInstanceTaskId) return true;
1830 } 1833 }
1831 return false; 1834 return false;
1832 } 1835 }
1833 } 1836 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698