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

Unified Diff: chrome/browser/resources/md_history/history_card_manager.js

Issue 1648803003: MD History: Drop-down menu allows searching for history-items by domain name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@search_functionality
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698