OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 cr.define('downloads', function() { | |
Jeremy Klein
2015/07/16 18:54:54
I wouldn't be surprised if the compiler pass does
Dan Beam
2015/07/18 01:02:20
fwiw: we could also do
cr.exportPath('downloads')
| |
6 var Toolbar = Polymer({ | |
7 is: 'downloads-toolbar', | |
8 | |
9 /** @param {!downloads.ActionService} actionService */ | |
10 setActionService: function(actionService) { | |
11 /** @private {!downloads.ActionService} */ | |
12 this.actionService_ = actionService; | |
13 }, | |
14 | |
15 properties: { | |
16 canClearAll: { | |
17 type: Boolean, | |
18 value: false, | |
19 }, | |
20 | |
21 showingSearch_: { | |
22 type: Boolean, | |
23 value: false, | |
24 }, | |
25 }, | |
26 | |
27 ready: function() { | |
28 this.searchTerm = this.$['search-term']; | |
Jeremy Klein
2015/07/16 18:54:54
Consider making searchTerm a declared property wit
Dan Beam
2015/07/18 01:02:20
Done.
| |
29 }, | |
30 | |
31 /** @private */ | |
32 onClearAllClick_: function() { | |
33 this.actionService_.clearAll(); | |
34 }, | |
35 | |
36 /** @private */ | |
37 onOpenDownloadsFolderClick_: function() { | |
38 this.actionService_.openDownloadsFolder(); | |
39 }, | |
40 | |
41 /** @private */ | |
42 toggleShowingSearch_: function() { | |
43 this.showingSearch_ = !this.showingSearch_; | |
44 }, | |
45 }); | |
46 | |
47 return {Toolbar: Toolbar}; | |
48 }); | |
OLD | NEW |