function ToolbarController(toolbar,
                           navigationList,
                           listContainer,
                           locationLine,
                           selectionHandler,
                           directoryModel) {
  /**
   * @private {!HTMLElement}
   * @const
   */
  this.toolbar_ = toolbar;

  /**
   * @private {!HTMLElement}
   * @const
   */
  this.cancelSelectionButton_ =
      queryRequiredElement('#cancel-selection-button', this.toolbar_);

  /**
   * @private {!HTMLElement}
   * @const
   */
  this.cancelSelectionButtonWrapper_ =
      queryRequiredElement('#cancel-selection-button-wrapper', this.toolbar_);

  /**
   * @private {!HTMLElement}
   * @const
   */
  this.filesSelectedLabel_ =
      queryRequiredElement('#files-selected-label', this.toolbar_);

  /**
   * @private {!HTMLElement}
   * @const
   */
  this.deleteButton_ = queryRequiredElement('#delete-button', this.toolbar_);

  /**
   * @private {!cr.ui.Command}
   * @const
   */
  this.deleteCommand_ = assertInstanceof(
      queryRequiredElement('#delete', assert(this.toolbar_.ownerDocument)),
      cr.ui.Command);

  /**
   * @private {!HTMLElement}
   * @const
   */
  this.navigationList_ = navigationList;

  /**
   * @private {!ListContainer}
   * @const
   */
  this.listContainer_ = listContainer;

  /**
   * @private {!LocationLine}
   * @const
   */
  this.locationLine_ = locationLine;

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

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

  this.selectionHandler_.addEventListener(
      FileSelectionHandler.EventType.CHANGE,
      this.onSelectionChanged_.bind(this));

  this.cancelSelectionButton_.addEventListener(
      'click', this.onCancelSelectionButtonClicked_.bind(this));

  this.deleteButton_.addEventListener(
      'click', this.onDeleteButtonClicked_.bind(this));

  this.navigationList_.addEventListener(
      'relayout', this.onNavigationListRelayout_.bind(this));

  // Watch visibility of toolbar buttons to update the width of location line.
  var observer = new MutationObserver(this.onToolbarButtonsMutated_.bind(this));
  var toolbarButtons =
      this.toolbar_.querySelectorAll('.icon-button, .combobutton');
  for (var i = 0; i < toolbarButtons.length; i++) {
    observer.observe(toolbarButtons[i],
                     /** @type MutationObserverInit */({attributes: true}));
  }
}
/**
 * This class controls wires toolbar UI and selection model. When selection
 * status is changed, this class changes the view of toolbar. If cancel
 * selection button is pressed, this class clears the selection.
 * @param {!HTMLElement} toolbar Toolbar element which contains controls.
 * @param {!HTMLElement} navigationList Navigation list on the left pane. The
 *     position of silesSelectedLabel depends on the navitaion list's width.
 * @param {!ListContainer} listContainer List container.
 * @param {!LocationLine} locationLine Location line shown on the left side of
 *     the toolbar.
 * @param {!FileSelectionHandler} selectionHandler
 * @param {!DirectoryModel} directoryModel
 * @constructor
 * @struct
 */
