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

Unified Diff: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js

Issue 2032313002: MD WebUI: Add loading spinner to cr-toolbar, hook into MD History toolbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Closure comments Created 4 years, 6 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 | « ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
index 1729ff9d062bb8cb55020f9a0e78aa98efa59231..1036e4996952dc53524bf62904c73140ab7dd0f4 100644
--- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
+++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
@@ -19,6 +19,13 @@ Polymer({
// Tooltip to display on the clear search button.
clearLabel: String,
+
+ // When true, show a loading spinner to indicate that the backend is
+ // processing the search. Will only show if the search field is open.
+ spinnerActive: {
+ type: Boolean,
+ reflectToAttribute: true
+ },
},
listeners: {
@@ -34,6 +41,16 @@ Polymer({
return narrow ? 0 : -1;
},
+ /**
+ * @param {boolean} spinnerActive
+ * @param {boolean} showingSearch
+ * @return {boolean}
+ * @private
+ */
+ isSpinnerShown_: function(spinnerActive, showingSearch) {
+ return spinnerActive && showingSearch;
+ },
+
/** @private */
onInputBlur_: function() {
if (!this.hasSearchText)
« no previous file with comments | « ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698