| Index: chrome/browser/resources/md_history/history_list.html
|
| diff --git a/chrome/browser/resources/md_history/history_list.html b/chrome/browser/resources/md_history/history_list.html
|
| index bfdb2da1d558efd98eccc54cc9d6fefb70be5764..75d6575851a88c7e921e9b326b8ffed2d4339fb6 100644
|
| --- a/chrome/browser/resources/md_history/history_list.html
|
| +++ b/chrome/browser/resources/md_history/history_list.html
|
| @@ -1,14 +1,20 @@
|
| <link rel="import" href="chrome://resources/html/polymer.html">
|
| +
|
| +<link rel="import" href="chrome://resources/cr_elements/cr_lazy_render/cr_lazy_render.html">
|
| +<link rel="import" href="chrome://resources/cr_elements/shared_style_css.html">
|
| +<link rel="import" href="chrome://resources/polymer/v1_0/iron-a11y-announcer/iron-a11y-announcer.html">
|
| <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html">
|
| <link rel="import" href="chrome://resources/polymer/v1_0/iron-scroll-threshold/iron-scroll-threshold.html">
|
| +<link rel="import" href="chrome://history/browser_service.html">
|
| <link rel="import" href="chrome://history/constants.html">
|
| <link rel="import" href="chrome://history/history_item.html">
|
| -<link rel="import" href="chrome://history/history_list_behavior.html">
|
| <link rel="import" href="chrome://history/shared_style.html">
|
|
|
| +<!-- Lazy loaded: cr-dialog, cr-action-menu, paper-button. -->
|
| +
|
| <dom-module id="history-list">
|
| <template>
|
| - <style include="shared-style">
|
| + <style include="shared-style cr-shared-style">
|
| :host {
|
| box-sizing: border-box;
|
| display: block;
|
| @@ -19,32 +25,66 @@
|
| @apply(--card-sizing);
|
| margin-top: var(--first-card-padding-top);
|
| }
|
| +
|
| + dialog .body {
|
| + white-space: pre-wrap;
|
| + }
|
| </style>
|
| <div id="no-results" class="centered-message"
|
| - hidden$="[[hasResults(historyData_.length)]]">
|
| - {{noResultsMessage(searchedTerm, querying)}}
|
| + hidden$="[[hasResults_(historyData_.length)]]">
|
| + [[noResultsMessage_(searchedTerm, querying)]]
|
| </div>
|
| +
|
| <iron-list items="{{historyData_}}" as="item" id="infinite-list"
|
| - hidden$="[[!hasResults(historyData_.length)]]">
|
| + hidden$="[[!hasResults_(historyData_.length)]]">
|
| <template>
|
| <history-item tabindex$="[[tabIndex]]"
|
| item="[[item]]"
|
| - selected="{{item.selected}}"
|
| + selected="[[item.selected]]"
|
| is-card-start="[[isCardStart_(item, index, historyData_.length)]]"
|
| is-card-end="[[isCardEnd_(item, index, historyData_.length)]]"
|
| has-time-gap="[[needsTimeGap_(item, index, historyData_.length)]]"
|
| search-term="[[searchedTerm]]"
|
| number-of-items="[[historyData_.length]]"
|
| - path="[[pathForItem_(index)]]"
|
| index="[[index]]"
|
| iron-list-tab-index="[[tabIndex]]"
|
| last-focused="{{lastFocused_}}">
|
| </history-item>
|
| </template>
|
| </iron-list>
|
| +
|
| <iron-scroll-threshold id="scroll-threshold" scroll-target="infinite-list"
|
| - lower-threshold="500" on-lower-threshold="loadMoreData_">
|
| + lower-threshold="500" on-lower-threshold="onScrollToBottom_">
|
| </iron-scroll-threshold>
|
| +
|
| + <template is="cr-lazy-render" id="dialog">
|
| + <dialog is="cr-dialog">
|
| + <div class="title">$i18n{removeSelected}</div>
|
| + <div class="body">$i18n{deleteWarning}</div>
|
| + <div class="button-container">
|
| + <paper-button class="cancel-button" on-tap="onDialogCancelTap_">
|
| + $i18n{cancel}
|
| + </paper-button>
|
| + <paper-button class="action-button" on-tap="onDialogConfirmTap_">
|
| + $i18n{deleteConfirm}
|
| + </paper-button>
|
| + </div>
|
| + </dialog>
|
| + </template>
|
| +
|
| + <template is="cr-lazy-render" id="sharedMenu">
|
| + <dialog is="cr-action-menu">
|
| + <button id="menuMoreButton" class="dropdown-item"
|
| + on-tap="onMoreFromSiteTap_">
|
| + $i18n{moreFromSite}
|
| + </button>
|
| + <button id="menuRemoveButton" class="dropdown-item"
|
| + hidden="[[!canDeleteHistory_]]"
|
| + on-tap="onRemoveFromHistoryTap_">
|
| + $i18n{removeFromHistory}
|
| + </button>
|
| + </dialog>
|
| + </template>
|
| </template>
|
| <script src="chrome://history/history_list.js"></script>
|
| </dom-module>
|
|
|