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

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

Issue 1860743002: Add a flag to change when android's progress bar completes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing flag default 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/app/generated_resources.grd » ('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.toolbar; 5 package org.chromium.chrome.browser.toolbar;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.content.res.Configuration; 8 import android.content.res.Configuration;
9 import android.graphics.drawable.Drawable; 9 import android.graphics.drawable.Drawable;
10 import android.os.Handler; 10 import android.os.Handler;
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 private void updateLoadProgress(int progress) { 1142 private void updateLoadProgress(int progress) {
1143 // If it's a native page, progress bar is already hidden or being hidden , so don't update 1143 // If it's a native page, progress bar is already hidden or being hidden , so don't update
1144 // the value. 1144 // the value.
1145 // TODO(kkimlabs): Investigate back/forward navigation with native page & web content and 1145 // TODO(kkimlabs): Investigate back/forward navigation with native page & web content and
1146 // figure out the correct progress bar presentation. 1146 // figure out the correct progress bar presentation.
1147 Tab tab = mToolbarModel.getTab(); 1147 Tab tab = mToolbarModel.getTab();
1148 if (NativePageFactory.isNativePageUrl(tab.getUrl(), tab.isIncognito())) return; 1148 if (NativePageFactory.isNativePageUrl(tab.getUrl(), tab.isIncognito())) return;
1149 1149
1150 progress = Math.max(progress, MINIMUM_LOAD_PROGRESS); 1150 progress = Math.max(progress, MINIMUM_LOAD_PROGRESS);
1151 mToolbar.setLoadProgress(progress / 100f); 1151 mToolbar.setLoadProgress(progress / 100f);
1152 if (progress == 100) finishLoadProgress(true);
1152 } 1153 }
1153 1154
1154 private void finishLoadProgress(boolean delayed) { 1155 private void finishLoadProgress(boolean delayed) {
1155 mLoadProgressSimulator.cancel(); 1156 mLoadProgressSimulator.cancel();
1156 mToolbar.finishLoadProgress(delayed); 1157 mToolbar.finishLoadProgress(delayed);
1157 } 1158 }
1158 1159
1159 /** 1160 /**
1160 * Only start showing the progress bar if it is not already started. 1161 * Only start showing the progress bar if it is not already started.
1161 */ 1162 */
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 } 1219 }
1219 1220
1220 /** 1221 /**
1221 * Cancels simulating load progress. 1222 * Cancels simulating load progress.
1222 */ 1223 */
1223 public void cancel() { 1224 public void cancel() {
1224 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); 1225 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS);
1225 } 1226 }
1226 } 1227 }
1227 } 1228 }
OLDNEW
« no previous file with comments | « no previous file | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698