| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ | 5 #ifndef WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ |
| 6 #define WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ | 6 #define WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "webkit/fileapi/file_system_mount_point_provider.h" | 9 #include "webkit/fileapi/file_system_mount_point_provider.h" |
| 10 #include "webkit/fileapi/media/mtp_device_file_system_config.h" | |
| 11 | 10 |
| 12 namespace fileapi { | 11 namespace fileapi { |
| 13 | 12 |
| 14 class AsyncFileUtilAdapter; | 13 class AsyncFileUtilAdapter; |
| 15 class IsolatedContext; | |
| 16 class MediaPathFilter; | |
| 17 | |
| 18 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) | |
| 19 class DeviceMediaAsyncFileUtil; | |
| 20 #endif | |
| 21 | 14 |
| 22 class IsolatedMountPointProvider : public FileSystemMountPointProvider { | 15 class IsolatedMountPointProvider : public FileSystemMountPointProvider { |
| 23 public: | 16 public: |
| 24 static const char kMediaPathFilterKey[]; | 17 IsolatedMountPointProvider(); |
| 25 static const char kMTPDeviceDelegateURLKey[]; | |
| 26 | |
| 27 explicit IsolatedMountPointProvider(const base::FilePath& profile_path); | |
| 28 virtual ~IsolatedMountPointProvider(); | 18 virtual ~IsolatedMountPointProvider(); |
| 29 | 19 |
| 30 // FileSystemMountPointProvider implementation. | 20 // FileSystemMountPointProvider implementation. |
| 31 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; | 21 virtual bool CanHandleType(FileSystemType type) const OVERRIDE; |
| 32 virtual void ValidateFileSystemRoot( | 22 virtual void ValidateFileSystemRoot( |
| 33 const GURL& origin_url, | 23 const GURL& origin_url, |
| 34 FileSystemType type, | 24 FileSystemType type, |
| 35 bool create, | 25 bool create, |
| 36 const ValidateFileSystemCallback& callback) OVERRIDE; | 26 const ValidateFileSystemCallback& callback) OVERRIDE; |
| 37 virtual base::FilePath GetFileSystemRootPathOnFileThread( | 27 virtual base::FilePath GetFileSystemRootPathOnFileThread( |
| (...skipping 24 matching lines...) Expand all Loading... |
| 62 int64 offset, | 52 int64 offset, |
| 63 FileSystemContext* context) const OVERRIDE; | 53 FileSystemContext* context) const OVERRIDE; |
| 64 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; | 54 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE; |
| 65 virtual void DeleteFileSystem( | 55 virtual void DeleteFileSystem( |
| 66 const GURL& origin_url, | 56 const GURL& origin_url, |
| 67 FileSystemType type, | 57 FileSystemType type, |
| 68 FileSystemContext* context, | 58 FileSystemContext* context, |
| 69 const DeleteFileSystemCallback& callback) OVERRIDE; | 59 const DeleteFileSystemCallback& callback) OVERRIDE; |
| 70 | 60 |
| 71 private: | 61 private: |
| 72 // Store the profile path. We need this to create temporary snapshot files. | |
| 73 const base::FilePath profile_path_; | |
| 74 | |
| 75 scoped_ptr<MediaPathFilter> media_path_filter_; | |
| 76 scoped_ptr<CopyOrMoveFileValidatorFactory> | |
| 77 media_copy_or_move_file_validator_factory_; | |
| 78 | |
| 79 scoped_ptr<AsyncFileUtilAdapter> isolated_file_util_; | 62 scoped_ptr<AsyncFileUtilAdapter> isolated_file_util_; |
| 80 scoped_ptr<AsyncFileUtilAdapter> dragged_file_util_; | 63 scoped_ptr<AsyncFileUtilAdapter> dragged_file_util_; |
| 81 scoped_ptr<AsyncFileUtilAdapter> native_media_file_util_; | |
| 82 | |
| 83 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM) | |
| 84 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_; | |
| 85 #endif | |
| 86 }; | 64 }; |
| 87 | 65 |
| 88 } // namespace fileapi | 66 } // namespace fileapi |
| 89 | 67 |
| 90 #endif // WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ | 68 #endif // WEBKIT_FILEAPI_ISOLATED_MOUNT_POINT_PROVIDER_H_ |
| OLD | NEW |