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

Unified Diff: chrome/browser/resources/md_downloads/crisper.js

Issue 2182853002: MD WebUI: rework how clearing search works (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hide (x) Created 4 years, 5 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_downloads/crisper.js
diff --git a/chrome/browser/resources/md_downloads/crisper.js b/chrome/browser/resources/md_downloads/crisper.js
index cf866b173dead07a10bcffa6d8412737181847c5..1c2434ba3936cfa6c36d8f9da33a014204f219e6 100644
--- a/chrome/browser/resources/md_downloads/crisper.js
+++ b/chrome/browser/resources/md_downloads/crisper.js
@@ -10568,11 +10568,6 @@ var CrSearchFieldBehavior = {
this.$.searchInput.blur();
},
- /** @private */
- toggleShowingSearch_: function() {
- this.showingSearch = !this.showingSearch;
- },
-
/** @return {boolean} */
isSearchFocused: function() {
return this.$.searchTerm.focused;
@@ -11345,7 +11340,25 @@ Polymer({
var SearchField = Polymer({
is: 'cr-search-field',
- behaviors: [CrSearchFieldBehavior]
+
+ behaviors: [CrSearchFieldBehavior],
+
+ properties: {
+ value_: {
+ type: String,
+ },
+ },
+
+ /** @private */
+ clearSearch_: function() {
+ this.setValue('');
+ this.$.searchInput.focus();
+ },
+
+ /** @private */
+ toggleShowingSearch_: function() {
+ this.showingSearch = !this.showingSearch;
+ },
});
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be

Powered by Google App Engine
This is Rietveld 408576698