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

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

Issue 1363593003: [Media Router] Set timeout for route creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes per imcheng@'s comments. Created 5 years, 2 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 | « chrome/test/media_router/media_router_integration_browsertest.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 13 matching lines...) Expand all
24 /** 24 /**
25 * Converts a media sink to a MediaSink Mojo object. 25 * Converts a media sink to a MediaSink Mojo object.
26 * @param {!MediaSink} sink A media sink. 26 * @param {!MediaSink} sink A media sink.
27 * @return {!mediaRouterMojom.MediaSink} A Mojo MediaSink object. 27 * @return {!mediaRouterMojom.MediaSink} A Mojo MediaSink object.
28 */ 28 */
29 function sinkToMojo_(sink) { 29 function sinkToMojo_(sink) {
30 return new mediaRouterMojom.MediaSink({ 30 return new mediaRouterMojom.MediaSink({
31 'name': sink.friendlyName, 31 'name': sink.friendlyName,
32 'sink_id': sink.id, 32 'sink_id': sink.id,
33 'icon_type': sinkIconTypeToMojo(sink.iconType), 33 'icon_type': sinkIconTypeToMojo(sink.iconType),
34 'is_launching': sink.isLaunching_,
35 }); 34 });
36 } 35 }
37 36
38 /** 37 /**
39 * Converts a media sink's icon type to a MediaSink.IconType Mojo object. 38 * Converts a media sink's icon type to a MediaSink.IconType Mojo object.
40 * @param {!MediaSink.IconType} type A media sink's icon type. 39 * @param {!MediaSink.IconType} type A media sink's icon type.
41 * @return {!mediaRouterMojom.MediaSink.IconType} A Mojo MediaSink.IconType 40 * @return {!mediaRouterMojom.MediaSink.IconType} A Mojo MediaSink.IconType
42 * object. 41 * object.
43 */ 42 */
44 function sinkIconTypeToMojo(type) { 43 function sinkIconTypeToMojo(type) {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 }; 549 };
551 550
552 mediaRouter = new MediaRouter(connector.bindHandleToProxy( 551 mediaRouter = new MediaRouter(connector.bindHandleToProxy(
553 serviceProvider.connectToService( 552 serviceProvider.connectToService(
554 mediaRouterMojom.MediaRouter.name), 553 mediaRouterMojom.MediaRouter.name),
555 mediaRouterMojom.MediaRouter)); 554 mediaRouterMojom.MediaRouter));
556 555
557 return mediaRouter; 556 return mediaRouter;
558 }); 557 });
559 558
OLDNEW
« no previous file with comments | « chrome/test/media_router/media_router_integration_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698