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_
10 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
11 #include "chrome/common/extensions/api/file_browser_private.h"
13 namespace extensions {
15 // Implements the chrome.fileBrowserPrivate.executeTask method.
16 class FileBrowserPrivateExecuteTaskFunction
17 : public LoggedAsyncExtensionFunction {
19 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask",
20 FILEBROWSERPRIVATE_EXECUTETASK)
23 virtual ~FileBrowserPrivateExecuteTaskFunction() {}
25 // AsyncExtensionFunction overrides.
26 virtual bool RunImpl() OVERRIDE;
30 extensions::api::file_browser_private::TaskResult success);
33 // Implements the chrome.fileBrowserPrivate.getFileTasks method.
34 class FileBrowserPrivateGetFileTasksFunction
35 : public LoggedAsyncExtensionFunction {
37 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks",
38 FILEBROWSERPRIVATE_GETFILETASKS)
41 virtual ~FileBrowserPrivateGetFileTasksFunction() {}
43 // AsyncExtensionFunction overrides.
44 virtual bool RunImpl() OVERRIDE;
47 // Implements the chrome.fileBrowserPrivate.setDefaultTask method.
48 class FileBrowserPrivateSetDefaultTaskFunction
49 : public ChromeSyncExtensionFunction {
51 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask",
52 FILEBROWSERPRIVATE_SETDEFAULTTASK)
55 virtual ~FileBrowserPrivateSetDefaultTaskFunction() {}
57 // SyncExtensionFunction overrides.
58 virtual bool RunImpl() OVERRIDE;
61 } // namespace extensions
63 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_