| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * FileGrid constructor. | 8 * FileGrid constructor. |
| 9 * | 9 * |
| 10 * Represents grid for the Grid Vew in the File Manager. | 10 * Represents grid for the Grid Vew in the File Manager. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // TODO(dgozman): If we ask for 'media' for a Drive file we fall into an | 121 // TODO(dgozman): If we ask for 'media' for a Drive file we fall into an |
| 122 // infinite loop. | 122 // infinite loop. |
| 123 metadataTypes += '|media'; | 123 metadataTypes += '|media'; |
| 124 } | 124 } |
| 125 | 125 |
| 126 metadataCache.get(imageUrl, metadataTypes, | 126 metadataCache.get(imageUrl, metadataTypes, |
| 127 function(metadata) { | 127 function(metadata) { |
| 128 new ThumbnailLoader(imageUrl, | 128 new ThumbnailLoader(imageUrl, |
| 129 ThumbnailLoader.LoaderType.IMAGE, | 129 ThumbnailLoader.LoaderType.IMAGE, |
| 130 metadata). | 130 metadata). |
| 131 load(box, fillMode, opt_imageLoadCallback, onImageLoadError); | 131 load(box, |
| 132 fillMode, |
| 133 ThumbnailLoader.OptimizationMode.DISCARD_DETACHED, |
| 134 opt_imageLoadCallback, |
| 135 onImageLoadError); |
| 132 }); | 136 }); |
| 133 }; | 137 }; |
| 134 | 138 |
| 135 /** | 139 /** |
| 136 * Item for the Grid View. | 140 * Item for the Grid View. |
| 137 * @constructor | 141 * @constructor |
| 138 */ | 142 */ |
| 139 FileGrid.Item = function() { | 143 FileGrid.Item = function() { |
| 140 throw new Error(); | 144 throw new Error(); |
| 141 }; | 145 }; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 166 checkBox.classList.add('white'); | 170 checkBox.classList.add('white'); |
| 167 var bottom = li.querySelector('.thumbnail-bottom'); | 171 var bottom = li.querySelector('.thumbnail-bottom'); |
| 168 bottom.appendChild(checkBox); | 172 bottom.appendChild(checkBox); |
| 169 bottom.classList.add('show-checkbox'); | 173 bottom.classList.add('show-checkbox'); |
| 170 } | 174 } |
| 171 | 175 |
| 172 // Override the default role 'listitem' to 'option' to match the parent's | 176 // Override the default role 'listitem' to 'option' to match the parent's |
| 173 // role (listbox). | 177 // role (listbox). |
| 174 li.setAttribute('role', 'option'); | 178 li.setAttribute('role', 'option'); |
| 175 }; | 179 }; |
| OLD | NEW |