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_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_PROXY_H_ | 5 #ifndef WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_PROXY_H_ |
6 #define WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_PROXY_H_ | 6 #define WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_PROXY_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "webkit/fileapi/file_system_operation_interface.h" | 10 #include "webkit/fileapi/file_system_operation_interface.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const FileSystemOperationInterface::SnapshotFileCallback& callback) = 0; | 87 const FileSystemOperationInterface::SnapshotFileCallback& callback) = 0; |
88 | 88 |
89 // Creates a local snapshot file for a given |url| and marks it for | 89 // Creates a local snapshot file for a given |url| and marks it for |
90 // modification. A webkit_blob::ShareableFileReference is passed to | 90 // modification. A webkit_blob::ShareableFileReference is passed to |
91 // |callback|, and when the reference is released, modification to the | 91 // |callback|, and when the reference is released, modification to the |
92 // snapshot is marked for uploading to the remote file system. | 92 // snapshot is marked for uploading to the remote file system. |
93 virtual void CreateWritableSnapshotFile( | 93 virtual void CreateWritableSnapshotFile( |
94 const FileSystemURL& url, | 94 const FileSystemURL& url, |
95 const WritableSnapshotFile& callback) = 0; | 95 const WritableSnapshotFile& callback) = 0; |
96 | 96 |
97 // Opens file for a give |url| with specified |flags| (see | 97 // Opens file for a given |url| with specified |flags| (see |
98 // base::PlatformFileFlags for details). | 98 // base::PlatformFileFlags for details). |
99 virtual void OpenFile( | 99 virtual void OpenFile( |
100 const FileSystemURL& url, | 100 const FileSystemURL& url, |
101 int flags, | 101 int flags, |
102 base::ProcessHandle peer_handle, | 102 base::ProcessHandle peer_handle, |
103 const FileSystemOperationInterface::OpenFileCallback& callback) = 0; | 103 const FileSystemOperationInterface::OpenFileCallback& callback) = 0; |
104 | 104 |
105 // Notifies that a file opened by OpenFile (at |path|) is closed. | 105 // Notifies that a file opened by OpenFile (at |path|) is closed. |
106 virtual void NotifyCloseFile(const FileSystemURL& url) = 0; | 106 virtual void NotifyCloseFile(const FileSystemURL& url) = 0; |
107 | 107 |
108 // TODO(zelidrag): More methods to follow as we implement other parts of FSO. | 108 // TODO(zelidrag): More methods to follow as we implement other parts of FSO. |
109 | 109 |
110 protected: | 110 protected: |
111 friend class base::RefCountedThreadSafe<RemoteFileSystemProxyInterface>; | 111 friend class base::RefCountedThreadSafe<RemoteFileSystemProxyInterface>; |
112 virtual ~RemoteFileSystemProxyInterface() {} | 112 virtual ~RemoteFileSystemProxyInterface() {} |
113 }; | 113 }; |
114 | 114 |
115 } // namespace fileapi | 115 } // namespace fileapi |
116 | 116 |
117 #endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_PROXY_H_ | 117 #endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_PROXY_H_ |
OLD | NEW |