Index: chrome/browser/resources/md_history/history_list.js |
diff --git a/chrome/browser/resources/md_history/history_list.js b/chrome/browser/resources/md_history/history_list.js |
index ba358120f6b4f93984e925bb05bad7a508f37f7f..aaba6536622c5929aba6360e9ff38e4a8f659dfc 100644 |
--- a/chrome/browser/resources/md_history/history_list.js |
+++ b/chrome/browser/resources/md_history/history_list.js |
@@ -26,9 +26,7 @@ Polymer({ |
}, |
listeners: { |
- 'infinite-list.scroll': 'closeMenu_', |
- 'tap': 'closeMenu_', |
- 'toggle-menu': 'toggleMenu_', |
+ 'infinite-list.scroll': 'notifyListScroll_', |
tsergeant
2016/07/19 07:12:47
Rather than firing a new event, can you just close
calamity
2016/07/20 05:24:38
As discussed, the scroll event doesn't bubble.
|
'remove-bookmark-stars': 'removeBookmarkStars_', |
}, |
@@ -41,26 +39,6 @@ Polymer({ |
}, |
/** |
- * Closes the overflow menu. |
- * @private |
- */ |
- closeMenu_: function() { |
- /** @type {CrSharedMenuElement} */(this.$.sharedMenu).closeMenu(); |
- }, |
- |
- /** |
- * Opens the overflow menu unless the menu is already open and the same button |
- * is pressed. |
- * @param {{detail: {item: !HistoryEntry, target: !HTMLElement}}} e |
- * @private |
- */ |
- toggleMenu_: function(e) { |
- var target = e.detail.target; |
- /** @type {CrSharedMenuElement} */(this.$.sharedMenu).toggleMenu( |
- target, e.detail.item); |
- }, |
- |
- /** |
* Remove bookmark star for history items with matching URLs. |
* @param {{detail: !string}} e |
* @private |
@@ -77,28 +55,6 @@ Polymer({ |
} |
}, |
- /** @private */ |
- onMoreFromSiteTap_: function() { |
- var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); |
- this.fire('search-domain', {domain: menu.itemData.domain}); |
- menu.closeMenu(); |
- }, |
- |
- /** @private */ |
- onRemoveFromHistoryTap_: function() { |
- var menu = /** @type {CrSharedMenuElement} */(this.$.sharedMenu); |
- md_history.BrowserService.getInstance() |
- .deleteItems([menu.itemData]) |
- .then(function(items) { |
- this.removeDeletedHistory_(items); |
- // This unselect-all is to reset the toolbar when deleting a selected |
- // item. TODO(tsergeant): Make this automatic based on observing list |
- // modifications. |
- this.fire('unselect-all'); |
- }.bind(this)); |
- menu.closeMenu(); |
- }, |
- |
/** |
* Disables history result loading when there are no more history results. |
*/ |
@@ -280,5 +236,12 @@ Polymer({ |
*/ |
isFirstItem_: function(index) { |
return index == 0; |
- } |
+ }, |
+ |
+ /** |
+ * @private |
+ */ |
+ notifyListScroll_: function() { |
+ this.fire('history-list-scrolled'); |
+ }, |
}); |