Chromium Code Reviews| 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..fa0a15669186af4175b3cb2c3629b0a4966aa1d0 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, |
|
dpapad
2016/06/08 00:07:35
Shouldn't the QueryState typedef also be upadated?
tsergeant
2016/06/08 02:53:54
Done.
|
| 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,20 @@ Polymer({ |
| return selectedPage; |
| }, |
| - syncedTabsSelected_(selectedPage) { |
| + syncedTabsSelected_: function(selectedPage) { |
|
dpapad
2016/06/08 00:07:35
Same here.
tsergeant
2016/06/08 02:53:54
Done.
|
| return selectedPage == 'history-synced-device-manager'; |
| + }, |
| + |
| + /** |
| + * True if the toolbar should show a loading spinner. True when the backend is |
| + * querying a new search term. |
| + * @param {boolean} querying |
| + * @param {boolean} incremental |
| + * @param {string} searchTerm |
| + * @return {boolean} |
|
dpapad
2016/06/08 00:07:36
Nit: Move the comment at lines 222-223 here, as fo
tsergeant
2016/06/08 02:53:54
Done.
|
| + * @private |
| + */ |
| + shouldShowSpinner_: function(querying, incremental, searchTerm) { |
| + return querying && !incremental && searchTerm != ''; |
| } |
| }); |