| 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. | 6 // to a device. |
| 7 Polymer({ | 7 Polymer({ |
| 8 is: 'route-details', | 8 is: 'route-details', |
| 9 | 9 |
| 10 properties: { | 10 properties: { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 observer: 'maybeLoadCustomController_', | 27 observer: 'maybeLoadCustomController_', |
| 28 }, | 28 }, |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * The text for the stop casting button. | 31 * The text for the stop casting button. |
| 32 * @private {string} | 32 * @private {string} |
| 33 */ | 33 */ |
| 34 stopCastingButtonText_: { | 34 stopCastingButtonText_: { |
| 35 type: String, | 35 type: String, |
| 36 readOnly: true, | 36 readOnly: true, |
| 37 value: loadTimeData.getString('stopCastingButton'), | 37 value: function() { |
| 38 return loadTimeData.getString('stopCastingButton'); |
| 39 }, |
| 38 }, | 40 }, |
| 39 | 41 |
| 40 /** | 42 /** |
| 41 * Whether the custom controller should be hidden. | 43 * Whether the custom controller should be hidden. |
| 42 * A custom controller is shown iff |route| specifies customControllerPath | 44 * A custom controller is shown iff |route| specifies customControllerPath |
| 43 * and the view can be loaded. | 45 * and the view can be loaded. |
| 44 * @private {boolean} | 46 * @private {boolean} |
| 45 */ | 47 */ |
| 46 isCustomControllerHidden_: { | 48 isCustomControllerHidden_: { |
| 47 type: Boolean, | 49 type: Boolean, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 extensionview.load(this.route.customControllerPath) | 91 extensionview.load(this.route.customControllerPath) |
| 90 .then(function() { | 92 .then(function() { |
| 91 // Load was successful; show the custom controller. | 93 // Load was successful; show the custom controller. |
| 92 that.isCustomControllerHidden_ = false; | 94 that.isCustomControllerHidden_ = false; |
| 93 }, function() { | 95 }, function() { |
| 94 // Load was unsuccessful; fall back to default view. | 96 // Load was unsuccessful; fall back to default view. |
| 95 that.isCustomControllerHidden_ = true; | 97 that.isCustomControllerHidden_ = true; |
| 96 }); | 98 }); |
| 97 }, | 99 }, |
| 98 }); | 100 }); |
| OLD | NEW |