Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1313)

Side by Side Diff: chrome/browser/resources/file_manager/js/file_grid.js

Issue 14118010: Fixed flickering thumbnails in Files.app on Drive. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698