| OLD | NEW |
| 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 10550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10561 showingSearchChanged_: function() { | 10561 showingSearchChanged_: function() { |
| 10562 if (this.showingSearch) { | 10562 if (this.showingSearch) { |
| 10563 this.focus_(); | 10563 this.focus_(); |
| 10564 return; | 10564 return; |
| 10565 } | 10565 } |
| 10566 | 10566 |
| 10567 this.setValue(''); | 10567 this.setValue(''); |
| 10568 this.$.searchInput.blur(); | 10568 this.$.searchInput.blur(); |
| 10569 }, | 10569 }, |
| 10570 | 10570 |
| 10571 /** @private */ | |
| 10572 toggleShowingSearch_: function() { | |
| 10573 this.showingSearch = !this.showingSearch; | |
| 10574 }, | |
| 10575 | |
| 10576 /** @return {boolean} */ | 10571 /** @return {boolean} */ |
| 10577 isSearchFocused: function() { | 10572 isSearchFocused: function() { |
| 10578 return this.$.searchTerm.focused; | 10573 return this.$.searchTerm.focused; |
| 10579 } | 10574 } |
| 10580 }; | 10575 }; |
| 10581 (function() { | 10576 (function() { |
| 10582 'use strict'; | 10577 'use strict'; |
| 10583 | 10578 |
| 10584 Polymer.IronA11yAnnouncer = Polymer({ | 10579 Polymer.IronA11yAnnouncer = Polymer({ |
| 10585 is: 'iron-a11y-announcer', | 10580 is: 'iron-a11y-announcer', |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11338 } | 11333 } |
| 11339 return cls; | 11334 return cls; |
| 11340 } | 11335 } |
| 11341 }); | 11336 }); |
| 11342 // Copyright 2015 The Chromium Authors. All rights reserved. | 11337 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 11343 // Use of this source code is governed by a BSD-style license that can be | 11338 // Use of this source code is governed by a BSD-style license that can be |
| 11344 // found in the LICENSE file. | 11339 // found in the LICENSE file. |
| 11345 | 11340 |
| 11346 var SearchField = Polymer({ | 11341 var SearchField = Polymer({ |
| 11347 is: 'cr-search-field', | 11342 is: 'cr-search-field', |
| 11348 behaviors: [CrSearchFieldBehavior] | 11343 |
| 11344 behaviors: [CrSearchFieldBehavior], |
| 11345 |
| 11346 /** @private */ |
| 11347 clearSearch_: function() { |
| 11348 this.setValue(''); |
| 11349 }, |
| 11350 |
| 11351 /** @private */ |
| 11352 toggleShowingSearch_: function() { |
| 11353 this.showingSearch = !this.showingSearch; |
| 11354 }, |
| 11349 }); | 11355 }); |
| 11350 // Copyright 2015 The Chromium Authors. All rights reserved. | 11356 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 11351 // Use of this source code is governed by a BSD-style license that can be | 11357 // Use of this source code is governed by a BSD-style license that can be |
| 11352 // found in the LICENSE file. | 11358 // found in the LICENSE file. |
| 11353 | 11359 |
| 11354 cr.define('downloads', function() { | 11360 cr.define('downloads', function() { |
| 11355 var Toolbar = Polymer({ | 11361 var Toolbar = Polymer({ |
| 11356 is: 'downloads-toolbar', | 11362 is: 'downloads-toolbar', |
| 11357 | 11363 |
| 11358 attached: function() { | 11364 attached: function() { |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11648 Manager.get().updateItem_(index, data); | 11654 Manager.get().updateItem_(index, data); |
| 11649 }; | 11655 }; |
| 11650 | 11656 |
| 11651 return {Manager: Manager}; | 11657 return {Manager: Manager}; |
| 11652 }); | 11658 }); |
| 11653 // Copyright 2015 The Chromium Authors. All rights reserved. | 11659 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 11654 // Use of this source code is governed by a BSD-style license that can be | 11660 // Use of this source code is governed by a BSD-style license that can be |
| 11655 // found in the LICENSE file. | 11661 // found in the LICENSE file. |
| 11656 | 11662 |
| 11657 window.addEventListener('load', downloads.Manager.onLoad); | 11663 window.addEventListener('load', downloads.Manager.onLoad); |
| OLD | NEW |