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

Side by Side Diff: chrome/browser/resources/file_manager/js/photo/ribbon.js

Issue 14320020: Initial restyle of the gallery. (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
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 * Scrollable thumbnail ribbon at the bottom of the Gallery in the Slide mode. 8 * Scrollable thumbnail ribbon at the bottom of the Gallery in the Slide mode.
9 * 9 *
10 * @param {Document} document Document. 10 * @param {Document} document Document.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 * 328 *
329 * @param {Element} thumbnail Thumbnail element. 329 * @param {Element} thumbnail Thumbnail element.
330 * @param {string} url Image url. 330 * @param {string} url Image url.
331 * @param {Object} metadata Metadata. 331 * @param {Object} metadata Metadata.
332 * @private 332 * @private
333 */ 333 */
334 Ribbon.prototype.setThumbnailImage_ = function(thumbnail, url, metadata) { 334 Ribbon.prototype.setThumbnailImage_ = function(thumbnail, url, metadata) {
335 new ThumbnailLoader(url, ThumbnailLoader.LoaderType.IMAGE, metadata).load( 335 new ThumbnailLoader(url, ThumbnailLoader.LoaderType.IMAGE, metadata).load(
336 thumbnail.querySelector('.image-wrapper'), 336 thumbnail.querySelector('.image-wrapper'),
337 ThumbnailLoader.FillMode.FILL /* fill */, 337 ThumbnailLoader.FillMode.FILL /* fill */,
338 ThumbnailLoader.OptimizationMode.NEVER_DISCARD, 338 ThumbnailLoader.OptimizationMode.DISCARD_DETACHED,
339 null /* success callback */, 339 null /* success callback */,
340 this.onThumbnailError_.bind(null, url)); 340 this.onThumbnailError_.bind(null, url));
341 }; 341 };
342 342
343 /** 343 /**
344 * Content change handler. 344 * Content change handler.
345 * 345 *
346 * @param {Event} event Event. 346 * @param {Event} event Event.
347 * @private 347 * @private
348 */ 348 */
(...skipping 12 matching lines...) Expand all
361 * @param {string} oldUrl Old url. 361 * @param {string} oldUrl Old url.
362 * @param {string} newUrl New url. 362 * @param {string} newUrl New url.
363 * @private 363 * @private
364 */ 364 */
365 Ribbon.prototype.remapCache_ = function(oldUrl, newUrl) { 365 Ribbon.prototype.remapCache_ = function(oldUrl, newUrl) {
366 if (oldUrl != newUrl && (oldUrl in this.renderCache_)) { 366 if (oldUrl != newUrl && (oldUrl in this.renderCache_)) {
367 this.renderCache_[newUrl] = this.renderCache_[oldUrl]; 367 this.renderCache_[newUrl] = this.renderCache_[oldUrl];
368 delete this.renderCache_[oldUrl]; 368 delete this.renderCache_[oldUrl];
369 } 369 }
370 }; 370 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698