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

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: 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_toolbar.js
diff --git a/chrome/browser/resources/md_history/history_toolbar.js b/chrome/browser/resources/md_history/history_toolbar.js
index a9179ed2fda96f3bf9ffd1ab7d2037afa51eed69..91d443f00d0d42699268d15e5257759ee6a7907f 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');
+
+ searchBar.showAndFocus();
+ Polymer.dom.flush();
calamity 2016/02/03 05:09:13 Do we need this flush?
hsampson 2016/02/08 00:39:37 Yes otherwise we can't access the search input sec
+ 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