OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @typedef {{querying: boolean, | 6 * @typedef {{querying: boolean, |
7 * searchTerm: string, | 7 * searchTerm: string, |
8 * results: ?Array<!HistoryEntry>, | 8 * results: ?Array<!HistoryEntry>, |
9 * info: ?HistoryQuery, | 9 * info: ?HistoryQuery, |
10 * incremental: boolean, | 10 * incremental: boolean, |
11 * range: HistoryRange, | 11 * range: HistoryRange, |
12 * groupedOffset: number, | 12 * groupedOffset: number, |
13 * sessionList: ?Array<!ForeignSession>}} | 13 * sessionList: ?Array<!ForeignSession>}} |
14 */ | 14 */ |
15 var QueryState; | 15 var QueryState; |
16 | 16 |
17 Polymer({ | 17 Polymer({ |
18 is: 'history-app', | 18 is: 'history-app', |
19 | 19 |
20 properties: { | 20 properties: { |
21 // The id of the currently selected page. | 21 // The id of the currently selected page. |
22 selectedPage_: String, | 22 selectedPage_: String, |
23 | 23 |
24 // Whether domain-grouped history is enabled. | 24 // Whether domain-grouped history is enabled. |
25 grouped_: Boolean, | 25 grouped_: { |
| 26 type: Boolean, |
| 27 reflectToAttribute: true |
| 28 }, |
26 | 29 |
27 // Whether the first set of results have returned. | 30 // Whether the first set of results have returned. |
28 firstLoad_: { type: Boolean, value: true }, | 31 firstLoad_: { type: Boolean, value: true }, |
29 | 32 |
30 // True if the history queries are disabled. | 33 // True if the history queries are disabled. |
31 queryingDisabled_: Boolean, | 34 queryingDisabled_: Boolean, |
32 | 35 |
33 /** @type {!QueryState} */ | 36 /** @type {!QueryState} */ |
34 // TODO(calamity): Split out readOnly data into a separate property which is | 37 // TODO(calamity): Split out readOnly data into a separate property which is |
35 // only set on result return. | 38 // only set on result return. |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 * @param {boolean} incremental | 238 * @param {boolean} incremental |
236 * @param {string} searchTerm | 239 * @param {string} searchTerm |
237 * @return {boolean} Whether a loading spinner should be shown (implies the | 240 * @return {boolean} Whether a loading spinner should be shown (implies the |
238 * backend is querying a new search term). | 241 * backend is querying a new search term). |
239 * @private | 242 * @private |
240 */ | 243 */ |
241 shouldShowSpinner_: function(querying, incremental, searchTerm) { | 244 shouldShowSpinner_: function(querying, incremental, searchTerm) { |
242 return querying && !incremental && searchTerm != ''; | 245 return querying && !incremental && searchTerm != ''; |
243 } | 246 } |
244 }); | 247 }); |
OLD | NEW |