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 function PromiseResolver() { | 4 function PromiseResolver() { |
5 this.resolve_; | 5 this.resolve_; |
6 this.reject_; | 6 this.reject_; |
7 this.promise_ = new Promise(function(resolve, reject) { | 7 this.promise_ = new Promise(function(resolve, reject) { |
8 this.resolve_ = resolve; | 8 this.resolve_ = resolve; |
9 this.reject_ = reject; | 9 this.reject_ = reject; |
10 }.bind(this)); | 10 }.bind(this)); |
(...skipping 6693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6704 type: Object, | 6704 type: Object, |
6705 observer: 'showIcon_' | 6705 observer: 'showIcon_' |
6706 }, | 6706 }, |
6707 searchTerm: { | 6707 searchTerm: { |
6708 type: String | 6708 type: String |
6709 }, | 6709 }, |
6710 selected: { | 6710 selected: { |
6711 type: Boolean, | 6711 type: Boolean, |
6712 reflectToAttribute: true | 6712 reflectToAttribute: true |
6713 }, | 6713 }, |
6714 isFirstItem: { | |
6715 type: Boolean, | |
6716 reflectToAttribute: true | |
6717 }, | |
6718 isCardStart: { | 6714 isCardStart: { |
6719 type: Boolean, | 6715 type: Boolean, |
6720 reflectToAttribute: true | 6716 reflectToAttribute: true |
6721 }, | 6717 }, |
6722 isCardEnd: { | 6718 isCardEnd: { |
6723 type: Boolean, | 6719 type: Boolean, |
6724 reflectToAttribute: true | 6720 reflectToAttribute: true |
6725 }, | 6721 }, |
6726 embedded: { | 6722 embedded: { |
6727 type: Boolean, | 6723 type: Boolean, |
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8051 return md_history.HistoryItem.needsTimeGap(this.historyData_, index, this.se
archedTerm); | 8047 return md_history.HistoryItem.needsTimeGap(this.historyData_, index, this.se
archedTerm); |
8052 }, | 8048 }, |
8053 isCardStart_: function(item, i, length) { | 8049 isCardStart_: function(item, i, length) { |
8054 if (length == 0 || i > length - 1) return false; | 8050 if (length == 0 || i > length - 1) return false; |
8055 return i == 0 || this.historyData_[i].dateRelativeDay != this.historyData_[i
- 1].dateRelativeDay; | 8051 return i == 0 || this.historyData_[i].dateRelativeDay != this.historyData_[i
- 1].dateRelativeDay; |
8056 }, | 8052 }, |
8057 isCardEnd_: function(item, i, length) { | 8053 isCardEnd_: function(item, i, length) { |
8058 if (length == 0 || i > length - 1) return false; | 8054 if (length == 0 || i > length - 1) return false; |
8059 return i == length - 1 || this.historyData_[i].dateRelativeDay != this.histo
ryData_[i + 1].dateRelativeDay; | 8055 return i == length - 1 || this.historyData_[i].dateRelativeDay != this.histo
ryData_[i + 1].dateRelativeDay; |
8060 }, | 8056 }, |
8061 isFirstItem_: function(index) { | |
8062 return index == 0; | |
8063 }, | |
8064 notifyListScroll_: function() { | 8057 notifyListScroll_: function() { |
8065 this.fire('history-list-scrolled'); | 8058 this.fire('history-list-scrolled'); |
8066 }, | 8059 }, |
8067 pathForItem_: function(index) { | 8060 pathForItem_: function(index) { |
8068 return 'historyData_.' + index; | 8061 return 'historyData_.' + index; |
8069 } | 8062 } |
8070 }); | 8063 }); |
8071 | 8064 |
8072 // Copyright 2016 The Chromium Authors. All rights reserved. | 8065 // Copyright 2016 The Chromium Authors. All rights reserved. |
8073 // Use of this source code is governed by a BSD-style license that can be | 8066 // Use of this source code is governed by a BSD-style license that can be |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8697 | 8690 |
8698 case HistoryRange.MONTH: | 8691 case HistoryRange.MONTH: |
8699 histogramValue = HistoryPageViewHistogram.GROUPED_MONTH; | 8692 histogramValue = HistoryPageViewHistogram.GROUPED_MONTH; |
8700 break; | 8693 break; |
8701 } | 8694 } |
8702 break; | 8695 break; |
8703 } | 8696 } |
8704 md_history.BrowserService.getInstance().recordHistogram('History.HistoryPage
View', histogramValue, HistoryPageViewHistogram.END); | 8697 md_history.BrowserService.getInstance().recordHistogram('History.HistoryPage
View', histogramValue, HistoryPageViewHistogram.END); |
8705 } | 8698 } |
8706 }); | 8699 }); |
OLD | NEW |