| 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 PhotoImport.load(); | 6 PhotoImport.load(); |
| 7 }); | 7 }); |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * The main Photo App object. | 10 * The main Photo App object. |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 frame.className = 'grid-frame'; | 332 frame.className = 'grid-frame'; |
| 333 li.appendChild(frame); | 333 li.appendChild(frame); |
| 334 | 334 |
| 335 var box = this.document_.createElement('div'); | 335 var box = this.document_.createElement('div'); |
| 336 box.className = 'img-container'; | 336 box.className = 'img-container'; |
| 337 this.metadataCache_.get(entry, 'thumbnail|filesystem', | 337 this.metadataCache_.get(entry, 'thumbnail|filesystem', |
| 338 function(metadata) { | 338 function(metadata) { |
| 339 new ThumbnailLoader(entry.toURL(), | 339 new ThumbnailLoader(entry.toURL(), |
| 340 ThumbnailLoader.LoaderType.IMAGE, | 340 ThumbnailLoader.LoaderType.IMAGE, |
| 341 metadata). | 341 metadata). |
| 342 load(box, ThumbnailLoader.FillMode.FIT); | 342 load(box, ThumbnailLoader.FillMode.FIT, |
| 343 ThumbnailLoader.OptimizationMode.DISCARD_DETACHED); |
| 343 }); | 344 }); |
| 344 frame.appendChild(box); | 345 frame.appendChild(box); |
| 345 | 346 |
| 346 var check = this.document_.createElement('div'); | 347 var check = this.document_.createElement('div'); |
| 347 check.className = 'check'; | 348 check.className = 'check'; |
| 348 li.appendChild(check); | 349 li.appendChild(check); |
| 349 }; | 350 }; |
| 350 | 351 |
| 351 /** | 352 /** |
| 352 * Handles the 'pick all/none' action. | 353 * Handles the 'pick all/none' action. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 | 541 |
| 541 /** @override */ | 542 /** @override */ |
| 542 GridSelectionController.prototype.getLastIndex = function() { | 543 GridSelectionController.prototype.getLastIndex = function() { |
| 543 var dm = this.grid_.dataModel; | 544 var dm = this.grid_.dataModel; |
| 544 for (var index = dm.length - 1; index >= 0; index--) { | 545 for (var index = dm.length - 1; index >= 0; index--) { |
| 545 if (dm.item(index).type == 'entry') | 546 if (dm.item(index).type == 'entry') |
| 546 return index; | 547 return index; |
| 547 } | 548 } |
| 548 return -1; | 549 return -1; |
| 549 }; | 550 }; |
| OLD | NEW |