Chromium Code Reviews| Index: chrome/browser/resources/md_downloads/action_service.js |
| diff --git a/chrome/browser/resources/md_downloads/action_service.js b/chrome/browser/resources/md_downloads/action_service.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ef41da0a36cdb2b2985d315894a605c0f4f17d43 |
| --- /dev/null |
| +++ b/chrome/browser/resources/md_downloads/action_service.js |
| @@ -0,0 +1,56 @@ |
| +// 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() { |
| + /** @interface */ |
|
Jeremy Klein
2015/07/16 18:54:53
Include description of its purpose.
Dan Beam
2015/07/18 01:02:20
Delorted.
|
| + function ActionService() {} |
| + |
| + ActionService.prototype = { |
| + /** @param {string} id ID of the download to cancel. */ |
| + cancel: function(id) { assertNotReached(); }, |
| + |
| + /** Instructs the browser to clear all finished downloads. */ |
| + clearAll: assertNotReached, |
| + |
| + /** @param {string} id ID of the dangerous download to discard. */ |
| + discardDangerous: function(id) { assertNotReached(); }, |
| + |
| + /** @param {string} id ID of the download that the user started dragging. */ |
| + drag: function(id) { assertNotReached(); }, |
| + |
| + /** Opens the current local destination for downloads. */ |
| + openDownloadsFolder: assertNotReached, |
| + |
| + /** |
| + * @param {string} id ID of the download to run locally on the user's box. |
| + */ |
| + openFile: function(id) { assertNotReached(); }, |
| + |
| + /** @param {string} id ID the of the progressing download to pause. */ |
| + pause: function(id) { assertNotReached(); }, |
| + |
| + /** @param {string} id ID of the finished download to remove. */ |
| + remove: function(id) { assertNotReached(); }, |
| + |
| + /** @param {string} id ID of the paused download to resume. */ |
| + resume: function(id) { assertNotReached(); }, |
| + |
| + /** |
| + * @param {string} id ID of the dangerous download to save despite |
| + * warnings. |
| + */ |
| + saveDangerous: function(id) { assertNotReached(); }, |
| + |
| + /** @param {string} searchText What to search for. */ |
| + search: function(searchText) { assertNotReached(); }, |
| + |
| + /** |
| + * Shows the local folder a finished download resides in. |
| + * @param {string} id ID of the download to show. |
| + */ |
| + show: function(id) { assertNotReached(); }, |
| + }; |
| + |
| + return {ActionService: ActionService}; |
| +}); |