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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Assertion support. 6 * @fileoverview Assertion support.
7 */ 7 */
8 8
9 /** 9 /**
10 * Verify |condition| is truthy and return |condition| if so. 10 * Verify |condition| is truthy and return |condition| if so.
(...skipping 10858 matching lines...) Expand 10 before | Expand all | Expand 10 after
10869 showingSearchChanged_: function() { 10869 showingSearchChanged_: function() {
10870 if (this.showingSearch) { 10870 if (this.showingSearch) {
10871 this.focus_(); 10871 this.focus_();
10872 return; 10872 return;
10873 } 10873 }
10874 10874
10875 this.setValue(''); 10875 this.setValue('');
10876 this.$.searchInput.blur(); 10876 this.$.searchInput.blur();
10877 }, 10877 },
10878 10878
10879 /** @private */
10880 toggleShowingSearch_: function() {
10881 this.showingSearch = !this.showingSearch;
10882 },
10883
10884 /** @return {boolean} */ 10879 /** @return {boolean} */
10885 isSearchFocused: function() { 10880 isSearchFocused: function() {
10886 return this.$.searchTerm.focused; 10881 return this.$.searchTerm.focused;
10887 } 10882 }
10888 }; 10883 };
10889 (function() { 10884 (function() {
10890 'use strict'; 10885 'use strict';
10891 10886
10892 Polymer.IronA11yAnnouncer = Polymer({ 10887 Polymer.IronA11yAnnouncer = Polymer({
10893 is: 'iron-a11y-announcer', 10888 is: 'iron-a11y-announcer',
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
11646 } 11641 }
11647 return cls; 11642 return cls;
11648 } 11643 }
11649 }); 11644 });
11650 // Copyright 2015 The Chromium Authors. All rights reserved. 11645 // Copyright 2015 The Chromium Authors. All rights reserved.
11651 // Use of this source code is governed by a BSD-style license that can be 11646 // Use of this source code is governed by a BSD-style license that can be
11652 // found in the LICENSE file. 11647 // found in the LICENSE file.
11653 11648
11654 var SearchField = Polymer({ 11649 var SearchField = Polymer({
11655 is: 'cr-search-field', 11650 is: 'cr-search-field',
11656 behaviors: [CrSearchFieldBehavior] 11651
11652 behaviors: [CrSearchFieldBehavior],
11653
11654 properties: {
11655 value_: String,
11656 },
11657
11658 /** @private */
11659 clearSearch_: function() {
11660 this.setValue('');
11661 this.$.searchInput.focus();
11662 },
11663
11664 /** @private */
11665 toggleShowingSearch_: function() {
11666 this.showingSearch = !this.showingSearch;
11667 },
11657 }); 11668 });
11658 // Copyright 2015 The Chromium Authors. All rights reserved. 11669 // Copyright 2015 The Chromium Authors. All rights reserved.
11659 // Use of this source code is governed by a BSD-style license that can be 11670 // Use of this source code is governed by a BSD-style license that can be
11660 // found in the LICENSE file. 11671 // found in the LICENSE file.
11661 11672
11662 cr.define('downloads', function() { 11673 cr.define('downloads', function() {
11663 var Toolbar = Polymer({ 11674 var Toolbar = Polymer({
11664 is: 'downloads-toolbar', 11675 is: 'downloads-toolbar',
11665 11676
11666 attached: function() { 11677 attached: function() {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
11948 Manager.get().updateItem_(index, data); 11959 Manager.get().updateItem_(index, data);
11949 }; 11960 };
11950 11961
11951 return {Manager: Manager}; 11962 return {Manager: Manager};
11952 }); 11963 });
11953 // Copyright 2015 The Chromium Authors. All rights reserved. 11964 // Copyright 2015 The Chromium Authors. All rights reserved.
11954 // Use of this source code is governed by a BSD-style license that can be 11965 // Use of this source code is governed by a BSD-style license that can be
11955 // found in the LICENSE file. 11966 // found in the LICENSE file.
11956 11967
11957 window.addEventListener('load', downloads.Manager.onLoad); 11968 window.addEventListener('load', downloads.Manager.onLoad);
OLDNEW
« 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