Upstream version 5.34.104.0
[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 "chrome/browser/chromeos/extensions/file_manager/private_api_base.h"
11 #include "chrome/common/extensions/api/file_browser_private.h"
12
13 namespace extensions {
14
15 // Implements the chrome.fileBrowserPrivate.executeTask method.
16 class FileBrowserPrivateExecuteTaskFunction
17     : public LoggedAsyncExtensionFunction {
18  public:
19   DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask",
20                              FILEBROWSERPRIVATE_EXECUTETASK)
21
22  protected:
23   virtual ~FileBrowserPrivateExecuteTaskFunction() {}
24
25   // AsyncExtensionFunction overrides.
26   virtual bool RunImpl() OVERRIDE;
27
28  private:
29   void OnTaskExecuted(
30       extensions::api::file_browser_private::TaskResult success);
31 };
32
33 // Implements the chrome.fileBrowserPrivate.getFileTasks method.
34 class FileBrowserPrivateGetFileTasksFunction
35     : public LoggedAsyncExtensionFunction {
36  public:
37   DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks",
38                              FILEBROWSERPRIVATE_GETFILETASKS)
39
40  protected:
41   virtual ~FileBrowserPrivateGetFileTasksFunction() {}
42
43   // AsyncExtensionFunction overrides.
44   virtual bool RunImpl() OVERRIDE;
45 };
46
47 // Implements the chrome.fileBrowserPrivate.setDefaultTask method.
48 class FileBrowserPrivateSetDefaultTaskFunction
49     : public ChromeSyncExtensionFunction {
50  public:
51   DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask",
52                              FILEBROWSERPRIVATE_SETDEFAULTTASK)
53
54  protected:
55   virtual ~FileBrowserPrivateSetDefaultTaskFunction() {}
56
57   // SyncExtensionFunction overrides.
58   virtual bool RunImpl() OVERRIDE;
59 };
60
61 }  // namespace extensions
62
63 #endif  // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_