Chromium Code Reviews| Index: chrome/browser/resources/md_history/list_container.js |
| diff --git a/chrome/browser/resources/md_history/list_container.js b/chrome/browser/resources/md_history/list_container.js |
| index 93d430d098c6298aea140073b56f7115f9d31d2b..6e5aab71365fa2fe069e6636ba19aadd890756cf 100644 |
| --- a/chrome/browser/resources/md_history/list_container.js |
| +++ b/chrome/browser/resources/md_history/list_container.js |
| @@ -85,8 +85,7 @@ Polymer({ |
| }, |
| unselectAllItems: function(count) { |
| - /** @type {HistoryListElement} */ (this.$['infinite-list']) |
| - .unselectAllItems(count); |
| + this.getSelectedList_().unselectAllItems(count); |
| }, |
| /** |
| @@ -114,7 +113,6 @@ Polymer({ |
| /** @private */ |
| loadMoreHistory_: function() { this.queryHistory(true); }, |
| - |
| /** |
| * @param {HistoryQuery} info |
| * @param {!Array<HistoryEntry>} results |
| @@ -140,7 +138,7 @@ Polymer({ |
| /** @private */ |
| onDialogConfirmTap_: function() { |
| - this.$['infinite-list'].deleteSelected(); |
| + this.$.content.selectedItem.deleteSelected(); |
|
tsergeant
2016/08/09 23:20:00
Nit: Change this one as well.
calamity
2016/08/10 04:25:38
Done.
|
| this.$.dialog.close(); |
| }, |
| @@ -176,13 +174,21 @@ Polymer({ |
| menu.closeMenu(); |
| }, |
| + /** |
| + * @return {HTMLElement} |
| + * @private |
| + */ |
| + getSelectedList_: function() { |
|
tsergeant
2016/08/09 23:20:00
Ultra nit: Move this up or down so that it's not b
calamity
2016/08/10 04:25:38
Done.
|
| + return this.$.content.selectedItem; |
| + }, |
| + |
| /** @private */ |
| onRemoveFromHistoryTap_: function() { |
| var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); |
| md_history.BrowserService.getInstance() |
| .deleteItems([menu.itemData]) |
| .then(function(items) { |
| - this.$['infinite-list'].removeDeletedHistory_(items); |
| + this.$.content.selectedItem.removeItemsByPath(items[0].path); |
|
tsergeant
2016/08/09 23:20:00
Nit: And this one
calamity
2016/08/10 04:25:38
Done.
|
| // This unselect-all is to reset the toolbar when deleting a selected |
| // item. TODO(tsergeant): Make this automatic based on observing list |
| // modifications. |