| 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 <vector> | 10 #include <vector> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class FileManagerPrivateExecuteTaskFunction | 28 class FileManagerPrivateExecuteTaskFunction |
| 29 : public LoggedAsyncExtensionFunction { | 29 : public LoggedAsyncExtensionFunction { |
| 30 public: | 30 public: |
| 31 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.executeTask", | 31 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.executeTask", |
| 32 FILEMANAGERPRIVATE_EXECUTETASK) | 32 FILEMANAGERPRIVATE_EXECUTETASK) |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 virtual ~FileManagerPrivateExecuteTaskFunction() {} | 35 virtual ~FileManagerPrivateExecuteTaskFunction() {} |
| 36 | 36 |
| 37 // AsyncExtensionFunction overrides. | 37 // AsyncExtensionFunction overrides. |
| 38 virtual bool RunAsync() OVERRIDE; | 38 virtual bool RunAsync() override; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 void OnTaskExecuted( | 41 void OnTaskExecuted( |
| 42 extensions::api::file_manager_private::TaskResult success); | 42 extensions::api::file_manager_private::TaskResult success); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // Implements the chrome.fileManagerPrivate.getFileTasks method. | 45 // Implements the chrome.fileManagerPrivate.getFileTasks method. |
| 46 class FileManagerPrivateGetFileTasksFunction | 46 class FileManagerPrivateGetFileTasksFunction |
| 47 : public LoggedAsyncExtensionFunction { | 47 : public LoggedAsyncExtensionFunction { |
| 48 public: | 48 public: |
| 49 FileManagerPrivateGetFileTasksFunction(); | 49 FileManagerPrivateGetFileTasksFunction(); |
| 50 | 50 |
| 51 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getFileTasks", | 51 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getFileTasks", |
| 52 FILEMANAGERPRIVATE_GETFILETASKS) | 52 FILEMANAGERPRIVATE_GETFILETASKS) |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 virtual ~FileManagerPrivateGetFileTasksFunction(); | 55 virtual ~FileManagerPrivateGetFileTasksFunction(); |
| 56 | 56 |
| 57 // AsyncExtensionFunction overrides. | 57 // AsyncExtensionFunction overrides. |
| 58 virtual bool RunAsync() OVERRIDE; | 58 virtual bool RunAsync() override; |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 void OnMimeTypesCollected(scoped_ptr<std::vector<std::string> > mime_types); | 61 void OnMimeTypesCollected(scoped_ptr<std::vector<std::string> > mime_types); |
| 62 | 62 |
| 63 void OnSniffingMimeTypeCompleted( | 63 void OnSniffingMimeTypeCompleted( |
| 64 scoped_ptr<app_file_handler_util::PathAndMimeTypeSet> path_mime_set, | 64 scoped_ptr<app_file_handler_util::PathAndMimeTypeSet> path_mime_set, |
| 65 scoped_ptr<std::vector<GURL> > file_urls); | 65 scoped_ptr<std::vector<GURL> > file_urls); |
| 66 | 66 |
| 67 scoped_ptr<app_file_handler_util::MimeTypeCollector> collector_; | 67 scoped_ptr<app_file_handler_util::MimeTypeCollector> collector_; |
| 68 std::vector<GURL> file_urls_; | 68 std::vector<GURL> file_urls_; |
| 69 std::vector<base::FilePath> local_paths_; | 69 std::vector<base::FilePath> local_paths_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 // Implements the chrome.fileManagerPrivate.setDefaultTask method. | 72 // Implements the chrome.fileManagerPrivate.setDefaultTask method. |
| 73 class FileManagerPrivateSetDefaultTaskFunction | 73 class FileManagerPrivateSetDefaultTaskFunction |
| 74 : public ChromeSyncExtensionFunction { | 74 : public ChromeSyncExtensionFunction { |
| 75 public: | 75 public: |
| 76 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.setDefaultTask", | 76 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.setDefaultTask", |
| 77 FILEMANAGERPRIVATE_SETDEFAULTTASK) | 77 FILEMANAGERPRIVATE_SETDEFAULTTASK) |
| 78 | 78 |
| 79 protected: | 79 protected: |
| 80 virtual ~FileManagerPrivateSetDefaultTaskFunction() {} | 80 virtual ~FileManagerPrivateSetDefaultTaskFunction() {} |
| 81 | 81 |
| 82 // SyncExtensionFunction overrides. | 82 // SyncExtensionFunction overrides. |
| 83 virtual bool RunSync() OVERRIDE; | 83 virtual bool RunSync() override; |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace extensions | 86 } // namespace extensions |
| 87 | 87 |
| 88 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ | 88 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ |
| OLD | NEW |