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

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

Issue 2352293002: MD History: Replace app-route with a custom router (Closed)
Patch Set: Rebase Created 4 years, 3 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/list_container.js
diff --git a/chrome/browser/resources/md_history/list_container.js b/chrome/browser/resources/md_history/list_container.js
index 24a66c7a87a09b2a156f3c8e685ba77bdc38e171..244e39f87b9396c9629ad8172a0ab11ad19db429 100644
--- a/chrome/browser/resources/md_history/list_container.js
+++ b/chrome/browser/resources/md_history/list_container.js
@@ -22,6 +22,10 @@ Polymer({
queryResult: Object,
},
+ observers: [
+ 'searchTermChanged_(queryState.searchTerm)',
+ ],
+
listeners: {
'history-list-scrolled': 'closeMenu_',
'load-more-history': 'loadMoreHistory_',
@@ -142,6 +146,15 @@ Polymer({
},
/** @private */
+ searchTermChanged_: function() {
+ this.queryHistory(false);
+ // TODO(tsergeant): Ignore incremental searches in this metric.
+ if (this.queryState.searchTerm)
+ md_history.BrowserService.getInstance().recordAction('Search');
+ },
+
Dan Beam 2016/09/23 05:50:46 ^H
tsergeant 2016/09/23 06:59:19 ^H-ed
+
+ /** @private */
loadMoreHistory_: function() { this.queryHistory(true); },
/**
@@ -214,7 +227,7 @@ Polymer({
'EntryMenuShowMoreFromSite');
var menu = assert(this.$.sharedMenu.getIfExists());
- this.fire('search-domain', {domain: menu.itemData.item.domain});
+ this.set('queryState.searchTerm', menu.itemData.item.domain);
menu.closeMenu();
},
« no previous file with comments | « chrome/browser/resources/md_history/history_toolbar.js ('k') | chrome/browser/resources/md_history/router.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698