onProcessInviteDone_(invitation, accept, request) {
      let event = null;
      const activeUser = (request.result && request.result['request'] &&
                          request.result['request']['user']) ||
          '';
      if (request.xhr.status == 200 && request.result['success']) {
        event = new Event(CloudPrintInterfaceEventType.PROCESS_INVITE_DONE);
        if (accept) {
          try {
            event.printer = cloudprint.parseCloudDestination(
                request.result['printer'], request.origin, activeUser);
          } catch (e) {
            console.error('Failed to parse cloud print destination: ' + e);
          }
        }
      } else {
        event = this.createErrorEvent_(
            CloudPrintInterfaceEventType.PROCESS_INVITE_FAILED, request);
      }
      event.invitation = invitation;
      event.accept = accept;
      event.user = activeUser;
      this.dispatchEvent(event);
    }
/**
     * Called when invitation processing request completes.
     * @param {!print_preview.Invitation} invitation Processed invitation.
     * @param {boolean} accept Whether this invitation was accepted or rejected.
     * @param {!cloudprint.CloudPrintRequest} request Request that has been
     *     completed.
     * @private
     */
Called when invitation processing request completes.
@param {!print_preview.Invitation} invitation Processed invitation.
@param {boolean} accept Whether this invitation was accepted or rejected.
@param {!cloudprint.CloudPrintRequest} request Request that has been
completed.
@private
Called when invitation processing request completes . @param { !print_preview . Invitation } invitation Processed invitation . @param { boolean } accept Whether this invitation was accepted or rejected . @param { !cloudprint . CloudPrintRequest } request Request that has been completed . @private
onProcessInviteDone_(invitation, accept, request) {
      let event = null;
      const activeUser = (request.result && request.result['request'] &&
                          request.result['request']['user']) ||
          '';
      if (request.xhr.status == 200 && request.result['success']) {
        event = new Event(CloudPrintInterfaceEventType.PROCESS_INVITE_DONE);
        if (accept) {
          try {
            event.printer = cloudprint.parseCloudDestination(
                request.result['printer'], request.origin, activeUser);
          } catch (e) {
            console.error('Failed to parse cloud print destination: ' + e);
          }
        }
      } else {
        event = this.createErrorEvent_(
            CloudPrintInterfaceEventType.PROCESS_INVITE_FAILED, request);
      }
      event.invitation = invitation;
      event.accept = accept;
      event.user = activeUser;
      this.dispatchEvent(event);
    }
onProcessInviteDone_ ( invitation , accept , request ) { let event = null ; const activeUser = ( request . result && request . result [ 'request' ] && request . result [ 'request' ] [ 'user' ] ) || '' ; if ( request . xhr . status == 200 && request . result [ 'success' ] ) { event = new Event ( CloudPrintInterfaceEventType . PROCESS_INVITE_DONE ) ; if ( accept ) { try { event . printer = cloudprint . parseCloudDestination ( request . result [ 'printer' ] , request . origin , activeUser ) ; } catch ( e ) { console . error ( 'Failed to parse cloud print destination: ' + e ) ; } } } else { event = this . createErrorEvent_ ( CloudPrintInterfaceEventType . PROCESS_INVITE_FAILED , request ) ; } event . invitation = invitation ; event . accept = accept ; event . user = activeUser ; this . dispatchEvent ( event ) ; }
Called when invitation processing request completes.
Called when invitation processing request completes .