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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 return false; | 162 return false; |
163 } | 163 } |
164 }; | 164 }; |
165 | 165 |
166 /** | 166 /** |
167 * Clear the show timeout if it is set. | 167 * Clear the show timeout if it is set. |
168 * @private | 168 * @private |
169 */ | 169 */ |
170 ButterBar.prototype.clearShowTimeout_ = function() { | 170 ButterBar.prototype.clearShowTimeout_ = function() { |
171 if (this.showTimeout_) { | 171 if (this.showTimeout_) { |
172 clearTimeout(this.hideTimeout_); | 172 clearTimeout(this.showTimeout_); |
173 this.showTimeout_ = null; | 173 this.showTimeout_ = null; |
174 } | 174 } |
175 }; | 175 }; |
176 | 176 |
177 /** | 177 /** |
178 * Clear the hide timeout if it is set. | 178 * Clear the hide timeout if it is set. |
179 * @private | 179 * @private |
180 */ | 180 */ |
181 ButterBar.prototype.clearHideTimeout_ = function() { | 181 ButterBar.prototype.clearHideTimeout_ = function() { |
182 if (this.hideTimeout_) { | 182 if (this.hideTimeout_) { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 } else { | 274 } else { |
275 this.showError_(strf(this.transferType_() + '_UNEXPECTED_ERROR', | 275 this.showError_(strf(this.transferType_() + '_UNEXPECTED_ERROR', |
276 event.error)); | 276 event.error)); |
277 } | 277 } |
278 break; | 278 break; |
279 | 279 |
280 default: | 280 default: |
281 console.log('Unknown "copy-progress" event reason: ' + event.reason); | 281 console.log('Unknown "copy-progress" event reason: ' + event.reason); |
282 } | 282 } |
283 }; | 283 }; |
OLD | NEW |