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

Unified Diff: chrome/browser/resources/md_history/history_toolbar.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: Address reviewer comments and small fixes. Created 4 years, 10 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_toolbar.js
diff --git a/chrome/browser/resources/md_history/history_toolbar.js b/chrome/browser/resources/md_history/history_toolbar.js
index 9590652494ae075abd80e4a702ddad487812683c..77f162891b71d89c81f86993e57337cd1eaf0bdc 100644
--- a/chrome/browser/resources/md_history/history_toolbar.js
+++ b/chrome/browser/resources/md_history/history_toolbar.js
@@ -36,6 +36,19 @@ Polymer({
},
/**
+ * When using the drop-down "more from site" set the search bar to reflect the
+ * term that was searched.
+ */
+ setSearchTerm: function(search) {
+ this.searchTerm = search;
+ var searchBar = this.$$('#search-input');
tsergeant 2016/02/12 00:48:55 Nit: Can use this.$['search-input'] now
+
+ searchBar.showAndFocus();
+ Polymer.dom.flush();
tsergeant 2016/02/12 00:48:55 can you use this.async here instead of Polymer.dom
+ searchBar.$$('#search-input').value = search;
+ },
+
+ /**
* If the search term has changed reload for the new search.
*/
onSearchTermSearch: function(searchTerm) {

Powered by Google App Engine
This is Rietveld 408576698