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

Unified 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: Removing Logging Statements 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/media_router/elements/route_details/route_details.js
diff --git a/chrome/browser/resources/media_router/elements/route_details/route_details.js b/chrome/browser/resources/media_router/elements/route_details/route_details.js
index 92ba82eccf98442b937c07126e479281c688eb5e..a6864458a147006fd06d2122aa772e0b23bb6a0a 100644
--- a/chrome/browser/resources/media_router/elements/route_details/route_details.js
+++ b/chrome/browser/resources/media_router/elements/route_details/route_details.js
@@ -47,6 +47,15 @@ Polymer({
},
/**
+ * The text for the join casting button.
+ * @private {string}
+ */
+ joinCastingButtonText_: {
+ type: String,
+ value: loadTimeData.getString('joinCastingButton'),
+ },
+
+ /**
* The text for the stop casting button.
* @private {string}
*/
@@ -66,6 +75,24 @@ Polymer({
type: Boolean,
value: true,
},
+
+ /**
+ * Whether the join button is hidden.
+ * The join button is shown iff |route| specifies customControllerPath
+ * and the view can be loaded.
+ * @private {boolean}
+ */
+ canJoin: {type: Boolean, value: true},
+ },
+
+ /**
+ * Fires a join-route-click event. This is called when the button to
+ * the current route is clicked.
+ *
+ * @private
+ */
+ joinRoute_: function() {
+ this.fire('join-route-click', {route: this.route});
},
/**
@@ -86,10 +113,11 @@ Polymer({
* @private
*/
maybeLoadCustomController_: function() {
- this.activityStatus_ = this.route ?
- loadTimeData.getStringF('castingActivityStatus',
- this.route.description) :
- '';
+ this.activityStatus_ =
+ this.route ?
+ loadTimeData.getStringF(
+ 'castingActivityStatus', this.route.description) :
+ '';
if (!this.route || !this.route.customControllerPath) {
this.isCustomControllerHidden_ = true;
@@ -106,12 +134,14 @@ Polymer({
var that = this;
extensionview.load(this.route.customControllerPath)
- .then(function() {
- // Load was successful; show the custom controller.
- that.isCustomControllerHidden_ = false;
- }, function() {
- // Load was unsuccessful; fall back to default view.
- that.isCustomControllerHidden_ = true;
- });
+ .then(
+ function() {
+ // Load was successful; show the custom controller.
+ that.isCustomControllerHidden_ = false;
+ },
+ function() {
+ // Load was unsuccessful; fall back to default view.
+ that.isCustomControllerHidden_ = true;
+ });
},
});

Powered by Google App Engine
This is Rietveld 408576698