listen() {
    this.contextActions.listenMainEvents();
    window.onbeforeunload = this.beforeUnloadWindow.bind(this);
    this.driveBridge.listen();
    this.oauth2Proxy.listen();
    this.themeManager.listen();
    this.prefProxy.observe();
    this.cookieBridge.listen();
    this.fs.listen();
    this.amfService.listen();
    this.search.listen();
    this.encryption.listen();

    ipc.on('checking-for-update', () => {
      this.updateEventHandler('checking-for-update');
    });
    ipc.on('update-available', (info) => {
      this.updateEventHandler('update-available', info);
    });
    ipc.on('update-not-available', () => {
      this.updateEventHandler('update-not-available');
    });
    ipc.on('autoupdate-error', (error) => {
      this.updateEventHandler('autoupdate-error', error);
    });
    ipc.on('download-progress', (progressObj) => {
      this.updateEventHandler('download-progress', progressObj);
    });
    ipc.on('update-downloaded', (info) => {
      this.updateEventHandler('update-downloaded', info);
    });
    ipc.on('command', this.commandHandler.bind(this));
    ipc.on('request-action', this.execRequestAction.bind(this));
    ipc.on('theme-editor-preview', this._themePreviewHandler.bind(this));
    ipc.on('window-state-info', this._stateInfoHandler.bind(this));
    ipc.on('app-navigate', this._appNavHandler.bind(this));
    ipc.on('popup-app-menu-opened', this._popupMenuOpened.bind(this));
    ipc.on('popup-app-menu-closed', this._popupMenuClosed.bind(this));
    ipc.on('system-theme-changed', this._systemThemeChangeHandler.bind(this));
    document.body.addEventListener('settings-changed', this._settingsHandler.bind(this));
  }
/**
   * Listens for application events to create a communication
   * bridge between main process and the app.
   */
Listens for application events to create a communication
bridge between main process and the app.
Listens for application events to create a communication bridge between main process and the app .
listen() {
    this.contextActions.listenMainEvents();
    window.onbeforeunload = this.beforeUnloadWindow.bind(this);
    this.driveBridge.listen();
    this.oauth2Proxy.listen();
    this.themeManager.listen();
    this.prefProxy.observe();
    this.cookieBridge.listen();
    this.fs.listen();
    this.amfService.listen();
    this.search.listen();
    this.encryption.listen();
    ipc.on('checking-for-update', () => {
      this.updateEventHandler('checking-for-update');
    });
    ipc.on('update-available', (info) => {
      this.updateEventHandler('update-available', info);
    });
    ipc.on('update-not-available', () => {
      this.updateEventHandler('update-not-available');
    });
    ipc.on('autoupdate-error', (error) => {
      this.updateEventHandler('autoupdate-error', error);
    });
    ipc.on('download-progress', (progressObj) => {
      this.updateEventHandler('download-progress', progressObj);
    });
    ipc.on('update-downloaded', (info) => {
      this.updateEventHandler('update-downloaded', info);
    });
    ipc.on('command', this.commandHandler.bind(this));
    ipc.on('request-action', this.execRequestAction.bind(this));
    ipc.on('theme-editor-preview', this._themePreviewHandler.bind(this));
    ipc.on('window-state-info', this._stateInfoHandler.bind(this));
    ipc.on('app-navigate', this._appNavHandler.bind(this));
    ipc.on('popup-app-menu-opened', this._popupMenuOpened.bind(this));
    ipc.on('popup-app-menu-closed', this._popupMenuClosed.bind(this));
    ipc.on('system-theme-changed', this._systemThemeChangeHandler.bind(this));
    document.body.addEventListener('settings-changed', this._settingsHandler.bind(this));
  }
listen ( ) { this . contextActions . listenMainEvents ( ) ; window . onbeforeunload = this . beforeUnloadWindow . bind ( this ) ; this . driveBridge . listen ( ) ; this . oauth2Proxy . listen ( ) ; this . themeManager . listen ( ) ; this . prefProxy . observe ( ) ; this . cookieBridge . listen ( ) ; this . fs . listen ( ) ; this . amfService . listen ( ) ; this . search . listen ( ) ; this . encryption . listen ( ) ; ipc . on ( 'checking-for-update' , ( ) => { this . updateEventHandler ( 'checking-for-update' ) ; } ) ; ipc . on ( 'update-available' , ( info ) => { this . updateEventHandler ( 'update-available' , info ) ; } ) ; ipc . on ( 'update-not-available' , ( ) => { this . updateEventHandler ( 'update-not-available' ) ; } ) ; ipc . on ( 'autoupdate-error' , ( error ) => { this . updateEventHandler ( 'autoupdate-error' , error ) ; } ) ; ipc . on ( 'download-progress' , ( progressObj ) => { this . updateEventHandler ( 'download-progress' , progressObj ) ; } ) ; ipc . on ( 'update-downloaded' , ( info ) => { this . updateEventHandler ( 'update-downloaded' , info ) ; } ) ; ipc . on ( 'command' , this . commandHandler . bind ( this ) ) ; ipc . on ( 'request-action' , this . execRequestAction . bind ( this ) ) ; ipc . on ( 'theme-editor-preview' , this . _themePreviewHandler . bind ( this ) ) ; ipc . on ( 'window-state-info' , this . _stateInfoHandler . bind ( this ) ) ; ipc . on ( 'app-navigate' , this . _appNavHandler . bind ( this ) ) ; ipc . on ( 'popup-app-menu-opened' , this . _popupMenuOpened . bind ( this ) ) ; ipc . on ( 'popup-app-menu-closed' , this . _popupMenuClosed . bind ( this ) ) ; ipc . on ( 'system-theme-changed' , this . _systemThemeChangeHandler . bind ( this ) ) ; document . body . addEventListener ( 'settings-changed' , this . _settingsHandler . bind ( this ) ) ; }
Listens for application events to create a communication
 bridge between main process and the app.
Listens for application events to create a communication bridge between main process and the app .