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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_tasks.js

Issue 12258003: [Cleanup] Files.app: Adds missing JSdoc annotations in file_manager/*.js. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added comments. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 /** 5 /**
6 * This object encapsulates everything related to tasks execution. 6 * This object encapsulates everything related to tasks execution.
7 * @constructor
7 * @param {FileManager} fileManager FileManager instance. 8 * @param {FileManager} fileManager FileManager instance.
8 * @param {object} opt_params File manager load parameters. 9 * @param {object} opt_params File manager load parameters.
9 */ 10 */
10 function FileTasks(fileManager, opt_params) { 11 function FileTasks(fileManager, opt_params) {
11 this.fileManager_ = fileManager; 12 this.fileManager_ = fileManager;
12 this.params_ = opt_params; 13 this.params_ = opt_params;
13 this.tasks_ = null; 14 this.tasks_ = null;
14 this.defaultTask_ = null; 15 this.defaultTask_ = null;
15 16
16 /** 17 /**
17 * List of invocations to be called once tasks are available. 18 * List of invocations to be called once tasks are available.
19 * @private
mtomasz 2013/02/14 04:38:56 Type missing?
yoshiki 2013/02/14 06:17:36 Done.
18 */ 20 */
19 this.pendingInvocations_ = []; 21 this.pendingInvocations_ = [];
20 } 22 }
21 23
22 /** 24 /**
23 * Location of the Chrome Web Store. 25 * Location of the Chrome Web Store.
24 */ 26 */
25 FileTasks.CHROME_WEB_STORE_URL = 'https://chrome.google.com/webstore'; 27 FileTasks.CHROME_WEB_STORE_URL = 'https://chrome.google.com/webstore';
26 28
27 /** 29 /**
(...skipping 11 matching lines...) Expand all
39 */ 41 */
40 FileTasks.prototype.init = function(urls, opt_mimeTypes) { 42 FileTasks.prototype.init = function(urls, opt_mimeTypes) {
41 this.urls_ = urls; 43 this.urls_ = urls;
42 if (urls.length > 0) 44 if (urls.length > 0)
43 chrome.fileBrowserPrivate.getFileTasks(urls, opt_mimeTypes || [], 45 chrome.fileBrowserPrivate.getFileTasks(urls, opt_mimeTypes || [],
44 this.onTasks_.bind(this)); 46 this.onTasks_.bind(this));
45 }; 47 };
46 48
47 /** 49 /**
48 * Returns amount of tasks. 50 * Returns amount of tasks.
49 * @return {number=} amount of tasks. 51 * @return {number=} amount of tasks.
mtomasz 2013/02/14 04:38:56 number= -> number
yoshiki 2013/02/14 06:17:36 Done.
50 */ 52 */
51 FileTasks.prototype.size = function() { 53 FileTasks.prototype.size = function() {
52 return (this.tasks_ && this.tasks_.length) || 0; 54 return (this.tasks_ && this.tasks_.length) || 0;
53 }; 55 };
54 56
55 /** 57 /**
56 * Callback when tasks found. 58 * Callback when tasks found.
57 * @param {Array.<Object>} tasks The tasks. 59 * @param {Array.<Object>} tasks The tasks.
58 * @private 60 * @private
59 */ 61 */
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 title, 576 title,
575 message, 577 message,
576 items, defaultIdx, 578 items, defaultIdx,
577 onSuccess); 579 onSuccess);
578 }; 580 };
579 581
580 FileTasks.decorate('display'); 582 FileTasks.decorate('display');
581 FileTasks.decorate('updateMenuItem'); 583 FileTasks.decorate('updateMenuItem');
582 FileTasks.decorate('execute'); 584 FileTasks.decorate('execute');
583 FileTasks.decorate('executeDefault'); 585 FileTasks.decorate('executeDefault');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698