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.toolbar; | 5 package org.chromium.chrome.browser.toolbar; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.graphics.drawable.Drawable; | 8 import android.graphics.drawable.Drawable; |
9 import android.os.Handler; | 9 import android.os.Handler; |
10 import android.os.Looper; | 10 import android.os.Looper; |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 sendEmptyMessageDelayed(MSG_ID_UPDATE_PROGRESS, PROGRESS_INC
REMENT_DELAY_MS); | 1055 sendEmptyMessageDelayed(MSG_ID_UPDATE_PROGRESS, PROGRESS_INC
REMENT_DELAY_MS); |
1056 } | 1056 } |
1057 }; | 1057 }; |
1058 } | 1058 } |
1059 | 1059 |
1060 /** | 1060 /** |
1061 * Start simulating load progress from a baseline of 0. | 1061 * Start simulating load progress from a baseline of 0. |
1062 */ | 1062 */ |
1063 public void start() { | 1063 public void start() { |
1064 mProgress = 0.0f; | 1064 mProgress = 0.0f; |
| 1065 mToolbar.startLoadProgress(); |
1065 mToolbar.setLoadProgress(mProgress); | 1066 mToolbar.setLoadProgress(mProgress); |
1066 mToolbar.startLoadProgress(); | |
1067 mHandler.sendEmptyMessage(MSG_ID_UPDATE_PROGRESS); | 1067 mHandler.sendEmptyMessage(MSG_ID_UPDATE_PROGRESS); |
1068 } | 1068 } |
1069 | 1069 |
1070 /** | 1070 /** |
1071 * Cancels simulating load progress. | 1071 * Cancels simulating load progress. |
1072 */ | 1072 */ |
1073 public void cancel() { | 1073 public void cancel() { |
1074 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); | 1074 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); |
1075 } | 1075 } |
1076 } | 1076 } |
1077 } | 1077 } |
OLD | NEW |