| 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_FILEAPI_FILE_WRITER_DELEGATE_H_ | 5 #ifndef WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ |
| 6 #define WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ | 6 #define WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 scoped_ptr<net::URLRequest> request, | 70 scoped_ptr<net::URLRequest> request, |
| 71 base::PlatformFileError error, | 71 base::PlatformFileError error, |
| 72 const base::PlatformFileInfo& file_info); | 72 const base::PlatformFileInfo& file_info); |
| 73 void Read(); | 73 void Read(); |
| 74 void OnDataReceived(int bytes_read); | 74 void OnDataReceived(int bytes_read); |
| 75 void Write(); | 75 void Write(); |
| 76 void OnDataWritten(int write_response); | 76 void OnDataWritten(int write_response); |
| 77 void OnError(base::PlatformFileError error); | 77 void OnError(base::PlatformFileError error); |
| 78 void OnProgress(int bytes_read, bool done); | 78 void OnProgress(int bytes_read, bool done); |
| 79 void OnWriteCancelled(int status); | 79 void OnWriteCancelled(int status); |
| 80 void FlushForCompletion(base::PlatformFileError error, |
| 81 int bytes_written, |
| 82 WriteProgressStatus progress_status); |
| 83 void OnFlushed(base::PlatformFileError error, |
| 84 int bytes_written, |
| 85 WriteProgressStatus progress_status, |
| 86 int flush_error); |
| 80 | 87 |
| 81 FileSystemQuotaUtil* quota_util() const; | 88 FileSystemQuotaUtil* quota_util() const; |
| 82 WriteProgressStatus GetCompletionStatusOnError() const; | 89 WriteProgressStatus GetCompletionStatusOnError() const; |
| 83 | 90 |
| 84 DelegateWriteCallback write_callback_; | 91 DelegateWriteCallback write_callback_; |
| 85 scoped_ptr<FileStreamWriter> file_stream_writer_; | 92 scoped_ptr<FileStreamWriter> file_stream_writer_; |
| 86 base::Time last_progress_event_time_; | 93 base::Time last_progress_event_time_; |
| 87 bool writing_started_; | 94 bool writing_started_; |
| 88 int bytes_written_backlog_; | 95 int bytes_written_backlog_; |
| 89 int bytes_written_; | 96 int bytes_written_; |
| 90 int bytes_read_; | 97 int bytes_read_; |
| 91 scoped_refptr<net::IOBufferWithSize> io_buffer_; | 98 scoped_refptr<net::IOBufferWithSize> io_buffer_; |
| 92 scoped_refptr<net::DrainableIOBuffer> cursor_; | 99 scoped_refptr<net::DrainableIOBuffer> cursor_; |
| 93 scoped_ptr<net::URLRequest> request_; | 100 scoped_ptr<net::URLRequest> request_; |
| 94 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; | 101 base::WeakPtrFactory<FileWriterDelegate> weak_factory_; |
| 95 }; | 102 }; |
| 96 | 103 |
| 97 } // namespace fileapi | 104 } // namespace fileapi |
| 98 | 105 |
| 99 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ | 106 #endif // WEBKIT_FILEAPI_FILE_WRITER_DELEGATE_H_ |
| OLD | NEW |