1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file provides task related API functions.
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_
15 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
20 class DriveAppRegistry;
23 namespace extensions {
25 // Implements the chrome.fileBrowserPrivate.executeTask method.
26 class FileBrowserPrivateExecuteTaskFunction
27 : public LoggedAsyncExtensionFunction {
29 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask",
30 FILEBROWSERPRIVATE_EXECUTETASK)
33 virtual ~FileBrowserPrivateExecuteTaskFunction() {}
35 // AsyncExtensionFunction overrides.
36 virtual bool RunImpl() OVERRIDE;
38 void OnTaskExecuted(bool success);
41 // Implements the chrome.fileBrowserPrivate.getFileTasks method.
42 class FileBrowserPrivateGetFileTasksFunction
43 : public LoggedAsyncExtensionFunction {
45 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks",
46 FILEBROWSERPRIVATE_GETFILETASKS)
49 virtual ~FileBrowserPrivateGetFileTasksFunction() {}
51 // AsyncExtensionFunction overrides.
52 virtual bool RunImpl() OVERRIDE;
55 // Implements the chrome.fileBrowserPrivate.setDefaultTask method.
56 class FileBrowserPrivateSetDefaultTaskFunction
57 : public ChromeSyncExtensionFunction {
59 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask",
60 FILEBROWSERPRIVATE_SETDEFAULTTASK)
63 virtual ~FileBrowserPrivateSetDefaultTaskFunction() {}
65 // SyncExtensionFunction overrides.
66 virtual bool RunImpl() OVERRIDE;
69 } // namespace extensions
71 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_