Chromium Code Reviews| Index: webkit/fileapi/media/device_media_file_util.h |
| diff --git a/webkit/fileapi/media/device_media_file_util.h b/webkit/fileapi/media/device_media_file_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..49d1b35884d982ffb9eef0f888fc9d211da6ecf1 |
| --- /dev/null |
| +++ b/webkit/fileapi/media/device_media_file_util.h |
| @@ -0,0 +1,106 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_FILE_UTIL_H_ |
| +#define WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_FILE_UTIL_H_ |
| + |
| +#include "base/file_path.h" |
| +#include "base/file_util_proxy.h" |
| +#include "base/platform_file.h" |
| +#include "webkit/fileapi/fileapi_export.h" |
| +#include "webkit/fileapi/file_system_file_util.h" |
| + |
| +namespace base { |
| +class Time; |
| +} |
| + |
| +namespace fileapi { |
| + |
| +class FileSystemOperationContext; |
| + |
| +class FILEAPI_EXPORT_PRIVATE DeviceMediaFileUtil : public FileSystemFileUtil { |
| + public: |
| + DeviceMediaFileUtil(const FilePath& profile_path); |
|
Lei Zhang
2012/07/31 20:04:37
nit: explicit
kmadhusu
2012/08/01 01:43:59
Done.
|
| + virtual ~DeviceMediaFileUtil() {} |
| + |
| + // FileSystemFileUtil overrides. |
| + virtual base::PlatformFileError CreateOrOpen( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url, |
| + int file_flags, |
| + base::PlatformFile* file_handle, |
| + bool* created) OVERRIDE; |
| + virtual base::PlatformFileError Close( |
| + FileSystemOperationContext* context, |
| + base::PlatformFile file) OVERRIDE; |
| + virtual base::PlatformFileError EnsureFileExists( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url, bool* created) OVERRIDE; |
| + virtual base::PlatformFileError CreateDirectory( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url, |
| + bool exclusive, |
| + bool recursive) OVERRIDE; |
| + virtual base::PlatformFileError GetFileInfo( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url, |
| + base::PlatformFileInfo* file_info, |
| + FilePath* platform_path) OVERRIDE; |
| + virtual AbstractFileEnumerator* CreateFileEnumerator( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& root_url, |
| + bool recursive) OVERRIDE; |
| + virtual PlatformFileError GetLocalFilePath( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& file_system_url, |
| + FilePath* local_file_path) OVERRIDE; |
| + virtual base::PlatformFileError Touch( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url, |
| + const base::Time& last_access_time, |
| + const base::Time& last_modified_time) OVERRIDE; |
| + virtual base::PlatformFileError Truncate( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url, |
| + int64 length) OVERRIDE; |
| + virtual bool PathExists( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url) OVERRIDE; |
| + virtual bool DirectoryExists( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url) OVERRIDE; |
| + virtual bool IsDirectoryEmpty( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url) OVERRIDE; |
| + virtual base::PlatformFileError CopyOrMoveFile( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& src_url, |
| + const FileSystemURL& dest_url, |
| + bool copy) OVERRIDE; |
| + virtual base::PlatformFileError CopyInForeignFile( |
| + FileSystemOperationContext* context, |
| + const FilePath& src_file_path, |
| + const FileSystemURL& dest_url) OVERRIDE; |
| + virtual base::PlatformFileError DeleteFile( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url) OVERRIDE; |
| + virtual base::PlatformFileError DeleteSingleDirectory( |
| + FileSystemOperationContext* context, |
| + const FileSystemURL& url) OVERRIDE; |
| + virtual scoped_refptr<webkit_blob::ShareableFileReference> |
| + CreateSnapshotFile(FileSystemOperationContext* context, |
| + const FileSystemURL& url, |
| + base::PlatformFileError* result, |
| + base::PlatformFileInfo* file_info, |
| + FilePath* platform_path) OVERRIDE; |
| + private: |
|
Lei Zhang
2012/07/31 20:04:37
nit: need blank line before private:
kmadhusu
2012/08/01 01:43:59
Done.
|
| + // Profile path |
| + const FilePath profile_path_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DeviceMediaFileUtil); |
| +}; |
| + |
| +} // namespace fileapi |
| + |
| +#endif // WEBKIT_FILEAPI_MEDIA_DEVICE_MEDIA_FILE_UTIL_H_ |