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

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

Issue 2022313002: UI for the Data Saver InfoBar Promo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@infobarPromo
Patch Set: "tbansal comments" Created 4 years, 5 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/infobar/DataReductionPromoInfoBar.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.app.Activity; 7 import android.app.Activity;
8 import android.app.ActivityManager; 8 import android.app.ActivityManager;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 } else { 996 } else {
997 mIsFirstPageLoadStart = false; 997 mIsFirstPageLoadStart = false;
998 } 998 }
999 } 999 }
1000 1000
1001 @Override 1001 @Override
1002 public void onDidNavigateMainFrame(Tab tab, String url, String baseU rl, 1002 public void onDidNavigateMainFrame(Tab tab, String url, String baseU rl,
1003 boolean isNavigationToDifferentPage, boolean isFragmentNavig ation, 1003 boolean isNavigationToDifferentPage, boolean isFragmentNavig ation,
1004 int statusCode) { 1004 int statusCode) {
1005 DataReductionPromoInfoBar.maybeLaunchPromoInfoBar(ChromeTabbedAc tivity.this, 1005 DataReductionPromoInfoBar.maybeLaunchPromoInfoBar(ChromeTabbedAc tivity.this,
1006 tab.getWebContents(), url, isFragmentNavigation, statusC ode); 1006 tab.getWebContents(), url, tab.isShowingErrorPage(), isF ragmentNavigation,
1007 statusCode);
1007 } 1008 }
1008 }; 1009 };
1009 1010
1010 if (startIncognito) mTabModelSelectorImpl.selectModel(true); 1011 if (startIncognito) mTabModelSelectorImpl.selectModel(true);
1011 setTabModelSelector(mTabModelSelectorImpl); 1012 setTabModelSelector(mTabModelSelectorImpl);
1012 } 1013 }
1013 1014
1014 @Override 1015 @Override
1015 public void terminateIncognitoSession() { 1016 public void terminateIncognitoSession() {
1016 getTabModelSelector().getModel(true).closeAllTabs(); 1017 getTabModelSelector().getModel(true).closeAllTabs();
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 if (getActivityTab() != null) { 1428 if (getActivityTab() != null) {
1428 setStatusBarColor(getActivityTab(), getActivityTab().getThemeColor() ); 1429 setStatusBarColor(getActivityTab(), getActivityTab().getThemeColor() );
1429 } 1430 }
1430 } 1431 }
1431 1432
1432 @Override 1433 @Override
1433 protected void setStatusBarColor(Tab tab, int color) { 1434 protected void setStatusBarColor(Tab tab, int color) {
1434 super.setStatusBarColor(tab, isInOverviewMode() ? Color.BLACK : color); 1435 super.setStatusBarColor(tab, isInOverviewMode() ? Color.BLACK : color);
1435 } 1436 }
1436 } 1437 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/infobar/DataReductionPromoInfoBar.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698