Chromium Code Reviews| Index: chrome/browser/resources/md_history/history_card_manager.js |
| diff --git a/chrome/browser/resources/md_history/history_card_manager.js b/chrome/browser/resources/md_history/history_card_manager.js |
| index 72c8aaa4cb603aa65857871078f4764c413c2504..51c2d81d37c778d64733261b68eb77774060717a 100644 |
| --- a/chrome/browser/resources/md_history/history_card_manager.js |
| +++ b/chrome/browser/resources/md_history/history_card_manager.js |
| @@ -26,8 +26,8 @@ Polymer({ |
| }, |
| menuIdentifier: { |
| - type: Number, |
| - value: 0 |
| + type: Array, |
| + value: [] |
|
calamity
2016/02/03 05:09:13
Shouldn't this be an object? Also, use value: func
hsampson
2016/02/08 00:39:37
Done.
|
| }, |
| searchTerm: { |
| @@ -64,6 +64,17 @@ Polymer({ |
| }, |
| /** |
| + * Search history based on the domain name associated with the pop-up menu. |
| + * @private |
| + */ |
| + onMoreFromSiteTap_: function() { |
| + var domain = this.menuIdentifier.domain; |
| + this.fire('more-from-site', {search: domain}); |
| + this.fire('refresh-results', {search: domain}); |
|
calamity
2016/02/03 05:09:13
I think it's better just to put the query call int
hsampson
2016/02/08 00:39:37
Done.
|
| + this.closeMenu(); |
| + }, |
| + |
| + /** |
| * Clear the page completely so the page can display new results (search). |
| */ |
| resetHistoryResults: function() { |
| @@ -81,11 +92,12 @@ Polymer({ |
| var menu = this.$['overflow-menu']; |
| // Menu closes if the same button is clicked. |
| - if (this.menuOpen && this.menuIdentifier == e.detail.accessTime) { |
| + if (this.menuOpen && |
| + this.menuIdentifier == e.detail.itemIdentifier) { |
|
calamity
2016/02/03 05:09:13
Hmmmmmmmm. I believe this equality is never true s
hsampson
2016/02/08 00:39:37
Done.
|
| this.closeMenu(); |
| } else { |
| this.menuOpen = true; |
| - this.menuIdentifier = e.detail.accessTime; |
| + this.menuIdentifier = e.detail.itemIdentifier; |
| cr.ui.positionPopupAtPoint(e.detail.x + this.X_OFFSET_, e.detail.y, menu, |
| cr.ui.AnchorType.BEFORE); |