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

Unified Diff: chrome/browser/resources/md_history/app.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: 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
Index: chrome/browser/resources/md_history/app.js
diff --git a/chrome/browser/resources/md_history/app.js b/chrome/browser/resources/md_history/app.js
index a16204324a4bf4384f0b4b5fb8b3d1c2846d2305..fc47fcb72bfa3948d3142c950e831bf3df2d10f2 100644
--- a/chrome/browser/resources/md_history/app.js
+++ b/chrome/browser/resources/md_history/app.js
@@ -40,6 +40,8 @@ Polymer({
querying: true,
searchTerm: '',
results: null,
+ // Whether the most recent query was incremental.
+ incremental: false,
info: null,
range: HistoryRange.ALL_TIME,
// TODO(calamity): Make history toolbar buttons change the offset.
@@ -175,6 +177,7 @@ Polymer({
return;
this.set('queryState_.querying', true);
+ this.set('queryState_.incremental', incremental);
var queryState = this.queryState_;
@@ -211,7 +214,19 @@ Polymer({
return selectedPage;
},
- syncedTabsSelected_(selectedPage) {
tsergeant 2016/06/06 04:33:16 From the Dept. Of Why Did This Ever Work, apparent
calamity 2016/06/07 04:46:04 Oops + wat
Dan Beam 2016/06/08 01:18:38 http://es6-features.org/#MethodProperties
tsergeant 2016/06/08 02:53:53 Aaaaahhhh, interesting.
+ syncedTabsSelected_: function(selectedPage) {
return selectedPage == 'history-synced-device-manager';
+ },
+
+ /**
+ * True if the backend is searching using a new search term.
calamity 2016/06/07 04:46:04 This is a bit weird. It's not immediately obvious
tsergeant 2016/06/07 06:54:54 Done. As discussed, also renamed the `processing`
+ * @param {boolean} querying
+ * @param {boolean} incremental
+ * @param {string} searchTerm
+ * @return {boolean}
+ * @private
+ */
+ isSearching_: function(querying, incremental, searchTerm) {
+ return querying && !incremental && searchTerm != '';
}
});

Powered by Google App Engine
This is Rietveld 408576698