| 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 document.addEventListener('DOMContentLoaded', function() { | 5 document.addEventListener('DOMContentLoaded', function() { |
| 6 ActionChoice.load(); | 6 ActionChoice.load(); |
| 7 }); | 7 }); |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * The main ActionChoice object. | 10 * The main ActionChoice object. |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 } else { | 213 } else { |
| 214 this.renderPreview_(entries, count); | 214 this.renderPreview_(entries, count); |
| 215 } | 215 } |
| 216 }.bind(this); | 216 }.bind(this); |
| 217 | 217 |
| 218 this.metadataCache_.get(entry, 'thumbnail|filesystem', | 218 this.metadataCache_.get(entry, 'thumbnail|filesystem', |
| 219 function(metadata) { | 219 function(metadata) { |
| 220 new ThumbnailLoader(entry.toURL(), | 220 new ThumbnailLoader(entry.toURL(), |
| 221 ThumbnailLoader.LoaderType.IMAGE, | 221 ThumbnailLoader.LoaderType.IMAGE, |
| 222 metadata).load( | 222 metadata).load( |
| 223 box, ThumbnailLoader.FillMode.FILL, onSuccess, onError, onError); | 223 box, |
| 224 ThumbnailLoader.OptimizationMode.DISCARD_DETACHED, |
| 225 ThumbnailLoader.FillMode.FILL, |
| 226 onSuccess, |
| 227 onError, |
| 228 onError); |
| 224 }); | 229 }); |
| 225 }; | 230 }; |
| 226 | 231 |
| 227 /** | 232 /** |
| 228 * Closes the window. | 233 * Closes the window. |
| 229 * @private | 234 * @private |
| 230 */ | 235 */ |
| 231 ActionChoice.prototype.close_ = function() { | 236 ActionChoice.prototype.close_ = function() { |
| 232 window.close(); | 237 window.close(); |
| 233 }; | 238 }; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 */ | 319 */ |
| 315 ActionChoice.prototype.recordAction_ = function(action) { | 320 ActionChoice.prototype.recordAction_ = function(action) { |
| 316 metrics.recordEnum('PhotoImport.Action', action, | 321 metrics.recordEnum('PhotoImport.Action', action, |
| 317 ['import-photos-to-drive', | 322 ['import-photos-to-drive', |
| 318 'view-files', | 323 'view-files', |
| 319 'view-files-auto', | 324 'view-files-auto', |
| 320 'watch-single-video', | 325 'watch-single-video', |
| 321 'error', | 326 'error', |
| 322 'close']); | 327 'close']); |
| 323 }; | 328 }; |
| OLD | NEW |