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

Side by Side Diff: ui/file_manager/file_manager/foreground/js/file_tasks.js

Issue 2833413003: Reuse FileTasks when entries are not changed. (Closed)
Patch Set: Use getter for FileTasks.entries. Created 3 years, 7 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 (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
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
71 /** 80 /**
72 * The app ID of the video player app. 81 * The app ID of the video player app.
73 * @const 82 * @const
74 * @type {string} 83 * @type {string}
75 */ 84 */
76 FileTasks.VIDEO_PLAYER_ID = 'jcgeabjmjgoblfofpppfkcoakmfobdko'; 85 FileTasks.VIDEO_PLAYER_ID = 'jcgeabjmjgoblfofpppfkcoakmfobdko';
77 86
78 /** 87 /**
79 * The task id of the zip unpacker app. 88 * The task id of the zip unpacker app.
80 * @const 89 * @const
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 } 827 }
819 // If we haven't picked a default task yet, then just pick the first one 828 // If we haven't picked a default task yet, then just pick the first one
820 // which is not generic file handler. 829 // which is not generic file handler.
821 for (var i = 0; i < tasks.length; i++) { 830 for (var i = 0; i < tasks.length; i++) {
822 if (!tasks[i].isGenericFileHandler) { 831 if (!tasks[i].isGenericFileHandler) {
823 return tasks[i]; 832 return tasks[i];
824 } 833 }
825 } 834 }
826 return opt_taskToUseIfNoDefault || null; 835 return opt_taskToUseIfNoDefault || null;
827 }; 836 };
OLDNEW
« no previous file with comments | « ui/file_manager/file_manager/common/js/util.js ('k') | ui/file_manager/file_manager/foreground/js/task_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698