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

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: Added Unit Tests Created 5 years, 1 month 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. It is assumed that |route| and |sink| correspond to each other. 6 // to a device. It is assumed that |route| and |sink| correspond to each other.
7 Polymer({ 7 Polymer({
8 is: 'route-details', 8 is: 'route-details',
9 9
10 properties: { 10 properties: {
(...skipping 29 matching lines...) Expand all
40 /** 40 /**
41 * The sink to show. 41 * The sink to show.
42 * @type {?media_router.Sink} 42 * @type {?media_router.Sink}
43 */ 43 */
44 sink: { 44 sink: {
45 type: Object, 45 type: Object,
46 value: null, 46 value: null,
47 }, 47 },
48 48
49 /** 49 /**
50 * The text for the join casting button.
51 * @private {string}
52 */
53 joinCastingButtonText_: {
54 type: String,
55 value: loadTimeData.getString('joinCastingButton'),
imcheng 2015/11/19 18:55:08 joinButton ?
matt.boetger 2015/11/24 19:45:24 Same could be said for the stop button - but I wan
imcheng 2015/11/26 00:49:45 For stop button, it is named so because the button
matt.boetger 2015/12/01 01:26:55 Done.
56 },
57
58 /**
50 * The text for the stop casting button. 59 * The text for the stop casting button.
51 * @private {string} 60 * @private {string}
52 */ 61 */
53 stopCastingButtonText_: { 62 stopCastingButtonText_: {
54 type: String, 63 type: String,
55 readOnly: true, 64 readOnly: true,
56 value: loadTimeData.getString('stopCastingButton'), 65 value: loadTimeData.getString('stopCastingButton'),
57 }, 66 },
58 67
59 /** 68 /**
60 * Whether the custom controller should be hidden. 69 * Whether the custom controller should be hidden.
61 * A custom controller is shown iff |route| specifies customControllerPath 70 * A custom controller is shown iff |route| specifies customControllerPath
62 * and the view can be loaded. 71 * and the view can be loaded.
63 * @private {boolean} 72 * @private {boolean}
64 */ 73 */
65 isCustomControllerHidden_: { 74 isCustomControllerHidden_: {
66 type: Boolean, 75 type: Boolean,
67 value: true, 76 value: true,
68 }, 77 },
69 }, 78 },
70 79
71 /** 80 /**
81 * Fires a join-route-click event. This is called when the button to
82 * the current route is clicked.
83 *
84 * @private
85 */
86 joinRoute_: function() {
87 this.fire('join-route-click', {route: this.route});
88 },
89
90 /**
72 * Fires a close-route-click event. This is called when the button to close 91 * Fires a close-route-click event. This is called when the button to close
73 * the current route is clicked. 92 * the current route is clicked.
74 * 93 *
75 * @private 94 * @private
76 */ 95 */
77 closeRoute_: function() { 96 closeRoute_: function() {
78 this.fire('close-route-click', {route: this.route}); 97 this.fire('close-route-click', {route: this.route});
79 }, 98 },
80 99
81 /** 100 /**
(...skipping 26 matching lines...) Expand all
108 extensionview.load(this.route.customControllerPath) 127 extensionview.load(this.route.customControllerPath)
109 .then(function() { 128 .then(function() {
110 // Load was successful; show the custom controller. 129 // Load was successful; show the custom controller.
111 that.isCustomControllerHidden_ = false; 130 that.isCustomControllerHidden_ = false;
112 }, function() { 131 }, function() {
113 // Load was unsuccessful; fall back to default view. 132 // Load was unsuccessful; fall back to default view.
114 that.isCustomControllerHidden_ = true; 133 that.isCustomControllerHidden_ = true;
115 }); 134 });
116 }, 135 },
117 }); 136 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698