| 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 cr.define('md_history', function() { | 5 cr.define('md_history', function() { |
| 6 var lazyLoadPromise = null; | 6 var lazyLoadPromise = null; |
| 7 function ensureLazyLoaded() { | 7 function ensureLazyLoaded() { |
| 8 if (!lazyLoadPromise) { | 8 if (!lazyLoadPromise) { |
| 9 lazyLoadPromise = new Promise(function(resolve, reject) { | 9 lazyLoadPromise = new Promise(function(resolve, reject) { |
| 10 Polymer.Base.importHref( | 10 Polymer.Base.importHref( |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 type: String, | 32 type: String, |
| 33 observer: 'selectedPageChanged_', | 33 observer: 'selectedPageChanged_', |
| 34 }, | 34 }, |
| 35 | 35 |
| 36 // Whether domain-grouped history is enabled. | 36 // Whether domain-grouped history is enabled. |
| 37 grouped_: { | 37 grouped_: { |
| 38 type: Boolean, | 38 type: Boolean, |
| 39 reflectToAttribute: true, | 39 reflectToAttribute: true, |
| 40 }, | 40 }, |
| 41 | 41 |
| 42 /** @type {!QueryState} */ | |
| 43 queryState_: { | |
| 44 type: Object, | |
| 45 value: function() { | |
| 46 return { | |
| 47 // Whether the most recent query was incremental. | |
| 48 incremental: false, | |
| 49 // A query is initiated by page load. | |
| 50 querying: true, | |
| 51 queryingDisabled: false, | |
| 52 _range: HistoryRange.ALL_TIME, | |
| 53 searchTerm: '', | |
| 54 groupedOffset: 0, | |
| 55 | |
| 56 set range(val) { | |
| 57 this._range = Number(val); | |
| 58 }, | |
| 59 get range() { | |
| 60 return this._range; | |
| 61 }, | |
| 62 }; | |
| 63 } | |
| 64 }, | |
| 65 | |
| 66 /** @type {!QueryResult} */ | 42 /** @type {!QueryResult} */ |
| 67 queryResult_: { | 43 queryResult_: { |
| 68 type: Object, | 44 type: Object, |
| 69 value: function() { | 45 value: function() { |
| 70 return { | 46 return { |
| 71 info: null, | 47 info: null, |
| 72 results: null, | 48 results: null, |
| 73 sessionList: null, | 49 sessionList: null, |
| 74 }; | 50 }; |
| 75 } | 51 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 88 notify: true, | 64 notify: true, |
| 89 }, | 65 }, |
| 90 | 66 |
| 91 showMenuPromo_: { | 67 showMenuPromo_: { |
| 92 type: Boolean, | 68 type: Boolean, |
| 93 value: function() { | 69 value: function() { |
| 94 return loadTimeData.getBoolean('showMenuPromo'); | 70 return loadTimeData.getBoolean('showMenuPromo'); |
| 95 }, | 71 }, |
| 96 }, | 72 }, |
| 97 | 73 |
| 74 /** @type {!QueryState} */ |
| 75 queryState_: Object, |
| 76 |
| 98 // True if the window is narrow enough for the page to have a drawer. | 77 // True if the window is narrow enough for the page to have a drawer. |
| 99 hasDrawer_: { | 78 hasDrawer_: { |
| 100 type: Boolean, | 79 type: Boolean, |
| 101 observer: 'hasDrawerChanged_', | 80 observer: 'hasDrawerChanged_', |
| 102 }, | 81 }, |
| 103 | 82 |
| 104 // Used to display notices for profile sign-in status. | 83 // Used to display notices for profile sign-in status. |
| 105 showSidebarFooter: Boolean, | 84 showSidebarFooter: Boolean, |
| 106 | 85 |
| 107 hasSyncedResults: Boolean, | 86 hasSyncedResults: Boolean, |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 break; | 389 break; |
| 411 } | 390 } |
| 412 break; | 391 break; |
| 413 } | 392 } |
| 414 | 393 |
| 415 md_history.BrowserService.getInstance().recordHistogram( | 394 md_history.BrowserService.getInstance().recordHistogram( |
| 416 'History.HistoryPageView', histogramValue, | 395 'History.HistoryPageView', histogramValue, |
| 417 HistoryPageViewHistogram.END); | 396 HistoryPageViewHistogram.END); |
| 418 }, | 397 }, |
| 419 }); | 398 }); |
| OLD | NEW |