OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |