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

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

Issue 1874983005: [Media Router WebUI] Fix whitespace in filter when no devices present. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f22eb6060b7c1917e965499945928b544fe1b7b3..6fe3e3da25169b7f0d3c1310c5877f31cbcba4e4 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
@@ -375,7 +375,8 @@ Polymer({
/**
* Sinks to display that match |searchInputText_|.
- * @private {!Array<!media_router.Sink>}
+ * @private {!Array<!{sinkItem: !media_router.Sink,
+ * substrings: Array<!Array<number>>}>}
*/
searchResultsToShow_: {
type: Array,
@@ -810,8 +811,9 @@ Polymer({
},
/**
- * @param {!Array<!media_router.Sink>} searchResultsToShow The sinks currently
- * matching the search text.
+ * @param {!Array<!{sinkItem: !media_router.Sink,
+ * substrings: Array<!Array<number>>}>} searchResultsToShow
+ * The sinks currently matching the search text.
* @param {boolean} isUserSearching Whether the user is searching for sinks.
* @return {boolean} Whether or not the 'no matches' message is hidden.
* @private
@@ -884,7 +886,9 @@ Polymer({
/**
* Computes whether the search results list should be hidden.
* @param {boolean} isUserSearching Whether the user is searching for sinks.
- * @param {!Array<!media_router.Sink>} searchResultsToShow The sinks currently
+ * @param {!Array<!{sinkItem: !media_router.Sink,
+ * substrings: Array<!Array<number>>}>} searchResultsToShow
+ * The sinks currently matching the search text.
* @return {boolean} Whether the search results list should be hidden.
* @private
*/
@@ -1042,12 +1046,15 @@ Polymer({
* first or last item in the list, as indicated by |currentView|.
* @param {?media_router.MediaRouterView} currentView The current view of the
* dialog.
+ * @param {!Array<!media_router.Sink>} sinksToShow The sinks available to
+ * display for the current cast mode.
* @return {string} The CSS that correctly sets the padding of #sink-search
* for the current view.
* @private
*/
- computeSinkSearchClass_: function(currentView) {
- return (currentView == media_router.MediaRouterView.FILTER) ? '' : 'bottom';
+ computeSinkSearchClass_: function(currentView, sinksToShow) {
+ return (currentView == media_router.MediaRouterView.FILTER &&
+ sinksToShow.length > 0) ? '' : 'bottom';
},
/**
« no previous file with comments | « chrome/browser/resources/media_router/elements/media_router_container/media_router_container.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698