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_OPERATION_H_ | 5 #ifndef WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_ |
6 #define WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_ | 6 #define WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_ |
7 | 7 |
8 #include "webkit/chromeos/fileapi/remote_file_system_proxy.h" | 8 #include "webkit/chromeos/fileapi/remote_file_system_proxy.h" |
9 #include "webkit/fileapi/file_system_operation.h" | 9 #include "webkit/fileapi/file_system_operation.h" |
10 #include "webkit/fileapi/file_writer_delegate.h" | |
10 | 11 |
11 namespace base { | 12 namespace base { |
12 class Value; | 13 class Value; |
13 } | 14 } |
14 | 15 |
15 namespace fileapi { | 16 namespace fileapi { |
16 class FileWriterDelegate; | 17 class FileWriterDelegate; |
17 class LocalFileSystemOperation; | 18 class LocalFileSystemOperation; |
18 } | 19 } |
19 | 20 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 base::PlatformFileError rv, | 96 base::PlatformFileError rv, |
96 const base::PlatformFileInfo& file_info, | 97 const base::PlatformFileInfo& file_info, |
97 const FilePath& platform_path); | 98 const FilePath& platform_path); |
98 void DidReadDirectory( | 99 void DidReadDirectory( |
99 const ReadDirectoryCallback& callback, | 100 const ReadDirectoryCallback& callback, |
100 base::PlatformFileError rv, | 101 base::PlatformFileError rv, |
101 const std::vector<base::FileUtilProxy::Entry>& entries, | 102 const std::vector<base::FileUtilProxy::Entry>& entries, |
102 bool has_more); | 103 bool has_more); |
103 void DidWrite(base::PlatformFileError result, | 104 void DidWrite(base::PlatformFileError result, |
104 int64 bytes, | 105 int64 bytes, |
105 bool complete); | 106 fileapi::FileWriterDelegate::WriteCompletionStatus write_status |
107 ); | |
kinuko
2012/09/25 14:00:49
style-nit: can you format this function like the o
calvinlo
2012/09/26 05:23:07
Originally on its own new line because the previou
| |
106 void DidFinishFileOperation(const StatusCallback& callback, | 108 void DidFinishFileOperation(const StatusCallback& callback, |
107 base::PlatformFileError rv); | 109 base::PlatformFileError rv); |
108 void DidCreateSnapshotFile( | 110 void DidCreateSnapshotFile( |
109 const SnapshotFileCallback& callback, | 111 const SnapshotFileCallback& callback, |
110 base::PlatformFileError result, | 112 base::PlatformFileError result, |
111 const base::PlatformFileInfo& file_info, | 113 const base::PlatformFileInfo& file_info, |
112 const FilePath& platform_path, | 114 const FilePath& platform_path, |
113 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref); | 115 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref); |
114 void DidOpenFile( | 116 void DidOpenFile( |
115 const OpenFileCallback& callback, | 117 const OpenFileCallback& callback, |
116 base::PlatformFileError result, | 118 base::PlatformFileError result, |
117 base::PlatformFile file, | 119 base::PlatformFile file, |
118 base::ProcessHandle peer_handle); | 120 base::ProcessHandle peer_handle); |
119 | 121 |
120 | 122 |
121 scoped_refptr<fileapi::RemoteFileSystemProxyInterface> remote_proxy_; | 123 scoped_refptr<fileapi::RemoteFileSystemProxyInterface> remote_proxy_; |
122 // A flag to make sure we call operation only once per instance. | 124 // A flag to make sure we call operation only once per instance. |
123 OperationType pending_operation_; | 125 OperationType pending_operation_; |
124 scoped_ptr<fileapi::FileWriterDelegate> file_writer_delegate_; | 126 scoped_ptr<fileapi::FileWriterDelegate> file_writer_delegate_; |
125 | 127 |
126 WriteCallback write_callback_; | 128 WriteCallback write_callback_; |
127 StatusCallback cancel_callback_; | 129 StatusCallback cancel_callback_; |
128 | 130 |
129 DISALLOW_COPY_AND_ASSIGN(RemoteFileSystemOperation); | 131 DISALLOW_COPY_AND_ASSIGN(RemoteFileSystemOperation); |
130 }; | 132 }; |
131 | 133 |
132 } // namespace chromeos | 134 } // namespace chromeos |
133 | 135 |
134 #endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_ | 136 #endif // WEBKIT_CHROMEOS_FILEAPI_REMOTE_FILE_SYSTEM_OPERATION_H_ |
OLD | NEW |