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

Side by Side Diff: chrome/browser/resources/md_downloads/toolbar.js

Issue 1240853002: Slice MD downloads into more components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: license Created 5 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
OLDNEW
(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() {
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 /** @return {boolean} Whether removal can be undone. */
28 canUndo: function() {
29 return this.$['search-term'] != document.activeElement;
30 },
31
32 /** @private */
33 onClearAllClick_: function() {
34 this.actionService_.clearAll();
35 },
36
37 /** @private */
38 onOpenDownloadsFolderClick_: function() {
39 this.actionService_.openDownloadsFolder();
40 },
41
42 /** @private */
43 toggleShowingSearch_: function() {
44 this.showingSearch_ = !this.showingSearch_;
45 },
46 });
47
48 return {Toolbar: Toolbar};
49 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/toolbar.html ('k') | chrome/browser/ui/webui/downloads_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698