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

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

Issue 1325853006: MD Downloads: wrap some <paper-buttons>s in <template is="dom-if"> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 cr.define('downloads', function() { 5 cr.define('downloads', function() {
6 /** 6 /**
7 * @param {string} chromeSendName 7 * @param {string} chromeSendName
8 * @return {function(string):void} A chrome.send() callback with curried name. 8 * @return {function(string):void} A chrome.send() callback with curried name.
9 */ 9 */
10 function chromeSendWithId(chromeSendName) { 10 function chromeSendWithId(chromeSendName) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Split quoted terms (e.g., 'The "lazy" dog' => ['The', 'lazy', 'dog']). 73 // Split quoted terms (e.g., 'The "lazy" dog' => ['The', 'lazy', 'dog']).
74 function trim(s) { return s.trim(); } 74 function trim(s) { return s.trim(); }
75 chrome.send('getDownloads', searchText.split(/"([^"]*)"/).map(trim)); 75 chrome.send('getDownloads', searchText.split(/"([^"]*)"/).map(trim));
76 }, 76 },
77 77
78 /** 78 /**
79 * Shows the local folder a finished download resides in. 79 * Shows the local folder a finished download resides in.
80 * @param {string} id ID of the download to show. 80 * @param {string} id ID of the download to show.
81 */ 81 */
82 show: chromeSendWithId('show'), 82 showInFolder: chromeSendWithId('showInFolder'),
83 83
84 /** Undo download removal. */ 84 /** Undo download removal. */
85 undo: chrome.send.bind(chrome, 'undo'), 85 undo: chrome.send.bind(chrome, 'undo'),
86 }; 86 };
87 87
88 return {ActionService: ActionService}; 88 return {ActionService: ActionService};
89 }); 89 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698