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

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

Issue 1963503002: MD WebUI: Add shared cr-toolbar element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor tweaks Created 4 years, 7 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 d5341869f89648bc91a27d855b519a186de672f9..798a3c9fc7c2a811654b8ccdd742bd614452ecd6 100644
--- a/chrome/browser/resources/md_history/history_toolbar.js
+++ b/chrome/browser/resources/md_history/history_toolbar.js
@@ -87,9 +87,9 @@ Polymer({
if (this.searchTerm == search)
return;
this.searchTerm = search;
- var searchField = /** @type {SearchField} */(this.$['search-input']);
- searchField.showAndFocus().then(function(showing) {
- if (showing) searchField.setValue(search);
+ var toolbar = /** @type {CrToolbarElement} */(this.$['main-toolbar']);
dpapad 2016/05/18 23:39:13 Is toolbar expected to be null after this line? If
tsergeant 2016/05/19 07:11:55 Closure comment: Done. Ack on the comment about r
+ toolbar.showAndFocus().then(function(showing) {
+ if (showing) toolbar.setValue(search);
});
},
@@ -105,7 +105,7 @@ Polymer({
attached: function() {
this.searchFieldDelegate_ = new ToolbarSearchFieldDelegate(this);
- /** @type {SearchField} */(this.$['search-input'])
+ /** @type {CrToolbarElement} */(this.$['main-toolbar'])
dpapad 2016/05/18 23:39:13 Nit: !CrToolbarElement
tsergeant 2016/05/19 07:11:55 Done.
.setDelegate(this.searchFieldDelegate_);
},

Powered by Google App Engine
This is Rietveld 408576698