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