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

Side by Side Diff: chrome/browser/resources/media_router/media_router_ui_interface.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
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 // API invoked by the browser MediaRouterWebUIMessageHandler to communicate 5 // API invoked by the browser MediaRouterWebUIMessageHandler to communicate
6 // with this UI. 6 // with this UI.
7 cr.define('media_router.ui', function() { 7 cr.define('media_router.ui', function() {
8 'use strict'; 8 'use strict';
9 9
10 // The media-router-container element. 10 // The media-router-container element.
11 var container = null; 11 var container = null;
12 12
13 /** 13 /**
14 * Handles timeout of previous create route attempt.
15 */
16 function onNotifyRouteCreationTimeout() {
17 container.onNotifyRouteCreationTimeout();
18 }
19
20 /**
14 * Handles response of previous create route attempt. 21 * Handles response of previous create route attempt.
15 * 22 *
16 * @param {string} sinkId The ID of the sink to which the Media Route was 23 * @param {string} sinkId The ID of the sink to which the Media Route was
17 * creating a route. 24 * creating a route.
18 * @param {?media_router.Route} route The newly create route to the sink 25 * @param {?media_router.Route} route The newly create route to the sink
19 * if route creation succeeded; null otherwise 26 * if route creation succeeded; null otherwise
20 */ 27 */
21 function onCreateRouteResponseReceived(sinkId, route) { 28 function onCreateRouteResponseReceived(sinkId, route) {
22 container.onCreateRouteResponseReceived(sinkId, route); 29 container.onCreateRouteResponseReceived(sinkId, route);
23 } 30 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 /** 95 /**
89 * Sets the list of discovered sinks. 96 * Sets the list of discovered sinks.
90 * 97 *
91 * @param {!Array<!media_router.Sink>} sinkList 98 * @param {!Array<!media_router.Sink>} sinkList
92 */ 99 */
93 function setSinkList(sinkList) { 100 function setSinkList(sinkList) {
94 container.sinkList = sinkList; 101 container.sinkList = sinkList;
95 } 102 }
96 103
97 return { 104 return {
105 onNotifyRouteCreationTimeout: onNotifyRouteCreationTimeout,
98 onCreateRouteResponseReceived: onCreateRouteResponseReceived, 106 onCreateRouteResponseReceived: onCreateRouteResponseReceived,
99 setCastModeList: setCastModeList, 107 setCastModeList: setCastModeList,
100 setContainer: setContainer, 108 setContainer: setContainer,
101 setInitialData: setInitialData, 109 setInitialData: setInitialData,
102 setIssue: setIssue, 110 setIssue: setIssue,
103 setRouteList: setRouteList, 111 setRouteList: setRouteList,
104 setSinkList: setSinkList, 112 setSinkList: setSinkList,
105 }; 113 };
106 }); 114 });
107 115
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 166 }
159 167
160 return { 168 return {
161 actOnIssue: actOnIssue, 169 actOnIssue: actOnIssue,
162 closeDialog: closeDialog, 170 closeDialog: closeDialog,
163 closeRoute: closeRoute, 171 closeRoute: closeRoute,
164 requestInitialData: requestInitialData, 172 requestInitialData: requestInitialData,
165 requestRoute: requestRoute, 173 requestRoute: requestRoute,
166 }; 174 };
167 }); 175 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/media_router/media_router_data.js ('k') | chrome/browser/ui/webui/media_router/media_cast_mode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698