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

Side by Side Diff: chrome/browser/resources/media_router/elements/route_details/route_details.js

Issue 2932933002: [Media Router] Increment the media's current_time in the WebUI route controller (Closed)
Patch Set: Check that we can increment in onRouteStatusChange_() Created 3 years, 6 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 // This Polymer element shows information from media that is currently cast 5 // This Polymer element shows information from media that is currently cast
6 // to a device. 6 // to a device.
7 Polymer({ 7 Polymer({
8 is: 'route-details', 8 is: 'route-details',
9 9
10 properties: { 10 properties: {
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 if (this.controllerType_ === media_router.ControllerType.WEBUI && 231 if (this.controllerType_ === media_router.ControllerType.WEBUI &&
232 this.$$('route-controls')) { 232 this.$$('route-controls')) {
233 media_router.ui.setRouteControls( 233 media_router.ui.setRouteControls(
234 /** @type {RouteControlsInterface} */ (this.$$('route-controls'))); 234 /** @type {RouteControlsInterface} */ (this.$$('route-controls')));
235 } 235 }
236 }, 236 },
237 237
238 /** 238 /**
239 * Updates either the extensionview or the WebUI route controller, depending 239 * Updates either the extensionview or the WebUI route controller, depending
240 * on which should be shown. 240 * on which should be shown.
241 * @param {?media_router.Route} newRoute
241 * @private 242 * @private
242 */ 243 */
243 onRouteChange_: function(newRoute) { 244 onRouteChange_: function(newRoute) {
244 if (this.controllerType_ !== media_router.ControllerType.WEBUI) { 245 if (this.controllerType_ !== media_router.ControllerType.WEBUI) {
245 this.updateActivityStatus_(); 246 this.updateActivityStatus_();
246 } 247 } else if (this.$$('route-controls')) {
247 if (newRoute &&
248 this.controllerType_ === media_router.ControllerType.WEBUI &&
249 this.$$('route-controls')) {
250 this.$$('route-controls').onRouteUpdated(newRoute); 248 this.$$('route-controls').onRouteUpdated(newRoute);
251 } 249 }
252 }, 250 },
253 251
254 /** 252 /**
255 * @param {number} controllerType 253 * @param {number} controllerType
256 * @return {boolean} Whether the extensionview should be shown instead of the 254 * @return {boolean} Whether the extensionview should be shown instead of the
257 * default route info element or the WebUI route controller. 255 * default route info element or the WebUI route controller.
258 * @private 256 * @private
259 */ 257 */
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 this.fire('join-route-click', {route: this.route}); 293 this.fire('join-route-click', {route: this.route});
296 } else { 294 } else {
297 this.fire('change-route-source-click', { 295 this.fire('change-route-source-click', {
298 route: this.route, 296 route: this.route,
299 selectedCastMode: 297 selectedCastMode:
300 this.computeSelectedCastMode_(this.shownCastModeValue, this.sink) 298 this.computeSelectedCastMode_(this.shownCastModeValue, this.sink)
301 }); 299 });
302 } 300 }
303 }, 301 },
304 }); 302 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698