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 Polymer({ | 5 Polymer({ |
6 is: 'history-app', | 6 is: 'history-app', |
7 | 7 |
8 behaviors: [Polymer.IronScrollTargetBehavior], | 8 behaviors: [Polymer.IronScrollTargetBehavior], |
9 | 9 |
10 properties: { | 10 properties: { |
| 11 // Used to display notices for profile sign-in status. |
11 showSidebarFooter: Boolean, | 12 showSidebarFooter: Boolean, |
12 | 13 |
| 14 hasSyncedResults: Boolean, |
| 15 |
13 // The id of the currently selected page. | 16 // The id of the currently selected page. |
14 selectedPage_: {type: String, observer: 'unselectAll'}, | 17 selectedPage_: {type: String, observer: 'unselectAll'}, |
15 | 18 |
16 // Whether domain-grouped history is enabled. | 19 // Whether domain-grouped history is enabled. |
17 grouped_: {type: Boolean, reflectToAttribute: true}, | 20 grouped_: {type: Boolean, reflectToAttribute: true}, |
18 | 21 |
19 /** @type {!QueryState} */ | 22 /** @type {!QueryState} */ |
20 queryState_: { | 23 queryState_: { |
21 type: Object, | 24 type: Object, |
22 value: function() { | 25 value: function() { |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 * @param {string} searchTerm | 289 * @param {string} searchTerm |
287 * @return {boolean} Whether a loading spinner should be shown (implies the | 290 * @return {boolean} Whether a loading spinner should be shown (implies the |
288 * backend is querying a new search term). | 291 * backend is querying a new search term). |
289 * @private | 292 * @private |
290 */ | 293 */ |
291 shouldShowSpinner_: function(querying, incremental, searchTerm) { | 294 shouldShowSpinner_: function(querying, incremental, searchTerm) { |
292 return querying && !incremental && searchTerm != ''; | 295 return querying && !incremental && searchTerm != ''; |
293 }, | 296 }, |
294 | 297 |
295 /** | 298 /** |
| 299 * @param {boolean} hasSyncedResults |
| 300 * @param {string} selectedPage |
| 301 * @return {boolean} Whether the (i) synced results notice should be shown. |
| 302 * @private |
| 303 */ |
| 304 showSyncNotice_: function(hasSyncedResults, selectedPage) { |
| 305 return hasSyncedResults && selectedPage != 'syncedTabs'; |
| 306 }, |
| 307 |
| 308 /** |
296 * @param {string} page | 309 * @param {string} page |
297 * @private | 310 * @private |
298 */ | 311 */ |
299 routeDataChanged_: function(page) { this.selectedPage_ = page; }, | 312 routeDataChanged_: function(page) { this.selectedPage_ = page; }, |
300 | 313 |
301 /** | 314 /** |
302 * @param {string} selectedPage | 315 * @param {string} selectedPage |
303 * @private | 316 * @private |
304 */ | 317 */ |
305 selectedPageChanged_: function(selectedPage) { | 318 selectedPageChanged_: function(selectedPage) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 break; | 372 break; |
360 } | 373 } |
361 break; | 374 break; |
362 } | 375 } |
363 | 376 |
364 md_history.BrowserService.getInstance().recordHistogram( | 377 md_history.BrowserService.getInstance().recordHistogram( |
365 'History.HistoryPageView', histogramValue, HistoryPageViewHistogram.END | 378 'History.HistoryPageView', histogramValue, HistoryPageViewHistogram.END |
366 ); | 379 ); |
367 }, | 380 }, |
368 }); | 381 }); |
OLD | NEW |