_listenSearchWindow(win) {
    win.once('close', () => {
      this._unlistenSearchWindow();
      this._unlistenAppWindow();
      this.win.webContents.send('search-bar-query-changed', '');
    });
    win.once('closed', () => {
      this.searchBar = undefined;
    });
    ipcMain.on('search-bar-close', this._closeHandler);
    ipcMain.on('search-bar-query', this._searchChangedHandler);
    ipcMain.on('search-bar-query-next', this._searchNextHandler);
    ipcMain.on('search-bar-query-previous', this._searchPreviousHandler);
    ipcMain.on('search-bar-search-result', this._searchResultHandler);
  }
/**
   * Listens for relevant events from the renderer process.
   * @param {BrowserWindow} win Window to listen for events on
   */
Listens for relevant events from the renderer process.
@param {BrowserWindow} win Window to listen for events on
Listens for relevant events from the renderer process . @param { BrowserWindow } win Window to listen for events on
_listenSearchWindow(win) {
    win.once('close', () => {
      this._unlistenSearchWindow();
      this._unlistenAppWindow();
      this.win.webContents.send('search-bar-query-changed', '');
    });
    win.once('closed', () => {
      this.searchBar = undefined;
    });
    ipcMain.on('search-bar-close', this._closeHandler);
    ipcMain.on('search-bar-query', this._searchChangedHandler);
    ipcMain.on('search-bar-query-next', this._searchNextHandler);
    ipcMain.on('search-bar-query-previous', this._searchPreviousHandler);
    ipcMain.on('search-bar-search-result', this._searchResultHandler);
  }
_listenSearchWindow ( win ) { win . once ( 'close' , ( ) => { this . _unlistenSearchWindow ( ) ; this . _unlistenAppWindow ( ) ; this . win . webContents . send ( 'search-bar-query-changed' , '' ) ; } ) ; win . once ( 'closed' , ( ) => { this . searchBar = undefined ; } ) ; ipcMain . on ( 'search-bar-close' , this . _closeHandler ) ; ipcMain . on ( 'search-bar-query' , this . _searchChangedHandler ) ; ipcMain . on ( 'search-bar-query-next' , this . _searchNextHandler ) ; ipcMain . on ( 'search-bar-query-previous' , this . _searchPreviousHandler ) ; ipcMain . on ( 'search-bar-search-result' , this . _searchResultHandler ) ; }
Listens for relevant events from the renderer process.
Listens for relevant events from the renderer process .