Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: extensions/renderer/resources/media_router_bindings.js

Issue 1572433002: [Media Router] Add Connecting state to PresentationConnection to bring align with spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile fix Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/presentation/presentation_dispatcher.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var mediaRouter; 5 var mediaRouter;
6 6
7 define('media_router_bindings', [ 7 define('media_router_bindings', [
8 'mojo/public/js/bindings', 8 'mojo/public/js/bindings',
9 'mojo/public/js/core', 9 'mojo/public/js/core',
10 'content/public/renderer/service_provider', 10 'content/public/renderer/service_provider',
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 /** 101 /**
102 * Converts presentation connection state to Mojo enum value. 102 * Converts presentation connection state to Mojo enum value.
103 * @param {!string} state 103 * @param {!string} state
104 * @return {!mediaRouterMojom.MediaRouter.PresentationConnectionState} 104 * @return {!mediaRouterMojom.MediaRouter.PresentationConnectionState}
105 */ 105 */
106 function presentationConnectionStateToMojo_(state) { 106 function presentationConnectionStateToMojo_(state) {
107 var PresentationConnectionState = 107 var PresentationConnectionState =
108 mediaRouterMojom.MediaRouter.PresentationConnectionState; 108 mediaRouterMojom.MediaRouter.PresentationConnectionState;
109 switch (state) { 109 switch (state) {
110 case 'connecting':
111 return PresentationConnectionState.CONNECTING;
110 case 'connected': 112 case 'connected':
111 return PresentationConnectionState.CONNECTED; 113 return PresentationConnectionState.CONNECTED;
112 case 'closed': 114 case 'closed':
113 return PresentationConnectionState.CLOSED; 115 return PresentationConnectionState.CLOSED;
114 case 'terminated': 116 case 'terminated':
115 return PresentationConnectionState.TERMINATED; 117 return PresentationConnectionState.TERMINATED;
116 default: 118 default:
117 console.error('Unknown presentation connection state: ' + state); 119 console.error('Unknown presentation connection state: ' + state);
118 return PresentationConnectionState.TERMINATED; 120 return PresentationConnectionState.TERMINATED;
119 } 121 }
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 }; 594 };
593 595
594 mediaRouter = new MediaRouter(connector.bindHandleToProxy( 596 mediaRouter = new MediaRouter(connector.bindHandleToProxy(
595 serviceProvider.connectToService( 597 serviceProvider.connectToService(
596 mediaRouterMojom.MediaRouter.name), 598 mediaRouterMojom.MediaRouter.name),
597 mediaRouterMojom.MediaRouter)); 599 mediaRouterMojom.MediaRouter));
598 600
599 return mediaRouter; 601 return mediaRouter;
600 }); 602 });
601 603
OLDNEW
« no previous file with comments | « content/renderer/presentation/presentation_dispatcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698