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

Unified Diff: webkit/fileapi/media/media_device_interface.h

Issue 10781014: Isolated FS for media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: webkit/fileapi/media/media_device_interface.h
diff --git a/webkit/fileapi/media/media_device_interface.h b/webkit/fileapi/media/media_device_interface.h
new file mode 100644
index 0000000000000000000000000000000000000000..a9db7e9219cf6bc85791f07091dc491b71e27b77
--- /dev/null
+++ b/webkit/fileapi/media/media_device_interface.h
@@ -0,0 +1,44 @@
+// 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_MEDIA_DEVICE_INTERFACE_H_
+#define WEBKIT_FILEAPI_MEDIA_MEDIA_DEVICE_INTERFACE_H_
+
+#include "base/file_path.h"
+#include "base/platform_file.h"
+#include "base/timer.h"
+#include "webkit/fileapi/file_system_file_util.h"
+
+namespace base {
+struct PlatformFileInfo;
+class Time;
+}
+
+namespace fileapi {
+
+// Helper interface to support media device isolated file system operations.
+class MediaDeviceInterface {
+ public:
+ virtual base::PlatformFileError GetFileInfo(
+ const FilePath& file_path,
+ base::PlatformFileInfo* file_info) = 0;
+ virtual FileSystemFileUtil::AbstractFileEnumerator* CreateFileEnumerator(
+ const FilePath& root,
+ bool recursive) = 0;
+ virtual base::PlatformFileError Touch(
+ const FilePath& file_path,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time) = 0;
+ virtual bool PathExists(const FilePath& file_path) = 0;
+ virtual bool DirectoryExists(const FilePath& file_path) = 0;
+ virtual bool IsDirectoryEmpty(const FilePath& file_path) = 0;
+ virtual PlatformFileError CreateSnapshotFile(
+ const FilePath& device_file_path,
+ const FilePath& local_path,
+ base::PlatformFileInfo* file_info) = 0;
+};
+
+} // namespace fileapi
+
+#endif // WEBKIT_FILEAPI_MEDIA_MEDIA_DEVICE_INTERFACE_H_

Powered by Google App Engine
This is Rietveld 408576698