function presentationConnectionCloseReasonToMojo_(reason) {
  var PresentationConnectionCloseReason =
      mediaRouter.mojom.MediaRouter.PresentationConnectionCloseReason;
  switch (reason) {
    case 'error':
      return PresentationConnectionCloseReason.CONNECTION_ERROR;
    case 'closed':
      return PresentationConnectionCloseReason.CLOSED;
    case 'went_away':
      return PresentationConnectionCloseReason.WENT_AWAY;
    default:
      console.error('Unknown presentation connection close reason : ' +
          reason);
      return PresentationConnectionCloseReason.CONNECTION_ERROR;
  }
}
/**
 * Converts presentation connection close reason to Mojo enum value.
 * @param {!string} reason
 * @return {!mediaRouter.mojom.MediaRouter.PresentationConnectionCloseReason}
 */
Converts presentation connection close reason to Mojo enum value.
Converts presentation connection close reason to Mojo enum value .
function presentationConnectionCloseReasonToMojo_(reason) {
  var PresentationConnectionCloseReason =
      mediaRouter.mojom.MediaRouter.PresentationConnectionCloseReason;
  switch (reason) {
    case 'error':
      return PresentationConnectionCloseReason.CONNECTION_ERROR;
    case 'closed':
      return PresentationConnectionCloseReason.CLOSED;
    case 'went_away':
      return PresentationConnectionCloseReason.WENT_AWAY;
    default:
      console.error('Unknown presentation connection close reason : ' +
          reason);
      return PresentationConnectionCloseReason.CONNECTION_ERROR;
  }
}
function presentationConnectionCloseReasonToMojo_ ( reason ) { var PresentationConnectionCloseReason = mediaRouter . mojom . MediaRouter . PresentationConnectionCloseReason ; switch ( reason ) { case 'error' : return PresentationConnectionCloseReason . CONNECTION_ERROR ; case 'closed' : return PresentationConnectionCloseReason . CLOSED ; case 'went_away' : return PresentationConnectionCloseReason . WENT_AWAY ; default : console . error ( 'Unknown presentation connection close reason : ' + reason ) ; return PresentationConnectionCloseReason . CONNECTION_ERROR ; } }
Converts presentation connection close reason to Mojo enum value.
Converts presentation connection close reason to Mojo enum value .