| OLD | NEW |
| 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. It is assumed that |route| and |sink| correspond to each other. | 6 // to a device. |
| 7 Polymer({ | 7 Polymer({ |
| 8 is: 'route-details', | 8 is: 'route-details', |
| 9 | 9 |
| 10 properties: { | 10 properties: { |
| 11 /** | 11 /** |
| 12 * The text for the current casting activity status. | 12 * The text for the current casting activity status. |
| 13 * @private {string} | 13 * @private {string} |
| 14 */ | 14 */ |
| 15 activityStatus_: { | 15 activityStatus_: { |
| 16 type: String, | 16 type: String, |
| 17 value: '', | 17 value: '', |
| 18 }, | 18 }, |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * The current view to be shown. | |
| 22 * @private {media_router.MediaRouterView} | |
| 23 */ | |
| 24 currentView_: { | |
| 25 type: String, | |
| 26 readOnly: true, | |
| 27 value: media_router.MediaRouterView.ROUTE_DETAILS, | |
| 28 }, | |
| 29 | |
| 30 /** | |
| 31 * The route to show. | 21 * The route to show. |
| 32 * @type {?media_router.Route} | 22 * @type {?media_router.Route} |
| 33 */ | 23 */ |
| 34 route: { | 24 route: { |
| 35 type: Object, | 25 type: Object, |
| 36 value: null, | 26 value: null, |
| 37 observer: 'maybeLoadCustomController_', | 27 observer: 'maybeLoadCustomController_', |
| 38 }, | 28 }, |
| 39 | 29 |
| 40 /** | 30 /** |
| 41 * The sink to show. | |
| 42 * @type {?media_router.Sink} | |
| 43 */ | |
| 44 sink: { | |
| 45 type: Object, | |
| 46 value: null, | |
| 47 }, | |
| 48 | |
| 49 /** | |
| 50 * The text for the stop casting button. | 31 * The text for the stop casting button. |
| 51 * @private {string} | 32 * @private {string} |
| 52 */ | 33 */ |
| 53 stopCastingButtonText_: { | 34 stopCastingButtonText_: { |
| 54 type: String, | 35 type: String, |
| 55 readOnly: true, | 36 readOnly: true, |
| 56 value: loadTimeData.getString('stopCastingButton'), | 37 value: loadTimeData.getString('stopCastingButton'), |
| 57 }, | 38 }, |
| 58 | 39 |
| 59 /** | 40 /** |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 extensionview.load(this.route.customControllerPath) | 89 extensionview.load(this.route.customControllerPath) |
| 109 .then(function() { | 90 .then(function() { |
| 110 // Load was successful; show the custom controller. | 91 // Load was successful; show the custom controller. |
| 111 that.isCustomControllerHidden_ = false; | 92 that.isCustomControllerHidden_ = false; |
| 112 }, function() { | 93 }, function() { |
| 113 // Load was unsuccessful; fall back to default view. | 94 // Load was unsuccessful; fall back to default view. |
| 114 that.isCustomControllerHidden_ = true; | 95 that.isCustomControllerHidden_ = true; |
| 115 }); | 96 }); |
| 116 }, | 97 }, |
| 117 }); | 98 }); |
| OLD | NEW |