function presentationConnectionStateToMojo_(state) {
  var PresentationConnectionState =
      mediaRouter.mojom.MediaRouter.PresentationConnectionState;
  switch (state) {
    case 'connecting':
      return PresentationConnectionState.CONNECTING;
    case 'connected':
      return PresentationConnectionState.CONNECTED;
    case 'closed':
      return PresentationConnectionState.CLOSED;
    case 'terminated':
      return PresentationConnectionState.TERMINATED;
    default:
      console.error('Unknown presentation connection state: ' + state);
      return PresentationConnectionState.TERMINATED;
  }
}
/**
 * Converts presentation connection state to Mojo enum value.
 * @param {!string} state
 * @return {!mediaRouter.mojom.MediaRouter.PresentationConnectionState}
 */
Converts presentation connection state to Mojo enum value.
Converts presentation connection state to Mojo enum value .
function presentationConnectionStateToMojo_(state) {
  var PresentationConnectionState =
      mediaRouter.mojom.MediaRouter.PresentationConnectionState;
  switch (state) {
    case 'connecting':
      return PresentationConnectionState.CONNECTING;
    case 'connected':
      return PresentationConnectionState.CONNECTED;
    case 'closed':
      return PresentationConnectionState.CLOSED;
    case 'terminated':
      return PresentationConnectionState.TERMINATED;
    default:
      console.error('Unknown presentation connection state: ' + state);
      return PresentationConnectionState.TERMINATED;
  }
}
function presentationConnectionStateToMojo_ ( state ) { var PresentationConnectionState = mediaRouter . mojom . MediaRouter . PresentationConnectionState ; switch ( state ) { case 'connecting' : return PresentationConnectionState . CONNECTING ; case 'connected' : return PresentationConnectionState . CONNECTED ; case 'closed' : return PresentationConnectionState . CLOSED ; case 'terminated' : return PresentationConnectionState . TERMINATED ; default : console . error ( 'Unknown presentation connection state: ' + state ) ; return PresentationConnectionState . TERMINATED ; } }
Converts presentation connection state to Mojo enum value.
Converts presentation connection state to Mojo enum value .