| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ |
| 7 | 7 |
| 8 #include <queue> | 8 #include <queue> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void StatusCallback(base::PlatformFileError error_code); | 117 void StatusCallback(base::PlatformFileError error_code); |
| 118 void AsyncOpenFileCallback(base::PlatformFileError error_code, | 118 void AsyncOpenFileCallback(base::PlatformFileError error_code, |
| 119 base::PassPlatformFile file); | 119 base::PassPlatformFile file); |
| 120 void QueryInfoCallback(base::PlatformFileError error_code, | 120 void QueryInfoCallback(base::PlatformFileError error_code, |
| 121 const base::PlatformFileInfo& file_info); | 121 const base::PlatformFileInfo& file_info); |
| 122 void ReadCallback(base::PlatformFileError error_code, | 122 void ReadCallback(base::PlatformFileError error_code, |
| 123 const char* data, int bytes_read); | 123 const char* data, int bytes_read); |
| 124 void WriteCallback(base::PlatformFileError error_code, int bytes_written); | 124 void WriteCallback(base::PlatformFileError error_code, int bytes_written); |
| 125 void WillWriteCallback(base::PlatformFileError error_code, int bytes_written); | 125 void WillWriteCallback(base::PlatformFileError error_code, int bytes_written); |
| 126 | 126 |
| 127 base::WeakPtrFactory<PPB_FileIO_Impl> weak_factory_; | |
| 128 | |
| 129 base::PlatformFile file_; | 127 base::PlatformFile file_; |
| 130 PP_FileSystemType file_system_type_; | 128 PP_FileSystemType file_system_type_; |
| 131 | 129 |
| 132 // Valid only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}. | 130 // Valid only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}. |
| 133 GURL file_system_url_; | 131 GURL file_system_url_; |
| 134 | 132 |
| 135 std::queue<CallbackEntry> callbacks_; | 133 std::queue<CallbackEntry> callbacks_; |
| 136 OperationType pending_op_; | 134 OperationType pending_op_; |
| 137 | 135 |
| 138 // Output buffer pointer for |Query()|; only non-null when a callback is | 136 // Output buffer pointer for |Query()|; only non-null when a callback is |
| 139 // pending for it. | 137 // pending for it. |
| 140 PP_FileInfo* info_; | 138 PP_FileInfo* info_; |
| 141 | 139 |
| 142 // Pointer to a QuotaFileIO instance, which is valid only while a file | 140 // Pointer to a QuotaFileIO instance, which is valid only while a file |
| 143 // of type PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY} is opened. | 141 // of type PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY} is opened. |
| 144 scoped_ptr<QuotaFileIO> quota_file_io_; | 142 scoped_ptr<QuotaFileIO> quota_file_io_; |
| 145 | 143 |
| 146 base::WeakPtrFactory<PPB_FileIO_Impl> weak_ptr_factory_; | 144 base::WeakPtrFactory<PPB_FileIO_Impl> weak_factory_; |
| 147 | 145 |
| 148 DISALLOW_COPY_AND_ASSIGN(PPB_FileIO_Impl); | 146 DISALLOW_COPY_AND_ASSIGN(PPB_FileIO_Impl); |
| 149 }; | 147 }; |
| 150 | 148 |
| 151 } // namespace ppapi | 149 } // namespace ppapi |
| 152 } // namespace webkit | 150 } // namespace webkit |
| 153 | 151 |
| 154 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ | 152 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ |
| OLD | NEW |