Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: webkit/plugins/ppapi/ppb_file_io_impl.h

Issue 8231004: Remaining cleanup (base::Bind): Replacing FileUtilProxy calls with new callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: got it building Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_callback_factory.h"
14 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
16 #include "base/platform_file.h" 15 #include "base/platform_file.h"
17 #include "ppapi/c/pp_file_info.h" 16 #include "ppapi/c/pp_file_info.h"
18 #include "ppapi/c/pp_time.h" 17 #include "ppapi/c/pp_time.h"
19 #include "ppapi/shared_impl/resource.h" 18 #include "ppapi/shared_impl/resource.h"
20 #include "ppapi/thunk/ppb_file_io_api.h" 19 #include "ppapi/thunk/ppb_file_io_api.h"
21 #include "webkit/plugins/ppapi/callbacks.h" 20 #include "webkit/plugins/ppapi/callbacks.h"
22 #include "webkit/plugins/ppapi/plugin_delegate.h" 21 #include "webkit/plugins/ppapi/plugin_delegate.h"
23 22
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void StatusCallback(base::PlatformFileError error_code); 117 void StatusCallback(base::PlatformFileError error_code);
119 void AsyncOpenFileCallback(base::PlatformFileError error_code, 118 void AsyncOpenFileCallback(base::PlatformFileError error_code,
120 base::PassPlatformFile file); 119 base::PassPlatformFile file);
121 void QueryInfoCallback(base::PlatformFileError error_code, 120 void QueryInfoCallback(base::PlatformFileError error_code,
122 const base::PlatformFileInfo& file_info); 121 const base::PlatformFileInfo& file_info);
123 void ReadCallback(base::PlatformFileError error_code, 122 void ReadCallback(base::PlatformFileError error_code,
124 const char* data, int bytes_read); 123 const char* data, int bytes_read);
125 void WriteCallback(base::PlatformFileError error_code, int bytes_written); 124 void WriteCallback(base::PlatformFileError error_code, int bytes_written);
126 void WillWriteCallback(base::PlatformFileError error_code, int bytes_written); 125 void WillWriteCallback(base::PlatformFileError error_code, int bytes_written);
127 126
128 base::ScopedCallbackFactory<PPB_FileIO_Impl> callback_factory_;
129
130 base::PlatformFile file_; 127 base::PlatformFile file_;
131 PP_FileSystemType file_system_type_; 128 PP_FileSystemType file_system_type_;
132 129
133 // Valid only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}. 130 // Valid only for PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY}.
134 GURL file_system_url_; 131 GURL file_system_url_;
135 132
136 std::queue<CallbackEntry> callbacks_; 133 std::queue<CallbackEntry> callbacks_;
137 OperationType pending_op_; 134 OperationType pending_op_;
138 135
139 // 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
140 // pending for it. 137 // pending for it.
141 PP_FileInfo* info_; 138 PP_FileInfo* info_;
142 139
143 // 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
144 // of type PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY} is opened. 141 // of type PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY} is opened.
145 scoped_ptr<QuotaFileIO> quota_file_io_; 142 scoped_ptr<QuotaFileIO> quota_file_io_;
146 143
147 base::WeakPtrFactory<PPB_FileIO_Impl> weak_ptr_factory_; 144 base::WeakPtrFactory<PPB_FileIO_Impl> weak_ptr_factory_;
148 145
149 DISALLOW_COPY_AND_ASSIGN(PPB_FileIO_Impl); 146 DISALLOW_COPY_AND_ASSIGN(PPB_FileIO_Impl);
150 }; 147 };
151 148
152 } // namespace ppapi 149 } // namespace ppapi
153 } // namespace webkit 150 } // namespace webkit
154 151
155 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ 152 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698