This class controls wires toolbar UI and selection model. When selection
status is changed, this class changes the view of toolbar. If cancel
selection button is pressed, this class clears the selection.
@param {!HTMLElement} toolbar Toolbar element which contains controls.
@param {!HTMLElement} navigationList Navigation list on the left pane. The
position of silesSelectedLabel depends on the navitaion list's width.
@param {!ListContainer} listContainer List container.
@param {!LocationLine} locationLine Location line shown on the left side of
the toolbar.
@param {!FileSelectionHandler} selectionHandler
@param {!DirectoryModel} directoryModel
@constructor
@struct
This class controls wires toolbar UI and selection model . When selection status is changed this class changes the view of toolbar . If cancel selection button is pressed this class clears the selection . @param { !HTMLElement } toolbar Toolbar element which contains controls . @param { !HTMLElement } navigationList Navigation list on the left pane . The position of silesSelectedLabel depends on the navitaion list ' s width . @param { !ListContainer } listContainer List container . @param { !LocationLine } locationLine Location line shown on the left side of the toolbar . @param { !FileSelectionHandler } selectionHandler @param { !DirectoryModel } directoryModel @constructor @struct
function ToolbarController(toolbar,
                           navigationList,
                           listContainer,
                           locationLine,
                           selectionHandler,
                           directoryModel) {
  this.toolbar_ = toolbar;
  this.cancelSelectionButton_ =
      queryRequiredElement('#cancel-selection-button', this.toolbar_);
  this.cancelSelectionButtonWrapper_ =
      queryRequiredElement('#cancel-selection-button-wrapper', this.toolbar_);
  this.filesSelectedLabel_ =
      queryRequiredElement('#files-selected-label', this.toolbar_);
  this.deleteButton_ = queryRequiredElement('#delete-button', this.toolbar_);
  this.deleteCommand_ = assertInstanceof(
      queryRequiredElement('#delete', assert(this.toolbar_.ownerDocument)),
      cr.ui.Command);
  this.navigationList_ = navigationList;
  this.listContainer_ = listContainer;
  this.locationLine_ = locationLine;
  this.selectionHandler_ = selectionHandler;
  this.directoryModel_ = directoryModel;
  this.selectionHandler_.addEventListener(
      FileSelectionHandler.EventType.CHANGE,
      this.onSelectionChanged_.bind(this));
  this.cancelSelectionButton_.addEventListener(
      'click', this.onCancelSelectionButtonClicked_.bind(this));
  this.deleteButton_.addEventListener(
      'click', this.onDeleteButtonClicked_.bind(this));
  this.navigationList_.addEventListener(
      'relayout', this.onNavigationListRelayout_.bind(this));
  var observer = new MutationObserver(this.onToolbarButtonsMutated_.bind(this));
  var toolbarButtons =
      this.toolbar_.querySelectorAll('.icon-button, .combobutton');
  for (var i = 0; i < toolbarButtons.length; i++) {
    observer.observe(toolbarButtons[i],
                     ({attributes: true}));
  }
}
function ToolbarController ( toolbar , navigationList , listContainer , locationLine , selectionHandler , directoryModel ) { this . toolbar_ = toolbar ; this . cancelSelectionButton_ = queryRequiredElement ( '#cancel-selection-button' , this . toolbar_ ) ; this . cancelSelectionButtonWrapper_ = queryRequiredElement ( '#cancel-selection-button-wrapper' , this . toolbar_ ) ; this . filesSelectedLabel_ = queryRequiredElement ( '#files-selected-label' , this . toolbar_ ) ; this . deleteButton_ = queryRequiredElement ( '#delete-button' , this . toolbar_ ) ; this . deleteCommand_ = assertInstanceof ( queryRequiredElement ( '#delete' , assert ( this . toolbar_ . ownerDocument ) ) , cr . ui . Command ) ; this . navigationList_ = navigationList ; this . listContainer_ = listContainer ; this . locationLine_ = locationLine ; this . selectionHandler_ = selectionHandler ; this . directoryModel_ = directoryModel ; this . selectionHandler_ . addEventListener ( FileSelectionHandler . EventType . CHANGE , this . onSelectionChanged_ . bind ( this ) ) ; this . cancelSelectionButton_ . addEventListener ( 'click' , this . onCancelSelectionButtonClicked_ . bind ( this ) ) ; this . deleteButton_ . addEventListener ( 'click' , this . onDeleteButtonClicked_ . bind ( this ) ) ; this . navigationList_ . addEventListener ( 'relayout' , this . onNavigationListRelayout_ . bind ( this ) ) ; var observer = new MutationObserver ( this . onToolbarButtonsMutated_ . bind ( this ) ) ; var toolbarButtons = this . toolbar_ . querySelectorAll ( '.icon-button, .combobutton' ) ; for ( var i = 0 ; i < toolbarButtons . length ; i ++ ) { observer . observe ( toolbarButtons [ i ] , ( { attributes : true } ) ) ; } }
This class controls wires toolbar UI and selection model.
This class controls wires toolbar UI and selection model .
/**
   * @private {!HTMLElement}
   * @const
   */ /**
   * @private {!HTMLElement}
   * @const
   */ /**
   * @private {!HTMLElement}
   * @const
   */ /**
   * @private {!HTMLElement}
   * @const
   */ /**
   * @private {!HTMLElement}
   * @const
   */ /**
   * @private {!cr.ui.Command}
   * @const
   */ /**
   * @private {!HTMLElement}
   * @const
   */ /**
   * @private {!ListContainer}
   * @const
   */ /**
   * @private {!LocationLine}
   * @const
   */ /**
   * @private {!FileSelectionHandler}
   * @const
   */ /**
   * @private {!DirectoryModel}
   * @const
   */ // Watch visibility of toolbar buttons to update the width of location line. /** @type MutationObserverInit */