- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / extensions / file_manager / private_api_tasks.h
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.
4 //
5 // This file provides task related API functions.
6
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_
9
10 #include <map>
11 #include <set>
12 #include <string>
13 #include <vector>
14
15 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
16
17 class PrefService;
18
19 namespace drive {
20 class DriveAppRegistry;
21 }
22
23 namespace extensions {
24
25 // Implements the chrome.fileBrowserPrivate.executeTask method.
26 class FileBrowserPrivateExecuteTaskFunction
27     : public LoggedAsyncExtensionFunction {
28  public:
29   DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask",
30                              FILEBROWSERPRIVATE_EXECUTETASK)
31
32  protected:
33   virtual ~FileBrowserPrivateExecuteTaskFunction() {}
34
35   // AsyncExtensionFunction overrides.
36   virtual bool RunImpl() OVERRIDE;
37
38   void OnTaskExecuted(bool success);
39 };
40
41 // Implements the chrome.fileBrowserPrivate.getFileTasks method.
42 class FileBrowserPrivateGetFileTasksFunction
43     : public LoggedAsyncExtensionFunction {
44  public:
45   DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks",
46                              FILEBROWSERPRIVATE_GETFILETASKS)
47
48  protected:
49   virtual ~FileBrowserPrivateGetFileTasksFunction() {}
50
51   // AsyncExtensionFunction overrides.
52   virtual bool RunImpl() OVERRIDE;
53 };
54
55 // Implements the chrome.fileBrowserPrivate.setDefaultTask method.
56 class FileBrowserPrivateSetDefaultTaskFunction
57     : public ChromeSyncExtensionFunction {
58  public:
59   DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask",
60                              FILEBROWSERPRIVATE_SETDEFAULTTASK)
61
62  protected:
63   virtual ~FileBrowserPrivateSetDefaultTaskFunction() {}
64
65   // SyncExtensionFunction overrides.
66   virtual bool RunImpl() OVERRIDE;
67 };
68
69 }  // namespace extensions
70
71 #endif  // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_