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

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

Issue 1415103006: Non-Local Join for Media Router and Presentation API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing ChromeOS System Tray Test Created 4 years, 11 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 10 matching lines...) Expand all
21 * The route to show. 21 * The route to show.
22 * @type {?media_router.Route} 22 * @type {?media_router.Route}
23 */ 23 */
24 route: { 24 route: {
25 type: Object, 25 type: Object,
26 value: null, 26 value: null,
27 observer: 'maybeLoadCustomController_', 27 observer: 'maybeLoadCustomController_',
28 }, 28 },
29 29
30 /** 30 /**
31 * The text for the join button.
32 * @private {string}
33 */
34 joinButtonText_: {
35 type: String,
36 readOnly: true,
37 value: loadTimeData.getString('joinButton'),
38 },
39
40 /**
31 * The text for the stop casting button. 41 * The text for the stop casting button.
32 * @private {string} 42 * @private {string}
33 */ 43 */
34 stopCastingButtonText_: { 44 stopCastingButtonText_: {
35 type: String, 45 type: String,
36 readOnly: true, 46 readOnly: true,
37 value: loadTimeData.getString('stopCastingButton'), 47 value: loadTimeData.getString('stopCastingButton'),
38 }, 48 },
39 49
40 /** 50 /**
(...skipping 12 matching lines...) Expand all
53 * Fires a close-route-click event. This is called when the button to close 63 * Fires a close-route-click event. This is called when the button to close
54 * the current route is clicked. 64 * the current route is clicked.
55 * 65 *
56 * @private 66 * @private
57 */ 67 */
58 closeRoute_: function() { 68 closeRoute_: function() {
59 this.fire('close-route-click', {route: this.route}); 69 this.fire('close-route-click', {route: this.route});
60 }, 70 },
61 71
62 /** 72 /**
73 * Fires a join-route-click event. This is called when the button to join
74 * the current route is clicked.
75 *
76 * @private
77 */
78 joinRoute_: function() {
79 this.fire('join-route-click', {route: this.route});
80 },
81
82 /**
63 * Loads the custom controller if |route.customControllerPath| exists. 83 * Loads the custom controller if |route.customControllerPath| exists.
64 * Falls back to the default route details view otherwise, or if load fails. 84 * Falls back to the default route details view otherwise, or if load fails.
65 * Updates |activityStatus_| for the default view. 85 * Updates |activityStatus_| for the default view.
66 * 86 *
67 * @private 87 * @private
68 */ 88 */
69 maybeLoadCustomController_: function() { 89 maybeLoadCustomController_: function() {
70 this.activityStatus_ = this.route ? 90 this.activityStatus_ = this.route ?
71 loadTimeData.getStringF('castingActivityStatus', 91 loadTimeData.getStringF('castingActivityStatus',
72 this.route.description) : 92 this.route.description) :
(...skipping 16 matching lines...) Expand all
89 extensionview.load(this.route.customControllerPath) 109 extensionview.load(this.route.customControllerPath)
90 .then(function() { 110 .then(function() {
91 // Load was successful; show the custom controller. 111 // Load was successful; show the custom controller.
92 that.isCustomControllerHidden_ = false; 112 that.isCustomControllerHidden_ = false;
93 }, function() { 113 }, function() {
94 // Load was unsuccessful; fall back to default view. 114 // Load was unsuccessful; fall back to default view.
95 that.isCustomControllerHidden_ = true; 115 that.isCustomControllerHidden_ = true;
96 }); 116 });
97 }, 117 },
98 }); 118 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698