Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Side by Side Diff: chrome/browser/resources/md_history/history_list.html

Issue 2207323002: [MD History] Factor out a common HistoryListBehavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <link rel="import" href="chrome://resources/html/polymer.html"> 1 <link rel="import" href="chrome://resources/html/polymer.html">
2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm l"> 2 <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.htm l">
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-threshold/i ron-scroll-threshold.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-threshold/i ron-scroll-threshold.html">
4 <link rel="import" href="chrome://history/browser_service.html">
5 <link rel="import" href="chrome://history/constants.html"> 4 <link rel="import" href="chrome://history/constants.html">
6 <link rel="import" href="chrome://history/history_item.html"> 5 <link rel="import" href="chrome://history/history_item.html">
6 <link rel="import" href="chrome://history/history_list_behavior.html">
7 <link rel="import" href="chrome://history/shared_style.html"> 7 <link rel="import" href="chrome://history/shared_style.html">
8 8
9 <dom-module id="history-list"> 9 <dom-module id="history-list">
10 <template> 10 <template>
11 <style include="shared-style"> 11 <style include="shared-style">
12 :host { 12 :host {
13 display: block; 13 display: block;
14 } 14 }
15 15
16 #infinite-list { 16 #infinite-list {
17 height: 100%; 17 height: 100%;
18 } 18 }
19 19
20 history-item { 20 history-item {
21 --history-item-padding-side: var(--card-padding-side); 21 --history-item-padding-side: var(--card-padding-side);
22 } 22 }
23 </style> 23 </style>
24 <div id="no-results" class="centered-message" 24 <div id="no-results" class="centered-message"
25 hidden$="[[hasResults(historyData_.length)]]"> 25 hidden$="[[hasResults(historyData_.length)]]">
26 {{noResultsMessage_(searchedTerm, querying)}} 26 {{noResultsMessage(searchedTerm, querying)}}
27 </div> 27 </div>
28 <iron-list items="{{historyData_}}" as="item" id="infinite-list" 28 <iron-list items="{{historyData_}}" as="item" id="infinite-list"
29 hidden$="[[!hasResults(historyData_.length)]]"> 29 hidden$="[[!hasResults(historyData_.length)]]">
30 <template> 30 <template>
31 <history-item item="[[item]]" 31 <history-item item="[[item]]"
32 starred="[[item.starred]]" 32 starred="[[item.starred]]"
33 selected="{{item.selected}}" 33 selected="{{item.selected}}"
34 is-first-item="[[isFirstItem_(index)]]" 34 is-first-item="[[isFirstItem_(index)]]"
35 is-card-start="[[isCardStart_(item, index, historyData_.length)]]" 35 is-card-start="[[isCardStart_(item, index, historyData_.length)]]"
36 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]" 36 is-card-end="[[isCardEnd_(item, index, historyData_.length)]]"
37 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]" 37 has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]"
38 search-term="[[searchedTerm]]" 38 search-term="[[searchedTerm]]"
39 number-of-items="[[historyData_.length]]"> 39 number-of-items="[[historyData_.length]]"
40 path="[[pathForItem_(index)]]">
40 </history-item> 41 </history-item>
41 </template> 42 </template>
42 </iron-list> 43 </iron-list>
43 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list" 44 <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list"
44 lower-threshold="500" on-lower-threshold="loadMoreData_"> 45 lower-threshold="500" on-lower-threshold="loadMoreData_">
45 </iron-scroll-threshold> 46 </iron-scroll-threshold>
46 </template> 47 </template>
47 <script src="chrome://history/history_list.js"></script> 48 <script src="chrome://history/history_list.js"></script>
48 </dom-module> 49 </dom-module>
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_history/history_item.js ('k') | chrome/browser/resources/md_history/history_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698