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

Side by Side Diff: chrome/browser/resources/media_router/media_router_data.js

Issue 2862393002: [Media Router] Force DEFAULT cast mode when starting presentations from content. (Closed)
Patch Set: Extend CastModeListTests to check sink list Created 3 years, 7 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 // Any strings used here will already be localized. Values such as 5 // Any strings used here will already be localized. Values such as
6 // CastMode.type or IDs will be defined elsewhere and determined later. 6 // CastMode.type or IDs will be defined elsewhere and determined later.
7 7
8 cr.exportPath('media_router'); 8 cr.exportPath('media_router');
9 9
10 /** 10 /**
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 REQUEST_PENDING: 'request_pending' 97 REQUEST_PENDING: 'request_pending'
98 }; 98 };
99 99
100 cr.define('media_router', function() { 100 cr.define('media_router', function() {
101 'use strict'; 101 'use strict';
102 102
103 /** 103 /**
104 * @param {number} type The type of cast mode. 104 * @param {number} type The type of cast mode.
105 * @param {string} description The description of the cast mode. 105 * @param {string} description The description of the cast mode.
106 * @param {?string} host The hostname of the site to cast. 106 * @param {?string} host The hostname of the site to cast.
107 * @param {boolean} isForced True if the mode is forced.
107 * @constructor 108 * @constructor
108 * @struct 109 * @struct
109 */ 110 */
110 var CastMode = function(type, description, host) { 111 var CastMode = function(type, description, host, isForced) {
111 /** @type {number} */ 112 /** @type {number} */
112 this.type = type; 113 this.type = type;
113 114
114 /** @type {string} */ 115 /** @type {string} */
115 this.description = description; 116 this.description = description;
116 117
117 /** @type {?string} */ 118 /** @type {?string} */
118 this.host = host || null; 119 this.host = host || null;
120
121 /** @type {boolean} */
122 this.isForced = isForced;
119 }; 123 };
120 124
121 /** 125 /**
122 * Placeholder object for AUTO cast mode. See comment in CastModeType. 126 * Placeholder object for AUTO cast mode. See comment in CastModeType.
123 * @const {!media_router.CastMode} 127 * @const {!media_router.CastMode}
124 */ 128 */
125 var AUTO_CAST_MODE = new CastMode(media_router.CastModeType.AUTO, 129 var AUTO_CAST_MODE = new CastMode(media_router.CastModeType.AUTO,
126 loadTimeData.getString('autoCastMode'), null); 130 loadTimeData.getString('autoCastMode'), null);
127 131
128 /** 132 /**
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 267
264 return { 268 return {
265 AUTO_CAST_MODE: AUTO_CAST_MODE, 269 AUTO_CAST_MODE: AUTO_CAST_MODE,
266 CastMode: CastMode, 270 CastMode: CastMode,
267 Issue: Issue, 271 Issue: Issue,
268 Route: Route, 272 Route: Route,
269 Sink: Sink, 273 Sink: Sink,
270 TabInfo: TabInfo, 274 TabInfo: TabInfo,
271 }; 275 };
272 }); 276 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698