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 26 matching lines...) Expand all Loading... |
37 value: loadTimeData.getString('joinButton'), | 37 value: loadTimeData.getString('joinButton'), |
38 }, | 38 }, |
39 | 39 |
40 /** | 40 /** |
41 * The text for the stop casting button. | 41 * The text for the stop casting button. |
42 * @private {string} | 42 * @private {string} |
43 */ | 43 */ |
44 stopCastingButtonText_: { | 44 stopCastingButtonText_: { |
45 type: String, | 45 type: String, |
46 readOnly: true, | 46 readOnly: true, |
47 value: loadTimeData.getString('stopCastingButton'), | 47 value: function() { |
| 48 return loadTimeData.getString('stopCastingButton'); |
| 49 }, |
48 }, | 50 }, |
49 | 51 |
50 /** | 52 /** |
51 * Whether the custom controller should be hidden. | 53 * Whether the custom controller should be hidden. |
52 * A custom controller is shown iff |route| specifies customControllerPath | 54 * A custom controller is shown iff |route| specifies customControllerPath |
53 * and the view can be loaded. | 55 * and the view can be loaded. |
54 * @private {boolean} | 56 * @private {boolean} |
55 */ | 57 */ |
56 isCustomControllerHidden_: { | 58 isCustomControllerHidden_: { |
57 type: Boolean, | 59 type: Boolean, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 extensionview.load(this.route.customControllerPath) | 111 extensionview.load(this.route.customControllerPath) |
110 .then(function() { | 112 .then(function() { |
111 // Load was successful; show the custom controller. | 113 // Load was successful; show the custom controller. |
112 that.isCustomControllerHidden_ = false; | 114 that.isCustomControllerHidden_ = false; |
113 }, function() { | 115 }, function() { |
114 // Load was unsuccessful; fall back to default view. | 116 // Load was unsuccessful; fall back to default view. |
115 that.isCustomControllerHidden_ = true; | 117 that.isCustomControllerHidden_ = true; |
116 }); | 118 }); |
117 }, | 119 }, |
118 }); | 120 }); |
OLD | NEW |