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
3 // found in the LICENSE file.
5 // This Polymer element shows information from media that is currently cast
6 // to a device. It is assumed that |route| and |sink| correspond to each other.
12 * The text for the current casting activity status.
22 * @type {?media_router.Route}
31 * @type {?media_router.Sink}
36 observer: 'updateActivityStatus_',
40 * The text for the stop casting button.
43 stopCastingButtonText_: {
45 value: loadTimeData.getString('stopCastingButton'),
50 * Fires a back-click event. This is called when the back link is clicked.
55 this.fire('back-click');
59 * Fires a close-route-click event. This is called when the button to close
60 * the current route is clicked.
64 closeRoute_: function() {
65 this.fire('close-route-click', {route: this.route});
69 * Updates |activityStatus_| with the name of |sink|.
73 updateActivityStatus_: function() {
74 this.activityStatus_ = this.sink ?
75 loadTimeData.getStringF('castingActivityStatus', this.sink.name) : '';