onAccessTokenReady_(request, accessToken) {
      assert(request.origin == print_preview.DestinationOrigin.DEVICE);
      if (accessToken) {
        request.xhr.setRequestHeader(
            'Authorization', 'Bearer ' + accessToken);
        this.sendRequest_(request);
      } else {  // No valid token.
        // Without abort status does not exist.
        request.xhr.abort();
        request.callback(request);
      }
      this.accessTokenRequestPromise_ = null;
    }
/**
     * Called when a native layer receives access token. Assumes that the
     * destination type for this token is DestinationOrigin.DEVICE.
     * @param {cloudprint.CloudPrintRequest} request The pending request that
     *     requires the access token.
     * @param {string} accessToken The access token obtained.
     * @private
     */
Called when a native layer receives access token. Assumes that the
destination type for this token is DestinationOrigin.DEVICE.
@param {cloudprint.CloudPrintRequest} request The pending request that
requires the access token.
@param {string} accessToken The access token obtained.
@private
Called when a native layer receives access token . Assumes that the destination type for this token is DestinationOrigin . DEVICE . @param { cloudprint . CloudPrintRequest } request The pending request that requires the access token . @param { string } accessToken The access token obtained . @private
onAccessTokenReady_(request, accessToken) {
      assert(request.origin == print_preview.DestinationOrigin.DEVICE);
      if (accessToken) {
        request.xhr.setRequestHeader(
            'Authorization', 'Bearer ' + accessToken);
        this.sendRequest_(request);
      } else {  
        request.xhr.abort();
        request.callback(request);
      }
      this.accessTokenRequestPromise_ = null;
    }
onAccessTokenReady_ ( request , accessToken ) { assert ( request . origin == print_preview . DestinationOrigin . DEVICE ) ; if ( accessToken ) { request . xhr . setRequestHeader ( 'Authorization' , 'Bearer ' + accessToken ) ; this . sendRequest_ ( request ) ; } else { request . xhr . abort ( ) ; request . callback ( request ) ; } this . accessTokenRequestPromise_ = null ; }
Called when a native layer receives access token.
Called when a native layer receives access token .
// No valid token. // Without abort status does not exist.