OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 /** | 5 /** |
6 * The minimum about of time to display the butter bar for, in ms. | 6 * The minimum about of time to display the butter bar for, in ms. |
7 * Justification is 1000ms for minimum display time plus 300ms for transition | 7 * Justification is 1000ms for minimum display time plus 300ms for transition |
8 * duration. | 8 * duration. |
9 */ | 9 */ |
10 var MINIMUM_BUTTER_DISPLAY_TIME_MS = 1300; | 10 var MINIMUM_BUTTER_DISPLAY_TIME_MS = 1300; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 } | 198 } |
199 }; | 199 }; |
200 | 200 |
201 /** | 201 /** |
202 * @private | 202 * @private |
203 * @return {string?} The type of operation. | 203 * @return {string?} The type of operation. |
204 */ | 204 */ |
205 ButterBar.prototype.transferType_ = function() { | 205 ButterBar.prototype.transferType_ = function() { |
206 var progress = this.progress_; | 206 var progress = this.progress_; |
207 if (!progress || | 207 if (!progress || |
208 progress.pendingMoves === 0 && progress.pendingCopies === 0) | 208 progress.pendingMoves === 0 && progress.pendingCopies === 0 && |
| 209 progress.pendingZips === 0) |
209 return 'TRANSFER'; | 210 return 'TRANSFER'; |
210 | 211 |
| 212 if (progress.pendingZips > 0) { |
| 213 return 'ZIP'; |
| 214 } |
| 215 |
211 if (progress.pendingMoves > 0) { | 216 if (progress.pendingMoves > 0) { |
212 if (progress.pendingCopies > 0) | 217 if (progress.pendingCopies > 0) |
213 return 'TRANSFER'; | 218 return 'TRANSFER'; |
214 return 'MOVE'; | 219 return 'MOVE'; |
215 } | 220 } |
216 | 221 |
217 return 'COPY'; | 222 return 'COPY'; |
218 }; | 223 }; |
219 | 224 |
220 /** | 225 /** |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 } | 390 } |
386 }; | 391 }; |
387 | 392 |
388 /** | 393 /** |
389 * Undo the delete operation. | 394 * Undo the delete operation. |
390 * @private | 395 * @private |
391 */ | 396 */ |
392 ButterBar.prototype.undoDelete_ = function() { | 397 ButterBar.prototype.undoDelete_ = function() { |
393 this.copyManager_.cancelDeleteTask(this.deleteTaskId_); | 398 this.copyManager_.cancelDeleteTask(this.deleteTaskId_); |
394 }; | 399 }; |
OLD | NEW |