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..df9bc2ca098762cd2956c86588d58e92c1803f81 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,29 @@ 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) { |
Ted C
2015/10/28 23:41:02
I think you'll want the same early exit here with
Nate Chapin
2015/10/30 20:41:34
toDifferentDocument isn't actually plumbed from th
|
+ 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); |