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