function MainWindowComponent(
    dialogType, ui, volumeManager, directoryModel, fileFilter, selectionHandler,
    namingController, appStateController, taskController) {
  /**
   * @type {DialogType}
   * @const
   * @private
   */
  this.dialogType_ = dialogType;

  /**
   * @type {!FileManagerUI}
   * @const
   * @private
   */
  this.ui_ = ui;

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

  /**
   * @type {!DirectoryModel}
   * @const
   * @private
   */
  this.directoryModel_ = directoryModel;

  /**
   * @type {!FileFilter}
   * @const
   * @private
   */
  this.fileFilter_ = fileFilter;

  /**
   * @type {!FileSelectionHandler}
   * @const
   * @private
   */
  this.selectionHandler_ = selectionHandler;

  /**
   * @type {!NamingController}
   * @const
   * @private
   */
  this.namingController_ = namingController;

  /**
   * @type {!AppStateController}
   * @const
   * @private
   */
  this.appStateController_ = appStateController;

  /**
   * @type {!TaskController}
   * @const
   * @private
   */
  this.taskController_ = taskController;

  /**
   * True while a user is pressing <Tab>.
   * This is used for identifying the trigger causing the filelist to
   * be focused.
   * @type {boolean}
   * @private
   */
  this.pressingTab_ = false;

  // Register events.
  ui.listContainer.element.addEventListener(
      'keydown', this.onListKeyDown_.bind(this));
  ui.directoryTree.addEventListener(
      'keydown', this.onDirectoryTreeKeyDown_.bind(this));
  ui.listContainer.element.addEventListener(
      ListContainer.EventType.TEXT_SEARCH, this.onTextSearch_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'dblclick', this.onDoubleClick_.bind(this));
  ui.listContainer.grid.addEventListener(
      'dblclick', this.onDoubleClick_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'touchstart', this.handleTouchEvents_.bind(this));
  ui.listContainer.grid.addEventListener(
      'touchstart', this.handleTouchEvents_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'touchend', this.handleTouchEvents_.bind(this));
  ui.listContainer.grid.addEventListener(
      'touchend', this.handleTouchEvents_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'touchmove', this.handleTouchEvents_.bind(this));
  ui.listContainer.grid.addEventListener(
      'touchmove', this.handleTouchEvents_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'focus', this.onFileListFocus_.bind(this));
  ui.listContainer.grid.addEventListener(
      'focus', this.onFileListFocus_.bind(this));
  ui.locationLine.addEventListener(
      'pathclick', this.onBreadcrumbClick_.bind(this));
  ui.toggleViewButton.addEventListener(
      'click', this.onToggleViewButtonClick_.bind(this));
  directoryModel.addEventListener(
      'directory-changed', this.onDirectoryChanged_.bind(this));
  volumeManager.addEventListener(
      'drive-connection-changed',
      this.onDriveConnectionChanged_.bind(this));
  this.onDriveConnectionChanged_();
  document.addEventListener('keydown', this.onKeyDown_.bind(this));
  document.addEventListener('keyup', this.onKeyUp_.bind(this));
  window.addEventListener('focus', this.onWindowFocus_.bind(this));

  /**
   * Whether to allow touch-specific interaction.
   * @type {boolean}
   */
  this.enableTouchMode_ = false;
  util.isTouchModeEnabled().then(function(enabled) {
    this.enableTouchMode_ = enabled;
  }.bind(this));

  /**
   * @type {!FileTapHandler}
   * @private
   * @const
   */
  this.tapHandler_ = new FileTapHandler();
}
/**
 * Component for the main window.
 *
 * The class receives UI events from UI components that does not have their own
 * controller, and do corresponding action by using models/other controllers.
 *
 * The class also observes model/browser API's event to update the misc
 * components.
 *
 * @param {DialogType} dialogType
 * @param {!FileManagerUI} ui
 * @param {!VolumeManagerWrapper} volumeManager
 * @param {!DirectoryModel} directoryModel
 * @param {!FileFilter} fileFilter
 * @param {!FileSelectionHandler} selectionHandler
 * @param {!NamingController} namingController
 * @param {!AppStateController} appStateController
 * @param {!TaskController} taskController
 * @constructor
 * @struct
 */
Component for the main window.
The class receives UI events from UI components that does not have their own
controller, and do corresponding action by using models/other controllers.

The class also observes model/browser API's event to update the misc
components.


