OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ | 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ |
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ | 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 scoped_ptr<net::URLRequest> blob_request, | 62 scoped_ptr<net::URLRequest> blob_request, |
63 const WriteCallback& callback) OVERRIDE; | 63 const WriteCallback& callback) OVERRIDE; |
64 virtual void Truncate(const FileSystemURL& url, int64 length, | 64 virtual void Truncate(const FileSystemURL& url, int64 length, |
65 const StatusCallback& callback) OVERRIDE; | 65 const StatusCallback& callback) OVERRIDE; |
66 virtual void TouchFile(const FileSystemURL& url, | 66 virtual void TouchFile(const FileSystemURL& url, |
67 const base::Time& last_access_time, | 67 const base::Time& last_access_time, |
68 const base::Time& last_modified_time, | 68 const base::Time& last_modified_time, |
69 const StatusCallback& callback) OVERRIDE; | 69 const StatusCallback& callback) OVERRIDE; |
70 virtual void OpenFile(const FileSystemURL& url, | 70 virtual void OpenFile(const FileSystemURL& url, |
71 int file_flags, | 71 int file_flags, |
| 72 base::ProcessHandle peer_handle, |
72 const OpenFileCallback& callback) OVERRIDE; | 73 const OpenFileCallback& callback) OVERRIDE; |
73 virtual void Cancel(const StatusCallback& cancel_callback) OVERRIDE; | 74 virtual void Cancel(const StatusCallback& cancel_callback) OVERRIDE; |
74 virtual void CreateSnapshotFile( | 75 virtual void CreateSnapshotFile( |
75 const FileSystemURL& path, | 76 const FileSystemURL& path, |
76 const SnapshotFileCallback& callback) OVERRIDE; | 77 const SnapshotFileCallback& callback) OVERRIDE; |
77 virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path, | 78 virtual void CopyInForeignFile(const base::FilePath& src_local_disk_path, |
78 const FileSystemURL& dest_url, | 79 const FileSystemURL& dest_url, |
79 const StatusCallback& callback) OVERRIDE; | 80 const StatusCallback& callback) OVERRIDE; |
80 virtual void RemoveFile(const FileSystemURL& url, | 81 virtual void RemoveFile(const FileSystemURL& url, |
81 const StatusCallback& callback) OVERRIDE; | 82 const StatusCallback& callback) OVERRIDE; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 scoped_refptr<FileSystemContext> file_system_context_; | 188 scoped_refptr<FileSystemContext> file_system_context_; |
188 | 189 |
189 scoped_ptr<FileSystemOperationContext> operation_context_; | 190 scoped_ptr<FileSystemOperationContext> operation_context_; |
190 AsyncFileUtil* async_file_util_; // Not owned. | 191 AsyncFileUtil* async_file_util_; // Not owned. |
191 | 192 |
192 scoped_ptr<FileWriterDelegate> file_writer_delegate_; | 193 scoped_ptr<FileWriterDelegate> file_writer_delegate_; |
193 scoped_ptr<RecursiveOperationDelegate> recursive_operation_delegate_; | 194 scoped_ptr<RecursiveOperationDelegate> recursive_operation_delegate_; |
194 | 195 |
195 StatusCallback cancel_callback_; | 196 StatusCallback cancel_callback_; |
196 | 197 |
| 198 // Used only by OpenFile, in order to clone the file handle back to the |
| 199 // requesting process. |
| 200 base::ProcessHandle peer_handle_; |
| 201 |
197 // A flag to make sure we call operation only once per instance. | 202 // A flag to make sure we call operation only once per instance. |
198 OperationType pending_operation_; | 203 OperationType pending_operation_; |
199 | 204 |
200 base::WeakPtrFactory<FileSystemOperationImpl> weak_factory_; | 205 base::WeakPtrFactory<FileSystemOperationImpl> weak_factory_; |
201 | 206 |
202 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImpl); | 207 DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImpl); |
203 }; | 208 }; |
204 | 209 |
205 } // namespace fileapi | 210 } // namespace fileapi |
206 | 211 |
207 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ | 212 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_IMPL_H_ |
OLD | NEW |