| 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 CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_ |
| 6 #define CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 void OnAppendBlobDataItemToStream( | 154 void OnAppendBlobDataItemToStream( |
| 155 const GURL& url, const webkit_blob::BlobData::Item& item); | 155 const GURL& url, const webkit_blob::BlobData::Item& item); |
| 156 void OnAppendSharedMemoryToStream( | 156 void OnAppendSharedMemoryToStream( |
| 157 const GURL& url, base::SharedMemoryHandle handle, size_t buffer_size); | 157 const GURL& url, base::SharedMemoryHandle handle, size_t buffer_size); |
| 158 void OnFinishBuildingStream(const GURL& url); | 158 void OnFinishBuildingStream(const GURL& url); |
| 159 void OnAbortBuildingStream(const GURL& url); | 159 void OnAbortBuildingStream(const GURL& url); |
| 160 void OnCloneStream(const GURL& url, const GURL& src_url); | 160 void OnCloneStream(const GURL& url, const GURL& src_url); |
| 161 void OnRemoveStream(const GURL& url); | 161 void OnRemoveStream(const GURL& url); |
| 162 | 162 |
| 163 // Callback functions to be used when each file operation is finished. | 163 // Callback functions to be used when each file operation is finished. |
| 164 void DidFinish(int request_id, base::PlatformFileError result); | 164 void DidFinish(int request_id, base::File::Error result); |
| 165 void DidGetMetadata(int request_id, | 165 void DidGetMetadata(int request_id, |
| 166 base::PlatformFileError result, | 166 base::File::Error result, |
| 167 const base::PlatformFileInfo& info); | 167 const base::File::Info& info); |
| 168 void DidReadDirectory(int request_id, | 168 void DidReadDirectory(int request_id, |
| 169 base::PlatformFileError result, | 169 base::File::Error result, |
| 170 const std::vector<fileapi::DirectoryEntry>& entries, | 170 const std::vector<fileapi::DirectoryEntry>& entries, |
| 171 bool has_more); | 171 bool has_more); |
| 172 void DidWrite(int request_id, | 172 void DidWrite(int request_id, |
| 173 base::PlatformFileError result, | 173 base::File::Error result, |
| 174 int64 bytes, | 174 int64 bytes, |
| 175 bool complete); | 175 bool complete); |
| 176 void DidOpenFileSystem(int request_id, | 176 void DidOpenFileSystem(int request_id, |
| 177 const GURL& root, | 177 const GURL& root, |
| 178 const std::string& filesystem_name, | 178 const std::string& filesystem_name, |
| 179 base::PlatformFileError result); | 179 base::File::Error result); |
| 180 void DidResolveURL(int request_id, | 180 void DidResolveURL(int request_id, |
| 181 base::PlatformFileError result, | 181 base::File::Error result, |
| 182 const fileapi::FileSystemInfo& info, | 182 const fileapi::FileSystemInfo& info, |
| 183 const base::FilePath& file_path, | 183 const base::FilePath& file_path, |
| 184 bool is_directory); | 184 bool is_directory); |
| 185 void DidDeleteFileSystem(int request_id, | 185 void DidDeleteFileSystem(int request_id, |
| 186 base::PlatformFileError result); | 186 base::File::Error result); |
| 187 void DidCreateSnapshot( | 187 void DidCreateSnapshot( |
| 188 int request_id, | 188 int request_id, |
| 189 const fileapi::FileSystemURL& url, | 189 const fileapi::FileSystemURL& url, |
| 190 base::PlatformFileError result, | 190 base::File::Error result, |
| 191 const base::PlatformFileInfo& info, | 191 const base::File::Info& info, |
| 192 const base::FilePath& platform_path, | 192 const base::FilePath& platform_path, |
| 193 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref); | 193 const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref); |
| 194 | 194 |
| 195 // Sends a FileSystemMsg_DidFail and returns false if |url| is invalid. | 195 // Sends a FileSystemMsg_DidFail and returns false if |url| is invalid. |
| 196 bool ValidateFileSystemURL(int request_id, const fileapi::FileSystemURL& url); | 196 bool ValidateFileSystemURL(int request_id, const fileapi::FileSystemURL& url); |
| 197 | 197 |
| 198 // Retrieves the Stream object for |url| from |stream_context_|. Returns unset | 198 // Retrieves the Stream object for |url| from |stream_context_|. Returns unset |
| 199 // scoped_refptr when there's no Stream instance for the given |url| | 199 // scoped_refptr when there's no Stream instance for the given |url| |
| 200 // registered with stream_context_->registry(). | 200 // registered with stream_context_->registry(). |
| 201 scoped_refptr<Stream> GetStreamForURL(const GURL& url); | 201 scoped_refptr<Stream> GetStreamForURL(const GURL& url); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 // is being sent to the renderer. | 236 // is being sent to the renderer. |
| 237 std::map<int, scoped_refptr<webkit_blob::ShareableFileReference> > | 237 std::map<int, scoped_refptr<webkit_blob::ShareableFileReference> > |
| 238 in_transit_snapshot_files_; | 238 in_transit_snapshot_files_; |
| 239 | 239 |
| 240 DISALLOW_COPY_AND_ASSIGN(FileAPIMessageFilter); | 240 DISALLOW_COPY_AND_ASSIGN(FileAPIMessageFilter); |
| 241 }; | 241 }; |
| 242 | 242 |
| 243 } // namespace content | 243 } // namespace content |
| 244 | 244 |
| 245 #endif // CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_ | 245 #endif // CONTENT_BROWSER_FILEAPI_FILEAPI_MESSAGE_FILTER_H_ |
| OLD | NEW |