function ListThumbnailLoader(
    directoryModel, thumbnailModel, volumeManager,
    opt_thumbnailLoaderConstructor) {
  /**
   * @private {!DirectoryModel}
   */
  this.directoryModel_ = directoryModel;

  /**
   * @private {!ThumbnailModel}
   */
  this.thumbnailModel_ = thumbnailModel;

  /**
   * @private {!VolumeManagerWrapper}
   */
  this.volumeManager_ = volumeManager;

  /**
   * Constructor of thumbnail loader.
   * @private {!Function}
   */
  this.thumbnailLoaderConstructor_ =
      opt_thumbnailLoaderConstructor || ThumbnailLoader;

  /**
   * @private {!Object<!ListThumbnailLoader.Task>}
   */
  this.active_ = {};

  /**
   * @private {LRUCache<!ListThumbnailLoader.ThumbnailData>}
   */
  this.cache_ = new LRUCache(ListThumbnailLoader.CACHE_SIZE);

  /**
   * @private {number}
   */
  this.beginIndex_ = 0;

  /**
   * @private {number}
   */
  this.endIndex_ = 0;

  /**
   * Cursor.
   * @private {number}
   */
  this.cursor_ = 0;

  /**
   * Current volume type.
   * @private {?ListThumbnailLoader.VolumeType}
   */
  this.currentVolumeType_ = null;

  /**
   * @private {!FileListModel}
   */
  this.dataModel_ = assert(this.directoryModel_.getFileList());

  this.directoryModel_.addEventListener(
      'scan-completed', this.onScanCompleted_.bind(this));
  this.dataModel_.addEventListener('splice', this.onSplice_.bind(this));
  this.dataModel_.addEventListener('sorted', this.onSorted_.bind(this));
  this.dataModel_.addEventListener('change', this.onChange_.bind(this));
}
/**
 * A thumbnail loader for list style UI.
 *
 * ListThumbnailLoader is a thubmanil loader designed for list style ui. List
 * thumbnail loader loads thumbnail in a viewport of the UI. ListThumbnailLoader
 * is responsible to return dataUrls of thumbnails and fetch them with proper
 * priority.
 *
 * @param {!DirectoryModel} directoryModel A directory model.
 * @param {!ThumbnailModel} thumbnailModel Thumbnail metadata model.
 * @param {!VolumeManagerWrapper} volumeManager Volume manager.
 * @param {Function=} opt_thumbnailLoaderConstructor A constructor of thumbnail
 *     loader. This argument is used for testing.
 * @struct
 * @constructor
 * @extends {cr.EventTarget}
 */
A thumbnail loader for list style UI.
ListThumbnailLoader is a thubmanil loader designed for list style ui. List
thumbnail loader loads thumbnail in a viewport of the UI. ListThumbnailLoader
is responsible to return dataUrls of thumbnails and fetch them with proper
priority.

@param {!DirectoryModel} directoryModel A directory model.
@param {!ThumbnailModel} thumbnailModel Thumbnail metadata model.
@param {!VolumeManagerWrapper} volumeManager Volume manager.
@param {Function=} opt_thumbnailLoaderConstructor A constructor of thumbnail
loader. This argument is used for testing.
A thumbnail loader for list style UI . ListThumbnailLoader is a thubmanil loader designed for list style ui . List thumbnail loader loads thumbnail in a viewport of the UI . ListThumbnailLoader is responsible to return dataUrls of thumbnails and fetch them with proper priority . @param { !DirectoryModel } directoryModel A directory model . @param { !ThumbnailModel } thumbnailModel Thumbnail metadata model . @param { !VolumeManagerWrapper } volumeManager Volume manager . @param { Function = } opt_thumbnailLoaderConstructor A constructor of thumbnail loader . This argument is used for testing .
function ListThumbnailLoader(
    directoryModel, thumbnailModel, volumeManager,
    opt_thumbnailLoaderConstructor) {
  this.directoryModel_ = directoryModel;
  this.thumbnailModel_ = thumbnailModel;
  this.volumeManager_ = volumeManager;
  this.thumbnailLoaderConstructor_ =
      opt_thumbnailLoaderConstructor || ThumbnailLoader;
  this.active_ = {};
  this.cache_ = new LRUCache(ListThumbnailLoader.CACHE_SIZE);
  this.beginIndex_ = 0;
  this.endIndex_ = 0;
  this.cursor_ = 0;
  this.currentVolumeType_ = null;
  this.dataModel_ = assert(this.directoryModel_.getFileList());
  this.directoryModel_.addEventListener(
      'scan-completed', this.onScanCompleted_.bind(this));
  this.dataModel_.addEventListener('splice', this.onSplice_.bind(this));
  this.dataModel_.addEventListener('sorted', this.onSorted_.bind(this));
  this.dataModel_.addEventListener('change', this.onChange_.bind(this));
}
function ListThumbnailLoader ( directoryModel , thumbnailModel , volumeManager , opt_thumbnailLoaderConstructor ) { this . directoryModel_ = directoryModel ; this . thumbnailModel_ = thumbnailModel ; this . volumeManager_ = volumeManager ; this . thumbnailLoaderConstructor_ = opt_thumbnailLoaderConstructor || ThumbnailLoader ; this . active_ = { } ; this . cache_ = new LRUCache ( ListThumbnailLoader . CACHE_SIZE ) ; this . beginIndex_ = 0 ; this . endIndex_ = 0 ; this . cursor_ = 0 ; this . currentVolumeType_ = null ; this . dataModel_ = assert ( this . directoryModel_ . getFileList ( ) ) ; this . directoryModel_ . addEventListener ( 'scan-completed' , this . onScanCompleted_ . bind ( this ) ) ; this . dataModel_ . addEventListener ( 'splice' , this . onSplice_ . bind ( this ) ) ; this . dataModel_ . addEventListener ( 'sorted' , this . onSorted_ . bind ( this ) ) ; this . dataModel_ . addEventListener ( 'change' , this . onChange_ . bind ( this ) ) ; }
A thumbnail loader for list style UI.
A thumbnail loader for list style UI .
/**
   * @private {!DirectoryModel}
   */ /**
   * @private {!ThumbnailModel}
   */ /**
   * @private {!VolumeManagerWrapper}
   */ /**
   * Constructor of thumbnail loader.
   * @private {!Function}
   */ /**
   * @private {!Object<!ListThumbnailLoader.Task>}
   */ /**
   * @private {LRUCache<!ListThumbnailLoader.ThumbnailData>}
   */ /**
   * @private {number}
   */ /**
   * @private {number}
   */ /**
   * Cursor.
   * @private {number}
   */ /**
   * Current volume type.
   * @private {?ListThumbnailLoader.VolumeType}
   */ /**
   * @private {!FileListModel}
   */