| Index: webkit/fileapi/media_file_util.h
|
| diff --git a/webkit/fileapi/media_file_util.h b/webkit/fileapi/media_file_util.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..adf8e767118a5a9c6962290a86cf87fed25e4341
|
| --- /dev/null
|
| +++ b/webkit/fileapi/media_file_util.h
|
| @@ -0,0 +1,103 @@
|
| +// 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_FILE_UTIL_H_
|
| +#define WEBKIT_FILEAPI_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 MediaFileUtil : public FileSystemFileUtil {
|
| + public:
|
| + MediaFileUtil();
|
| + virtual ~MediaFileUtil() {}
|
| +
|
| + // 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;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(MediaFileUtil);
|
| +};
|
| +
|
| +} // namespace fileapi
|
| +
|
| +#endif // WEBKIT_FILEAPI_MEDIA_FILE_UTIL_H_
|
|
|