| 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 #include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h" | 16 #include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h" |
| 17 | 17 |
| 18 namespace drive { | 18 namespace drive { |
| 19 class DriveAppRegistry; | 19 class DriveAppRegistry; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace file_manager { | 22 namespace extensions { |
| 23 | 23 |
| 24 // Implements the chrome.fileBrowserPrivate.executeTask method. | 24 // Implements the chrome.fileBrowserPrivate.executeTask method. |
| 25 class ExecuteTaskFunction : public LoggedAsyncExtensionFunction { | 25 class ExecuteTaskFunction : public file_manager::LoggedAsyncExtensionFunction { |
| 26 public: | 26 public: |
| 27 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask", | 27 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask", |
| 28 FILEBROWSERPRIVATE_EXECUTETASK) | 28 FILEBROWSERPRIVATE_EXECUTETASK) |
| 29 | 29 |
| 30 ExecuteTaskFunction(); | 30 ExecuteTaskFunction(); |
| 31 | 31 |
| 32 protected: | 32 protected: |
| 33 virtual ~ExecuteTaskFunction(); | 33 virtual ~ExecuteTaskFunction(); |
| 34 | 34 |
| 35 // AsyncExtensionFunction overrides. | 35 // AsyncExtensionFunction overrides. |
| 36 virtual bool RunImpl() OVERRIDE; | 36 virtual bool RunImpl() OVERRIDE; |
| 37 | 37 |
| 38 void OnTaskExecuted(bool success); | 38 void OnTaskExecuted(bool success); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // Implements the chrome.fileBrowserPrivate.getFileTasks method. | 41 // Implements the chrome.fileBrowserPrivate.getFileTasks method. |
| 42 class GetFileTasksFunction : public LoggedAsyncExtensionFunction { | 42 class GetFileTasksFunction : public file_manager::LoggedAsyncExtensionFunction { |
| 43 public: | 43 public: |
| 44 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks", | 44 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks", |
| 45 FILEBROWSERPRIVATE_GETFILETASKS) | 45 FILEBROWSERPRIVATE_GETFILETASKS) |
| 46 | 46 |
| 47 GetFileTasksFunction(); | 47 GetFileTasksFunction(); |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 virtual ~GetFileTasksFunction(); | 50 virtual ~GetFileTasksFunction(); |
| 51 | 51 |
| 52 // AsyncExtensionFunction overrides. | 52 // AsyncExtensionFunction overrides. |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 SetDefaultTaskFunction(); | 124 SetDefaultTaskFunction(); |
| 125 | 125 |
| 126 protected: | 126 protected: |
| 127 virtual ~SetDefaultTaskFunction(); | 127 virtual ~SetDefaultTaskFunction(); |
| 128 | 128 |
| 129 // SyncExtensionFunction overrides. | 129 // SyncExtensionFunction overrides. |
| 130 virtual bool RunImpl() OVERRIDE; | 130 virtual bool RunImpl() OVERRIDE; |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace file_manager | 133 } // namespace extensions |
| 134 | 134 |
| 135 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ | 135 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ |
| OLD | NEW |