| 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.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.SearchManager; | 10 import android.app.SearchManager; |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 public void onHidden(Tab tab) { | 485 public void onHidden(Tab tab) { |
| 486 mLoFiBarPopupController.dismissLoFiBar(); | 486 mLoFiBarPopupController.dismissLoFiBar(); |
| 487 } | 487 } |
| 488 | 488 |
| 489 @Override | 489 @Override |
| 490 public void onDestroyed(Tab tab) { | 490 public void onDestroyed(Tab tab) { |
| 491 mLoFiBarPopupController.dismissLoFiBar(); | 491 mLoFiBarPopupController.dismissLoFiBar(); |
| 492 } | 492 } |
| 493 | 493 |
| 494 @Override | 494 @Override |
| 495 public void onLoadStopped(Tab tab) { | 495 public void onLoadStopped(Tab tab, boolean toDifferentDocument) { |
| 496 postDeferredStartupIfNeeded(); | 496 postDeferredStartupIfNeeded(); |
| 497 showUpdateInfoBarIfNecessary(); | 497 showUpdateInfoBarIfNecessary(); |
| 498 } | 498 } |
| 499 | 499 |
| 500 @Override | 500 @Override |
| 501 public void onPageLoadFinished(Tab tab) { | 501 public void onPageLoadFinished(Tab tab) { |
| 502 postDeferredStartupIfNeeded(); | 502 postDeferredStartupIfNeeded(); |
| 503 showUpdateInfoBarIfNecessary(); | 503 showUpdateInfoBarIfNecessary(); |
| 504 OfflinePageUtils.showOfflineSnackbarIfNecessary(ChromeActivity.t
his, tab); | 504 OfflinePageUtils.showOfflineSnackbarIfNecessary(ChromeActivity.t
his, tab); |
| 505 } | 505 } |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 public static int getThemeId() { | 1590 public static int getThemeId() { |
| 1591 boolean useLowEndTheme = | 1591 boolean useLowEndTheme = |
| 1592 SysUtils.isLowEndDevice() && Build.VERSION.SDK_INT >= Build.VERS
ION_CODES.LOLLIPOP; | 1592 SysUtils.isLowEndDevice() && Build.VERSION.SDK_INT >= Build.VERS
ION_CODES.LOLLIPOP; |
| 1593 return (useLowEndTheme ? R.style.MainTheme_LowEnd : R.style.MainTheme); | 1593 return (useLowEndTheme ? R.style.MainTheme_LowEnd : R.style.MainTheme); |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 private void setLowEndTheme() { | 1596 private void setLowEndTheme() { |
| 1597 if (getThemeId() == R.style.MainTheme_LowEnd) setTheme(R.style.MainTheme
_LowEnd); | 1597 if (getThemeId() == R.style.MainTheme_LowEnd) setTheme(R.style.MainTheme
_LowEnd); |
| 1598 } | 1598 } |
| 1599 } | 1599 } |
| OLD | NEW |