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

Side by Side Diff: ppapi/proxy/file_io_resource.h

Issue 121813002: Pepper: Ensure FileIO host cleans up before FileSystem host destructs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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
« no previous file with comments | « no previous file | ppapi/proxy/file_io_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 PPAPI_PROXY_FILE_IO_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_FILE_IO_RESOURCE_H_
6 #define PPAPI_PROXY_FILE_IO_RESOURCE_H_ 6 #define PPAPI_PROXY_FILE_IO_RESOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "ppapi/c/private/pp_file_handle.h" 12 #include "ppapi/c/private/pp_file_handle.h"
13 #include "ppapi/proxy/connection.h" 13 #include "ppapi/proxy/connection.h"
14 #include "ppapi/proxy/plugin_resource.h" 14 #include "ppapi/proxy/plugin_resource.h"
15 #include "ppapi/proxy/ppapi_proxy_export.h" 15 #include "ppapi/proxy/ppapi_proxy_export.h"
16 #include "ppapi/shared_impl/file_io_state_manager.h" 16 #include "ppapi/shared_impl/file_io_state_manager.h"
17 #include "ppapi/shared_impl/resource.h" 17 #include "ppapi/shared_impl/resource.h"
18 #include "ppapi/shared_impl/scoped_pp_resource.h" 18 #include "ppapi/shared_impl/scoped_pp_resource.h"
19 #include "ppapi/thunk/ppb_file_io_api.h" 19 #include "ppapi/thunk/ppb_file_io_api.h"
20 20
21 namespace ppapi { 21 namespace ppapi {
22 22
23 class TrackedCallback; 23 class TrackedCallback;
24 24
25 namespace proxy { 25 namespace proxy {
26 26
27 class FileSystemResource;
bbudge 2013/12/27 19:17:41 I'll remove this.
28
27 class PPAPI_PROXY_EXPORT FileIOResource 29 class PPAPI_PROXY_EXPORT FileIOResource
28 : public PluginResource, 30 : public PluginResource,
29 public thunk::PPB_FileIO_API { 31 public thunk::PPB_FileIO_API {
30 public: 32 public:
31 FileIOResource(Connection connection, PP_Instance instance); 33 FileIOResource(Connection connection, PP_Instance instance);
32 virtual ~FileIOResource(); 34 virtual ~FileIOResource();
33 35
34 // Resource overrides. 36 // Resource overrides.
35 virtual thunk::PPB_FileIO_API* AsPPB_FileIO_API() OVERRIDE; 37 virtual thunk::PPB_FileIO_API* AsPPB_FileIO_API() OVERRIDE;
36 38
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 const ResourceMessageReplyParams& params); 159 const ResourceMessageReplyParams& params);
158 void OnPluginMsgOpenFileComplete(scoped_refptr<TrackedCallback> callback, 160 void OnPluginMsgOpenFileComplete(scoped_refptr<TrackedCallback> callback,
159 const ResourceMessageReplyParams& params); 161 const ResourceMessageReplyParams& params);
160 void OnPluginMsgRequestOSFileHandleComplete( 162 void OnPluginMsgRequestOSFileHandleComplete(
161 scoped_refptr<TrackedCallback> callback, 163 scoped_refptr<TrackedCallback> callback,
162 PP_FileHandle* output_handle, 164 PP_FileHandle* output_handle,
163 const ResourceMessageReplyParams& params); 165 const ResourceMessageReplyParams& params);
164 166
165 scoped_refptr<FileHandleHolder> file_handle_; 167 scoped_refptr<FileHandleHolder> file_handle_;
166 PP_FileSystemType file_system_type_; 168 PP_FileSystemType file_system_type_;
167 ScopedPPResource file_system_resource_; 169 scoped_refptr<Resource> file_system_resource_;
168 FileIOStateManager state_manager_; 170 FileIOStateManager state_manager_;
169 171
170 scoped_refptr<Resource> file_ref_; 172 scoped_refptr<Resource> file_ref_;
171 173
172 DISALLOW_COPY_AND_ASSIGN(FileIOResource); 174 DISALLOW_COPY_AND_ASSIGN(FileIOResource);
173 }; 175 };
174 176
175 } // namespace proxy 177 } // namespace proxy
176 } // namespace ppapi 178 } // namespace ppapi
177 179
178 #endif // PPAPI_PROXY_FILE_IO_RESOURCE_H_ 180 #endif // PPAPI_PROXY_FILE_IO_RESOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/file_io_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698