| 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_MOUNT_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ |
| 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ | 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Mounts removable devices and archive files. | 23 // Mounts removable devices and archive files. |
| 24 class FileBrowserPrivateAddMountFunction : public LoggedAsyncExtensionFunction { | 24 class FileBrowserPrivateAddMountFunction : public LoggedAsyncExtensionFunction { |
| 25 public: | 25 public: |
| 26 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.addMount", | 26 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.addMount", |
| 27 FILEBROWSERPRIVATE_ADDMOUNT) | 27 FILEBROWSERPRIVATE_ADDMOUNT) |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 virtual ~FileBrowserPrivateAddMountFunction() {} | 30 virtual ~FileBrowserPrivateAddMountFunction() {} |
| 31 | 31 |
| 32 // AsyncExtensionFunction overrides. | 32 // AsyncExtensionFunction overrides. |
| 33 virtual bool RunImpl() OVERRIDE; | 33 virtual bool RunAsync() OVERRIDE; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // Part of Run(). Called after MarkCacheFielAsMounted for Drive File System. | 36 // Part of Run(). Called after MarkCacheFielAsMounted for Drive File System. |
| 37 // (or directly called from RunImpl() for other file system). | 37 // (or directly called from RunAsync() for other file system). |
| 38 void RunAfterMarkCacheFileAsMounted(const base::FilePath& display_name, | 38 void RunAfterMarkCacheFileAsMounted(const base::FilePath& display_name, |
| 39 drive::FileError error, | 39 drive::FileError error, |
| 40 const base::FilePath& file_path); | 40 const base::FilePath& file_path); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 // Implements chrome.fileBrowserPrivate.removeMount method. | 43 // Implements chrome.fileBrowserPrivate.removeMount method. |
| 44 // Unmounts selected volume. Expects volume id as an argument. | 44 // Unmounts selected volume. Expects volume id as an argument. |
| 45 class FileBrowserPrivateRemoveMountFunction | 45 class FileBrowserPrivateRemoveMountFunction |
| 46 : public LoggedAsyncExtensionFunction { | 46 : public LoggedAsyncExtensionFunction { |
| 47 public: | 47 public: |
| 48 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.removeMount", | 48 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.removeMount", |
| 49 FILEBROWSERPRIVATE_REMOVEMOUNT) | 49 FILEBROWSERPRIVATE_REMOVEMOUNT) |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 virtual ~FileBrowserPrivateRemoveMountFunction() {} | 52 virtual ~FileBrowserPrivateRemoveMountFunction() {} |
| 53 | 53 |
| 54 // AsyncExtensionFunction overrides. | 54 // AsyncExtensionFunction overrides. |
| 55 virtual bool RunImpl() OVERRIDE; | 55 virtual bool RunAsync() OVERRIDE; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // Implements chrome.fileBrowserPrivate.getVolumeMetadataList method. | 58 // Implements chrome.fileBrowserPrivate.getVolumeMetadataList method. |
| 59 class FileBrowserPrivateGetVolumeMetadataListFunction | 59 class FileBrowserPrivateGetVolumeMetadataListFunction |
| 60 : public LoggedAsyncExtensionFunction { | 60 : public LoggedAsyncExtensionFunction { |
| 61 public: | 61 public: |
| 62 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getVolumeMetadataList", | 62 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.getVolumeMetadataList", |
| 63 FILEBROWSERPRIVATE_GETVOLUMEMETADATALIST) | 63 FILEBROWSERPRIVATE_GETVOLUMEMETADATALIST) |
| 64 | 64 |
| 65 protected: | 65 protected: |
| 66 virtual ~FileBrowserPrivateGetVolumeMetadataListFunction() {} | 66 virtual ~FileBrowserPrivateGetVolumeMetadataListFunction() {} |
| 67 | 67 |
| 68 // AsyncExtensionFunction overrides. | 68 // AsyncExtensionFunction overrides. |
| 69 virtual bool RunImpl() OVERRIDE; | 69 virtual bool RunAsync() OVERRIDE; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace extensions | 72 } // namespace extensions |
| 73 | 73 |
| 74 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ | 74 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ |
| OLD | NEW |