| Index: chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
|
| index 34b00f9f4cdc7b4be6bfdd251ab2c78e1bab70de..f41900202c3d0c7b4a4483e8fd1dcb51b2dcdfde 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java
|
| @@ -310,36 +310,12 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe
|
|
|
| @Override
|
| public void onPageLoadStarted(Tab tab, String url) {
|
| - updateButtonStatus();
|
| - updateTabLoadingState(true);
|
| - mLoadProgressSimulator.cancel();
|
| -
|
| if (NativePageFactory.isNativePageUrl(url, tab.isIncognito())) {
|
| finishLoadProgress(false);
|
| - } else {
|
| - mToolbar.startLoadProgress();
|
| - setLoadProgress(0.0f);
|
| }
|
| }
|
|
|
| @Override
|
| - public void onPageLoadFinished(Tab tab) {
|
| - Tab currentTab = mToolbarModel.getTab();
|
| - updateTabLoadingState(true);
|
| -
|
| - // If we made some progress, fast-forward to complete, otherwise just dismiss any
|
| - // MINIMUM_LOAD_PROGRESS that had been set.
|
| - if (currentTab.getProgress() > MINIMUM_LOAD_PROGRESS) setLoadProgress(1.0f);
|
| - finishLoadProgress(true);
|
| - }
|
| -
|
| - @Override
|
| - public void onPageLoadFailed(Tab tab, int errorCode) {
|
| - updateTabLoadingState(true);
|
| - finishLoadProgress(false);
|
| - }
|
| -
|
| - @Override
|
| public void onTitleUpdated(Tab tab) {
|
| mLocationBar.setTitleToPageTitle();
|
| }
|
| @@ -363,6 +339,30 @@ public class ToolbarManager implements ToolbarTabController, UrlFocusChangeListe
|
| }
|
|
|
| @Override
|
| + public void onLoadStarted(Tab tab, boolean toDifferentDocument) {
|
| + if (!toDifferentDocument) return;
|
| + updateButtonStatus();
|
| + updateTabLoadingState(true);
|
| + mLoadProgressSimulator.cancel();
|
| +
|
| + mToolbar.startLoadProgress();
|
| + setLoadProgress(0.0f);
|
| + }
|
| +
|
| + @Override
|
| + public void onLoadStopped(Tab tab, boolean toDifferentDocument) {
|
| + if (!toDifferentDocument) return;
|
| + updateTabLoadingState(true);
|
| +
|
| + // If we made some progress, fast-forward to complete, otherwise just dismiss any
|
| + // MINIMUM_LOAD_PROGRESS that had been set.
|
| + if (tab.getProgress() > MINIMUM_LOAD_PROGRESS && tab.getProgress() < 1.0f) {
|
| + setLoadProgress(1.0f);
|
| + }
|
| + finishLoadProgress(true);
|
| + }
|
| +
|
| + @Override
|
| public void onLoadProgressChanged(Tab tab, int progress) {
|
| // TODO(kkimlabs): Investigate using float progress all the way up to Blink.
|
| setLoadProgress(progress / 100.0f);
|
|
|