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

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: tsergeant@ review 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
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 906dc57e65511a8998077abafee4badc82a403d5..8ff77fc8239b0a4fd07f2dd104d29ca568433eba 100644
--- a/chrome/browser/resources/md_downloads/crisper.js
+++ b/chrome/browser/resources/md_downloads/crisper.js
@@ -10876,11 +10876,6 @@ var CrSearchFieldBehavior = {
this.$.searchInput.blur();
},
- /** @private */
- toggleShowingSearch_: function() {
- this.showingSearch = !this.showingSearch;
- },
-
/** @return {boolean} */
isSearchFocused: function() {
return this.$.searchTerm.focused;
@@ -11653,7 +11648,23 @@ Polymer({
var SearchField = Polymer({
is: 'cr-search-field',
- behaviors: [CrSearchFieldBehavior]
+
+ behaviors: [CrSearchFieldBehavior],
+
+ properties: {
+ value_: 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
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698