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

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: Review Fixes 3 * WITH UI Changes Created 5 years 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 /**
41 * Whether the custom controller should be hidden. 51 * Whether the custom controller should be hidden.
42 * A custom controller is shown iff |route| specifies customControllerPath 52 * A custom controller is shown iff |route| specifies customControllerPath
43 * and the view can be loaded. 53 * and the view can be loaded.
44 * @private {boolean} 54 * @private {boolean}
45 */ 55 */
46 isCustomControllerHidden_: { 56 isCustomControllerHidden_: {
47 type: Boolean, 57 type: Boolean,
48 value: true, 58 value: true,
49 }, 59 },
50 }, 60 },
51 61
52 /** 62 /**
63 * Fires a join-route-click event. This is called when the button to join
64 * the current route is clicked.
65 *
66 * @private
67 */
68 joinRoute_: function() {
apacible 2015/12/18 22:34:19 nit: alphabetize after closeRoute_.
matt.boetger 2015/12/18 23:37:15 Done.
69 this.fire('join-route-click', {route: this.route});
70 },
71
72 /**
53 * Fires a close-route-click event. This is called when the button to close 73 * Fires a close-route-click event. This is called when the button to close
54 * the current route is clicked. 74 * the current route is clicked.
55 * 75 *
56 * @private 76 * @private
57 */ 77 */
58 closeRoute_: function() { 78 closeRoute_: function() {
59 this.fire('close-route-click', {route: this.route}); 79 this.fire('close-route-click', {route: this.route});
60 }, 80 },
61 81
62 /** 82 /**
(...skipping 26 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