B2G/gecko/services/aitc/modules/manager.js
/**
   * User is looking at dashboard. Start polling actively, but if user isn't
   * logged in, prompt for them to login via a dialog.
   */
User is looking at dashboard. Start polling actively, but if user isn't
logged in, prompt for them to login via a dialog.
User is looking at dashboard . Start polling actively but if user isn ' t logged in prompt for them to login via a dialog .
function userActive(win) {
    this._dashboardWindow = win;
    if (this._client) {
      this._state = this._ACTIVE;
      return;
    }
    let self = this;
    this._makeClient(function(err, client) {
      if (err) {
        self._log.error("Client not created at Dashboard");
        return;
      }
      self._client = client;
      self._state = self._ACTIVE;
    }, true, win);
  }
function userActive ( win ) { this . _dashboardWindow = win ; if ( this . _client ) { this . _state = this . _ACTIVE ; return ; } let self = this ; this . _makeClient ( function ( err , client ) { if ( err ) { self . _log . error ( "Client not created at Dashboard" ) ; return ; } self . _client = client ; self . _state = self . _ACTIVE ; } , true , win ) ; }
User is looking at dashboard.
User is looking at dashboard .
// Stash a reference to the dashboard window in case we need to prompt // Make client will first try silent login, if it doesn't work, a popup // will be shown in the context of the dashboard. We shouldn't be // trying to make a client every time this function is called, there is // room for optimization (Bug 750607). // Notify user of error (Bug 750610).