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