Component for the main window . The class receives UI events from UI components that does not have their own controller and do corresponding action by using models / other controllers . The class also observes model / browser API ' s event to update the misc components .
function MainWindowComponent(
    dialogType, ui, volumeManager, directoryModel, fileFilter, selectionHandler,
    namingController, appStateController, taskController) {
  this.dialogType_ = dialogType;
  this.ui_ = ui;
  this.volumeManager_ = volumeManager;
  this.directoryModel_ = directoryModel;
  this.fileFilter_ = fileFilter;
  this.selectionHandler_ = selectionHandler;
  this.namingController_ = namingController;
  this.appStateController_ = appStateController;
  this.taskController_ = taskController;
  this.pressingTab_ = false;
  ui.listContainer.element.addEventListener(
      'keydown', this.onListKeyDown_.bind(this));
  ui.directoryTree.addEventListener(
      'keydown', this.onDirectoryTreeKeyDown_.bind(this));
  ui.listContainer.element.addEventListener(
      ListContainer.EventType.TEXT_SEARCH, this.onTextSearch_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'dblclick', this.onDoubleClick_.bind(this));
  ui.listContainer.grid.addEventListener(
      'dblclick', this.onDoubleClick_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'touchstart', this.handleTouchEvents_.bind(this));
  ui.listContainer.grid.addEventListener(
      'touchstart', this.handleTouchEvents_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'touchend', this.handleTouchEvents_.bind(this));
  ui.listContainer.grid.addEventListener(
      'touchend', this.handleTouchEvents_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'touchmove', this.handleTouchEvents_.bind(this));
  ui.listContainer.grid.addEventListener(
      'touchmove', this.handleTouchEvents_.bind(this));
  ui.listContainer.table.list.addEventListener(
      'focus', this.onFileListFocus_.bind(this));
  ui.listContainer.grid.addEventListener(
      'focus', this.onFileListFocus_.bind(this));
  ui.locationLine.addEventListener(
      'pathclick', this.onBreadcrumbClick_.bind(this));
  ui.toggleViewButton.addEventListener(
      'click', this.onToggleViewButtonClick_.bind(this));
  directoryModel.addEventListener(
      'directory-changed', this.onDirectoryChanged_.bind(this));
  volumeManager.addEventListener(
      'drive-connection-changed',
      this.onDriveConnectionChanged_.bind(this));
  this.onDriveConnectionChanged_();
  document.addEventListener('keydown', this.onKeyDown_.bind(this));
  document.addEventListener('keyup', this.onKeyUp_.bind(this));
  window.addEventListener('focus', this.onWindowFocus_.bind(this));
  this.enableTouchMode_ = false;
  util.isTouchModeEnabled().then(function(enabled) {
    this.enableTouchMode_ = enabled;
  }.bind(this));
  this.tapHandler_ = new FileTapHandler();
}
function MainWindowComponent ( dialogType , ui , volumeManager , directoryModel , fileFilter , selectionHandler , namingController , appStateController , taskController ) { this . dialogType_ = dialogType ; this . ui_ = ui ; this . volumeManager_ = volumeManager ; this . directoryModel_ = directoryModel ; this . fileFilter_ = fileFilter ; this . selectionHandler_ = selectionHandler ; this . namingController_ = namingController ; this . appStateController_ = appStateController ; this . taskController_ = taskController ; this . pressingTab_ = false ; ui . listContainer . element . addEventListener ( 'keydown' , this . onListKeyDown_ . bind ( this ) ) ; ui . directoryTree . addEventListener ( 'keydown' , this . onDirectoryTreeKeyDown_ . bind ( this ) ) ; ui . listContainer . element . addEventListener ( ListContainer . EventType . TEXT_SEARCH , this . onTextSearch_ . bind ( this ) ) ; ui . listContainer . table . list . addEventListener ( 'dblclick' , this . onDoubleClick_ . bind ( this ) ) ; ui . listContainer . grid . addEventListener ( 'dblclick' , this . onDoubleClick_ . bind ( this ) ) ; ui . listContainer . table . list . addEventListener ( 'touchstart' , this . handleTouchEvents_ . bind ( this ) ) ; ui . listContainer . grid . addEventListener ( 'touchstart' , this . handleTouchEvents_ . bind ( this ) ) ; ui . listContainer . table . list . addEventListener ( 'touchend' , this . handleTouchEvents_ . bind ( this ) ) ; ui . listContainer . grid . addEventListener ( 'touchend' , this . handleTouchEvents_ . bind ( this ) ) ; ui . listContainer . table . list . addEventListener ( 'touchmove' , this . handleTouchEvents_ . bind ( this ) ) ; ui . listContainer . grid . addEventListener ( 'touchmove' , this . handleTouchEvents_ . bind ( this ) ) ; ui . listContainer . table . list . addEventListener ( 'focus' , this . onFileListFocus_ . bind ( this ) ) ; ui . listContainer . grid . addEventListener ( 'focus' , this . onFileListFocus_ . bind ( this ) ) ; ui . locationLine . addEventListener ( 'pathclick' , this . onBreadcrumbClick_ . bind ( this ) ) ; ui . toggleViewButton . addEventListener ( 'click' , this . onToggleViewButtonClick_ . bind ( this ) ) ; directoryModel . addEventListener ( 'directory-changed' , this . onDirectoryChanged_ . bind ( this ) ) ; volumeManager . addEventListener ( 'drive-connection-changed' , this . onDriveConnectionChanged_ . bind ( this ) ) ; this . onDriveConnectionChanged_ ( ) ; document . addEventListener ( 'keydown' , this . onKeyDown_ . bind ( this ) ) ; document . addEventListener ( 'keyup' , this . onKeyUp_ . bind ( this ) ) ; window . addEventListener ( 'focus' , this . onWindowFocus_ . bind ( this ) ) ; this . enableTouchMode_ = false ; util . isTouchModeEnabled ( ) . then ( function ( enabled ) { this . enableTouchMode_ = enabled ; } . bind ( this ) ) ; this . tapHandler_ = new FileTapHandler ( ) ; }
Component for the main window.
Component for the main window .
/**
   * @type {DialogType}
   * @const
   * @private
   */ /**
   * @type {!FileManagerUI}
   * @const
   * @private
   */ /**
   * @type {!VolumeManagerWrapper}
   * @const
   * @private
   */ /**
   * @type {!DirectoryModel}
   * @const
   * @private
   */ /**
   * @type {!FileFilter}
   * @const
   * @private
   */ /**
   * @type {!FileSelectionHandler}
   * @const
   * @private
   */ /**
   * @type {!NamingController}
   * @const
   * @private
   */ /**
   * @type {!AppStateController}
   * @const
   * @private
   */ /**
   * @type {!TaskController}
   * @const
   * @private
   */ /**
   * True while a user is pressing <Tab>.
   * This is used for identifying the trigger causing the filelist to
   * be focused.
   * @type {boolean}
   * @private
   */ // Register events. /**
   * Whether to allow touch-specific interaction.
   * @type {boolean}
   */ /**
   * @type {!FileTapHandler}
   * @private
   * @const
   */