Index: chrome/browser/resources/md_downloads/toolbar.js |
diff --git a/chrome/browser/resources/md_downloads/toolbar.js b/chrome/browser/resources/md_downloads/toolbar.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..44bba7a96144d5d3e73ebbbca2f5dfde8ad35409 |
--- /dev/null |
+++ b/chrome/browser/resources/md_downloads/toolbar.js |
@@ -0,0 +1,48 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+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')
|
+ var Toolbar = Polymer({ |
+ is: 'downloads-toolbar', |
+ |
+ /** @param {!downloads.ActionService} actionService */ |
+ setActionService: function(actionService) { |
+ /** @private {!downloads.ActionService} */ |
+ this.actionService_ = actionService; |
+ }, |
+ |
+ properties: { |
+ canClearAll: { |
+ type: Boolean, |
+ value: false, |
+ }, |
+ |
+ showingSearch_: { |
+ type: Boolean, |
+ value: false, |
+ }, |
+ }, |
+ |
+ ready: function() { |
+ 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.
|
+ }, |
+ |
+ /** @private */ |
+ onClearAllClick_: function() { |
+ this.actionService_.clearAll(); |
+ }, |
+ |
+ /** @private */ |
+ onOpenDownloadsFolderClick_: function() { |
+ this.actionService_.openDownloadsFolder(); |
+ }, |
+ |
+ /** @private */ |
+ toggleShowingSearch_: function() { |
+ this.showingSearch_ = !this.showingSearch_; |
+ }, |
+ }); |
+ |
+ return {Toolbar: Toolbar}; |
+}); |