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

Side by Side Diff: chrome/browser/chromeos/file_manager/file_tasks.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 // This file provides utility functions for "file tasks". 5 // This file provides utility functions for "file tasks".
6 // 6 //
7 // WHAT ARE FILE TASKS? 7 // WHAT ARE FILE TASKS?
8 // 8 //
9 // File tasks are representation of actions that can be performed over the 9 // File tasks are representation of actions that can be performed over the
10 // currently selected files from Files.app. A task can be either of: 10 // currently selected files from Files.app. A task can be either of:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 #include "chrome/common/extensions/api/file_browser_private.h" 120 #include "chrome/common/extensions/api/file_browser_private.h"
121 #include "url/gurl.h" 121 #include "url/gurl.h"
122 122
123 class PrefService; 123 class PrefService;
124 class Profile; 124 class Profile;
125 125
126 namespace drive { 126 namespace drive {
127 class DriveAppRegistry; 127 class DriveAppRegistry;
128 } 128 }
129 129
130 namespace fileapi { 130 namespace storage {
131 class FileSystemURL; 131 class FileSystemURL;
132 } 132 }
133 133
134 namespace file_manager { 134 namespace file_manager {
135 namespace file_tasks { 135 namespace file_tasks {
136 136
137 // Task types as explained in the comment above. Search for <task-type>. 137 // Task types as explained in the comment above. Search for <task-type>.
138 enum TaskType { 138 enum TaskType {
139 TASK_TYPE_FILE_BROWSER_HANDLER, 139 TASK_TYPE_FILE_BROWSER_HANDLER,
140 TASK_TYPE_FILE_HANDLER, 140 TASK_TYPE_FILE_HANDLER,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // profile - The profile used for making this function call. 234 // profile - The profile used for making this function call.
235 // source_url - The source URL which originates this function call. 235 // source_url - The source URL which originates this function call.
236 // task - See the comment at TaskDescriptor struct. 236 // task - See the comment at TaskDescriptor struct.
237 // file_urls - URLs of the target files. 237 // file_urls - URLs of the target files.
238 // done - The callback which will be called on completion. 238 // done - The callback which will be called on completion.
239 // The callback won't be called if the function returns 239 // The callback won't be called if the function returns
240 // false. 240 // false.
241 bool ExecuteFileTask(Profile* profile, 241 bool ExecuteFileTask(Profile* profile,
242 const GURL& source_url, 242 const GURL& source_url,
243 const TaskDescriptor& task, 243 const TaskDescriptor& task,
244 const std::vector<fileapi::FileSystemURL>& file_urls, 244 const std::vector<storage::FileSystemURL>& file_urls,
245 const FileTaskFinishedCallback& done); 245 const FileTaskFinishedCallback& done);
246 246
247 typedef extensions::app_file_handler_util::PathAndMimeTypeSet 247 typedef extensions::app_file_handler_util::PathAndMimeTypeSet
248 PathAndMimeTypeSet; 248 PathAndMimeTypeSet;
249 249
250 // Finds the Drive app tasks that can be used with the given |path_mime_set| 250 // Finds the Drive app tasks that can be used with the given |path_mime_set|
251 // from |drive_app_registry|, and append them to the |result_list|. 251 // from |drive_app_registry|, and append them to the |result_list|.
252 // Drive app tasks will be found only if all of the files are on Drive. 252 // Drive app tasks will be found only if all of the files are on Drive.
253 void FindDriveAppTasks(const drive::DriveAppRegistry& drive_app_registry, 253 void FindDriveAppTasks(const drive::DriveAppRegistry& drive_app_registry,
254 const PathAndMimeTypeSet& path_mime_set, 254 const PathAndMimeTypeSet& path_mime_set,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // task is found (i.e. the default task may not exist in |tasks|). No tasks 291 // task is found (i.e. the default task may not exist in |tasks|). No tasks
292 // should be set as default before calling this function. 292 // should be set as default before calling this function.
293 void ChooseAndSetDefaultTask(const PrefService& pref_service, 293 void ChooseAndSetDefaultTask(const PrefService& pref_service,
294 const PathAndMimeTypeSet& path_mime_set, 294 const PathAndMimeTypeSet& path_mime_set,
295 std::vector<FullTaskDescriptor>* tasks); 295 std::vector<FullTaskDescriptor>* tasks);
296 296
297 } // namespace file_tasks 297 } // namespace file_tasks
298 } // namespace file_manager 298 } // namespace file_manager
299 299
300 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILE_TASKS_H_ 300 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILE_TASKS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/file_manager_browsertest.cc ('k') | chrome/browser/chromeos/file_manager/file_tasks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698