OLD | NEW |
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 * Represents a collection of available tasks to execute for a specific list | 6 * Represents a collection of available tasks to execute for a specific list |
7 * of entries. | 7 * of entries. |
8 * | 8 * |
9 * @param {!VolumeManagerWrapper} volumeManager | 9 * @param {!VolumeManagerWrapper} volumeManager |
10 * @param {!MetadataModel} metadataModel | 10 * @param {!MetadataModel} metadataModel |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 */ | 61 */ |
62 this.tasks_ = tasks; | 62 this.tasks_ = tasks; |
63 | 63 |
64 /** | 64 /** |
65 * @private {Object} | 65 * @private {Object} |
66 * @const | 66 * @const |
67 */ | 67 */ |
68 this.defaultTask_ = defaultTask; | 68 this.defaultTask_ = defaultTask; |
69 }; | 69 }; |
70 | 70 |
71 FileTasks.prototype = { | |
72 /** | |
73 * @return {!Array<!Entry>} | |
74 */ | |
75 get entries() { | |
76 return this.entries_; | |
77 } | |
78 }; | |
79 | |
80 /** | 71 /** |
81 * The app ID of the video player app. | 72 * The app ID of the video player app. |
82 * @const | 73 * @const |
83 * @type {string} | 74 * @type {string} |
84 */ | 75 */ |
85 FileTasks.VIDEO_PLAYER_ID = 'jcgeabjmjgoblfofpppfkcoakmfobdko'; | 76 FileTasks.VIDEO_PLAYER_ID = 'jcgeabjmjgoblfofpppfkcoakmfobdko'; |
86 | 77 |
87 /** | 78 /** |
88 * The task id of the zip unpacker app. | 79 * The task id of the zip unpacker app. |
89 * @const | 80 * @const |
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 } | 818 } |
828 // If we haven't picked a default task yet, then just pick the first one | 819 // If we haven't picked a default task yet, then just pick the first one |
829 // which is not generic file handler. | 820 // which is not generic file handler. |
830 for (var i = 0; i < tasks.length; i++) { | 821 for (var i = 0; i < tasks.length; i++) { |
831 if (!tasks[i].isGenericFileHandler) { | 822 if (!tasks[i].isGenericFileHandler) { |
832 return tasks[i]; | 823 return tasks[i]; |
833 } | 824 } |
834 } | 825 } |
835 return opt_taskToUseIfNoDefault || null; | 826 return opt_taskToUseIfNoDefault || null; |
836 }; | 827 }; |
OLD | NEW |