Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2067)

Side by Side Diff: webkit/fileapi/media/media_file_system_mount_point_provider.h

Issue 14247034: Move Media Galleries FileAPI code out of webkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr-14352004
Patch Set: Add android ifdef. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_FILEAPI_MEDIA_MEDIA_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
6 #define WEBKIT_FILEAPI_MEDIA_MEDIA_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "webkit/fileapi/file_system_mount_point_provider.h"
10 #include "webkit/fileapi/media/mtp_device_file_system_config.h"
11
12 namespace fileapi {
13
14 class AsyncFileUtilAdapter;
15 class MediaPathFilter;
16
17 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
18 class DeviceMediaAsyncFileUtil;
19 #endif
20
21 class MediaFileSystemMountPointProvider : public FileSystemMountPointProvider {
22 public:
23 static const char kMediaPathFilterKey[];
24 static const char kMTPDeviceDelegateURLKey[];
25
26 explicit MediaFileSystemMountPointProvider(
27 const base::FilePath& profile_path);
28 virtual ~MediaFileSystemMountPointProvider();
29
30 // FileSystemMountPointProvider implementation.
31 virtual bool CanHandleType(FileSystemType type) const OVERRIDE;
32 virtual void ValidateFileSystemRoot(
33 const GURL& origin_url,
34 FileSystemType type,
35 bool create,
36 const ValidateFileSystemCallback& callback) OVERRIDE;
37 virtual base::FilePath GetFileSystemRootPathOnFileThread(
38 const FileSystemURL& url,
39 bool create) OVERRIDE;
40 virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE;
41 virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE;
42 virtual CopyOrMoveFileValidatorFactory* GetCopyOrMoveFileValidatorFactory(
43 FileSystemType type,
44 base::PlatformFileError* error_code) OVERRIDE;
45 virtual void InitializeCopyOrMoveFileValidatorFactory(
46 FileSystemType type,
47 scoped_ptr<CopyOrMoveFileValidatorFactory> factory) OVERRIDE;
48 virtual FilePermissionPolicy GetPermissionPolicy(
49 const FileSystemURL& url,
50 int permissions) const OVERRIDE;
51 virtual FileSystemOperation* CreateFileSystemOperation(
52 const FileSystemURL& url,
53 FileSystemContext* context,
54 base::PlatformFileError* error_code) const OVERRIDE;
55 virtual scoped_ptr<webkit_blob::FileStreamReader> CreateFileStreamReader(
56 const FileSystemURL& url,
57 int64 offset,
58 const base::Time& expected_modification_time,
59 FileSystemContext* context) const OVERRIDE;
60 virtual scoped_ptr<FileStreamWriter> CreateFileStreamWriter(
61 const FileSystemURL& url,
62 int64 offset,
63 FileSystemContext* context) const OVERRIDE;
64 virtual FileSystemQuotaUtil* GetQuotaUtil() OVERRIDE;
65 virtual void DeleteFileSystem(
66 const GURL& origin_url,
67 FileSystemType type,
68 FileSystemContext* context,
69 const DeleteFileSystemCallback& callback) OVERRIDE;
70
71 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> native_media_file_util_;
80 #if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
81 scoped_ptr<DeviceMediaAsyncFileUtil> device_media_async_file_util_;
82 #endif
83
84 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemMountPointProvider);
85 };
86
87 } // namespace fileapi
88
89 #endif // WEBKIT_FILEAPI_MEDIA_MEDIA_FILE_SYSTEM_MOUNT_POINT_PROVIDER_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/media/filtering_file_enumerator.cc ('k') | webkit/fileapi/media/media_file_system_mount_point_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698