| 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 13 matching lines...) Expand all Loading... |
| 24 // Mounts removable devices and archive files. | 24 // Mounts removable devices and archive files. |
| 25 class FileManagerPrivateAddMountFunction : public LoggedAsyncExtensionFunction { | 25 class FileManagerPrivateAddMountFunction : public LoggedAsyncExtensionFunction { |
| 26 public: | 26 public: |
| 27 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.addMount", | 27 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.addMount", |
| 28 FILEMANAGERPRIVATE_ADDMOUNT) | 28 FILEMANAGERPRIVATE_ADDMOUNT) |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 virtual ~FileManagerPrivateAddMountFunction() {} | 31 virtual ~FileManagerPrivateAddMountFunction() {} |
| 32 | 32 |
| 33 // AsyncExtensionFunction overrides. | 33 // AsyncExtensionFunction overrides. |
| 34 virtual bool RunAsync() OVERRIDE; | 34 virtual bool RunAsync() override; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 // Part of Run(). Called after GetFile for Drive File System. | 37 // Part of Run(). Called after GetFile for Drive File System. |
| 38 void RunAfterGetDriveFile(const base::FilePath& drive_path, | 38 void RunAfterGetDriveFile(const base::FilePath& drive_path, |
| 39 drive::FileError error, | 39 drive::FileError error, |
| 40 const base::FilePath& cache_path, | 40 const base::FilePath& cache_path, |
| 41 scoped_ptr<drive::ResourceEntry> entry); | 41 scoped_ptr<drive::ResourceEntry> entry); |
| 42 | 42 |
| 43 // Part of Run(). Called after MarkCacheFielAsMounted for Drive File System. | 43 // Part of Run(). Called after MarkCacheFielAsMounted for Drive File System. |
| 44 // (or directly called from RunAsync() for other file system). | 44 // (or directly called from RunAsync() for other file system). |
| 45 void RunAfterMarkCacheFileAsMounted(const base::FilePath& display_name, | 45 void RunAfterMarkCacheFileAsMounted(const base::FilePath& display_name, |
| 46 drive::FileError error, | 46 drive::FileError error, |
| 47 const base::FilePath& file_path); | 47 const base::FilePath& file_path); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 // Implements chrome.fileManagerPrivate.removeMount method. | 50 // Implements chrome.fileManagerPrivate.removeMount method. |
| 51 // Unmounts selected volume. Expects volume id as an argument. | 51 // Unmounts selected volume. Expects volume id as an argument. |
| 52 class FileManagerPrivateRemoveMountFunction | 52 class FileManagerPrivateRemoveMountFunction |
| 53 : public LoggedAsyncExtensionFunction { | 53 : public LoggedAsyncExtensionFunction { |
| 54 public: | 54 public: |
| 55 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.removeMount", | 55 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.removeMount", |
| 56 FILEMANAGERPRIVATE_REMOVEMOUNT) | 56 FILEMANAGERPRIVATE_REMOVEMOUNT) |
| 57 | 57 |
| 58 protected: | 58 protected: |
| 59 virtual ~FileManagerPrivateRemoveMountFunction() {} | 59 virtual ~FileManagerPrivateRemoveMountFunction() {} |
| 60 | 60 |
| 61 // AsyncExtensionFunction overrides. | 61 // AsyncExtensionFunction overrides. |
| 62 virtual bool RunAsync() OVERRIDE; | 62 virtual bool RunAsync() override; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 // Implements chrome.fileManagerPrivate.getVolumeMetadataList method. | 65 // Implements chrome.fileManagerPrivate.getVolumeMetadataList method. |
| 66 class FileManagerPrivateGetVolumeMetadataListFunction | 66 class FileManagerPrivateGetVolumeMetadataListFunction |
| 67 : public LoggedAsyncExtensionFunction { | 67 : public LoggedAsyncExtensionFunction { |
| 68 public: | 68 public: |
| 69 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getVolumeMetadataList", | 69 DECLARE_EXTENSION_FUNCTION("fileManagerPrivate.getVolumeMetadataList", |
| 70 FILEMANAGERPRIVATE_GETVOLUMEMETADATALIST) | 70 FILEMANAGERPRIVATE_GETVOLUMEMETADATALIST) |
| 71 | 71 |
| 72 protected: | 72 protected: |
| 73 virtual ~FileManagerPrivateGetVolumeMetadataListFunction() {} | 73 virtual ~FileManagerPrivateGetVolumeMetadataListFunction() {} |
| 74 | 74 |
| 75 // AsyncExtensionFunction overrides. | 75 // AsyncExtensionFunction overrides. |
| 76 virtual bool RunAsync() OVERRIDE; | 76 virtual bool RunAsync() override; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } // namespace extensions | 79 } // namespace extensions |
| 80 | 80 |
| 81 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ | 81 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MOUNT_H_ |
| OLD | NEW |