constructor (appMenu, preferences) {
    super()

    this._appMenu = appMenu

    this._activeWindowId = null
    this._windows = new Map()
    this._windowActivity = new WindowActivityList()

    // TODO(need::refactor): Please see #1035.
    this._watcher = new Watcher(preferences)

    this._listenForIpcMain()
  }
@param {AppMenu} appMenu The application menu instance.
@param {Preference} preferences The preference instance.