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

Unified Diff: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js

Issue 1521433002: [MediaRouter UI] Compile MR WebUI js code with Closure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
diff --git a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
index d64e3935eaa8d1def34ed2da4f71732c3d6d016c..3876c68d579fba5b1c2aec84ed9add2fe9031794 100644
--- a/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
+++ b/chrome/browser/resources/media_router/elements/media_router_container/media_router_container.js
@@ -52,7 +52,7 @@ Polymer({
*/
currentView_: {
type: String,
- value: '',
+ value: null,
},
/**
@@ -62,7 +62,9 @@ Polymer({
deviceMissingText_: {
type: String,
readOnly: true,
- value: loadTimeData.getString('deviceMissing'),
+ value: function() {
+ return loadTimeData.getString('deviceMissing');
+ },
},
/**
@@ -86,11 +88,11 @@ Polymer({
/**
* The header text tooltip. This would be descriptive of the
* source origin, whether a host name, tab URL, etc.
- * @type {string}
+ * @type {?string}
*/
headerTextTooltip: {
type: String,
- value: '',
+ value: null,
},
/**
@@ -110,7 +112,9 @@ Polymer({
issueHeaderText_: {
type: String,
readOnly: true,
- value: loadTimeData.getString('issueHeader'),
+ value: function() {
+ return loadTimeData.getString('issueHeader');
+ },
},
/**
@@ -157,7 +161,9 @@ Polymer({
selectCastModeHeaderText_: {
type: String,
readOnly: true,
- value: loadTimeData.getString('selectCastModeHeader'),
+ value: function() {
+ return loadTimeData.getString('selectCastModeHeader');
+ },
},
/**
@@ -167,7 +173,9 @@ Polymer({
shareYourScreenSubheadingText_: {
type: String,
readOnly: true,
- value: loadTimeData.getString('shareYourScreenSubheading'),
+ value: function() {
+ return loadTimeData.getString('shareYourScreenSubheading');
+ },
},
/**
@@ -300,7 +308,7 @@ Polymer({
},
/**
- * @param {media_router.MediaRouterView} view The current view.
+ * @param {?media_router.MediaRouterView} view The current view.
* @return {boolean} Whether or not to hide the cast mode list.
* @private
*/
@@ -343,7 +351,7 @@ Polymer({
},
/**
- * @param {media_router.MediaRouterView} view The current view.
+ * @param {?media_router.MediaRouterView} view The current view.
* @param {?media_router.Issue} issue The current issue.
* @return {boolean} Whether or not to hide the header.
* @private
@@ -355,7 +363,7 @@ Polymer({
},
/**
- * @param {media_router.MediaRouterView} view The current view.
+ * @param {?media_router.MediaRouterView} view The current view.
* @param {string} headerText The header text for the sink list.
* @return {string} The text for the header.
* @private
@@ -377,7 +385,7 @@ Polymer({
},
/**
- * @param {media_router.MediaRouterView} view The current view.
+ * @param {?media_router.MediaRouterView} view The current view.
* @param {string} headerTooltip The tooltip for the header for the sink
* list.
* @return {string} The tooltip for the header.
@@ -388,8 +396,8 @@ Polymer({
},
/**
- * @param {string} The ID of the sink that is currently launching, or empty
- * string if none exists.
+ * @param {string} currentLaunchingSinkId ID of the sink that is currently
+ * launching, or empty string if none exists.
* @private
*/
computeIsLaunching_: function(currentLaunchingSinkId) {
@@ -406,7 +414,7 @@ Polymer({
},
/**
- * @param {media_router.MediaRouterView} view The current view.
+ * @param {?media_router.MediaRouterView} view The current view.
* @param {?media_router.Issue} issue The current issue.
* @return {boolean} Whether or not to show the issue banner.
* @private
@@ -429,7 +437,7 @@ Polymer({
},
/**
- * @param {media_router.MediaRouterView} view The current view.
+ * @param {?media_router.MediaRouterView} view The current view.
* @param {?media_router.Issue} issue The current issue.
* @return {boolean} Whether or not to hide the route details.
* @private
@@ -486,7 +494,7 @@ Polymer({
},
/**
- * @param {!string} currentLauchingSinkid The ID of the sink that is
+ * @param {!string} currentLaunchingSinkId The ID of the sink that is
* currently launching.
* @param {!string} sinkId A sink ID.
* @private
@@ -496,7 +504,7 @@ Polymer({
},
/**
- * @param {!Array<!media_router.Sink>} The list of sinks.
+ * @param {!Array<!media_router.Sink>} sinksToShow The list of sinks.
* @return {boolean} Whether or not to hide the sink list.
* @private
*/
@@ -505,7 +513,7 @@ Polymer({
},
/**
- * @param {media_router.MediaRouterView} view The current view.
+ * @param {?media_router.MediaRouterView} view The current view.
* @param {?media_router.Issue} issue The current issue.
* @return {boolean} Whether or not to hide entire the sink list view.
* @private
@@ -529,7 +537,7 @@ Polymer({
if (route && !this.isEmptyOrWhitespace_(route.description))
return route.description;
- return sink.description;
+ return /** @type {string} */(sink.description);
Dan Beam 2015/12/29 01:25:38 nit: if you're sure this will never be null ret
imcheng 2016/01/04 20:02:04 Done.
},
/**
@@ -802,7 +810,7 @@ Polymer({
* @param {!media_router.CastMode} castMode
*/
setShownCastMode_: function(castMode) {
- if (this.shownCastMode_ == castMode.type)
+ if (this.shownCastModeValue_ == castMode.type)
return;
this.shownCastModeValue_ = castMode.type;

Powered by Google App Engine
This is Rietveld 408576698