| 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> |
| 11 |
| 10 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" | 12 #include "chrome/browser/chromeos/extensions/file_manager/private_api_base.h" |
| 13 #include "chrome/browser/chromeos/file_manager/file_tasks.h" |
| 11 #include "chrome/common/extensions/api/file_browser_private.h" | 14 #include "chrome/common/extensions/api/file_browser_private.h" |
| 12 | 15 |
| 13 namespace extensions { | 16 namespace extensions { |
| 14 | 17 |
| 15 // Implements the chrome.fileBrowserPrivate.executeTask method. | 18 // Implements the chrome.fileBrowserPrivate.executeTask method. |
| 16 class FileBrowserPrivateExecuteTaskFunction | 19 class FileBrowserPrivateExecuteTaskFunction |
| 17 : public LoggedAsyncExtensionFunction { | 20 : public LoggedAsyncExtensionFunction { |
| 18 public: | 21 public: |
| 19 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask", | 22 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.executeTask", |
| 20 FILEBROWSERPRIVATE_EXECUTETASK) | 23 FILEBROWSERPRIVATE_EXECUTETASK) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 : public LoggedAsyncExtensionFunction { | 38 : public LoggedAsyncExtensionFunction { |
| 36 public: | 39 public: |
| 37 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks", | 40 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getFileTasks", |
| 38 FILEBROWSERPRIVATE_GETFILETASKS) | 41 FILEBROWSERPRIVATE_GETFILETASKS) |
| 39 | 42 |
| 40 protected: | 43 protected: |
| 41 virtual ~FileBrowserPrivateGetFileTasksFunction() {} | 44 virtual ~FileBrowserPrivateGetFileTasksFunction() {} |
| 42 | 45 |
| 43 // AsyncExtensionFunction overrides. | 46 // AsyncExtensionFunction overrides. |
| 44 virtual bool RunImpl() OVERRIDE; | 47 virtual bool RunImpl() OVERRIDE; |
| 48 |
| 49 private: |
| 50 void OnSniffingMimeTypeCompleted( |
| 51 scoped_ptr<app_file_handler_util::PathAndMimeTypeSet> path_mime_set, |
| 52 scoped_ptr<std::vector<GURL> > file_urls); |
| 45 }; | 53 }; |
| 46 | 54 |
| 47 // Implements the chrome.fileBrowserPrivate.setDefaultTask method. | 55 // Implements the chrome.fileBrowserPrivate.setDefaultTask method. |
| 48 class FileBrowserPrivateSetDefaultTaskFunction | 56 class FileBrowserPrivateSetDefaultTaskFunction |
| 49 : public ChromeSyncExtensionFunction { | 57 : public ChromeSyncExtensionFunction { |
| 50 public: | 58 public: |
| 51 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask", | 59 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.setDefaultTask", |
| 52 FILEBROWSERPRIVATE_SETDEFAULTTASK) | 60 FILEBROWSERPRIVATE_SETDEFAULTTASK) |
| 53 | 61 |
| 54 protected: | 62 protected: |
| 55 virtual ~FileBrowserPrivateSetDefaultTaskFunction() {} | 63 virtual ~FileBrowserPrivateSetDefaultTaskFunction() {} |
| 56 | 64 |
| 57 // SyncExtensionFunction overrides. | 65 // SyncExtensionFunction overrides. |
| 58 virtual bool RunImpl() OVERRIDE; | 66 virtual bool RunImpl() OVERRIDE; |
| 59 }; | 67 }; |
| 60 | 68 |
| 61 } // namespace extensions | 69 } // namespace extensions |
| 62 | 70 |
| 63 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ | 71 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_TASKS_H_ |
| OLD | NEW |