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 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 "ppapi/c/private/pp_file_handle.h" | 10 #include "ppapi/c/private/pp_file_handle.h" |
11 #include "ppapi/proxy/connection.h" | 11 #include "ppapi/proxy/connection.h" |
12 #include "ppapi/proxy/plugin_resource.h" | 12 #include "ppapi/proxy/plugin_resource.h" |
13 #include "ppapi/proxy/ppapi_proxy_export.h" | 13 #include "ppapi/proxy/ppapi_proxy_export.h" |
14 #include "ppapi/shared_impl/file_io_state_manager.h" | 14 #include "ppapi/shared_impl/file_io_state_manager.h" |
| 15 #include "ppapi/shared_impl/scoped_pp_resource.h" |
15 #include "ppapi/thunk/ppb_file_io_api.h" | 16 #include "ppapi/thunk/ppb_file_io_api.h" |
16 | 17 |
17 namespace ppapi { | 18 namespace ppapi { |
18 | 19 |
19 class TrackedCallback; | 20 class TrackedCallback; |
20 | 21 |
21 namespace proxy { | 22 namespace proxy { |
22 | 23 |
23 class PPAPI_PROXY_EXPORT FileIOResource | 24 class PPAPI_PROXY_EXPORT FileIOResource |
24 : public PluginResource, | 25 : public PluginResource, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 const ResourceMessageReplyParams& params); | 131 const ResourceMessageReplyParams& params); |
131 void OnPluginMsgRequestOSFileHandleComplete( | 132 void OnPluginMsgRequestOSFileHandleComplete( |
132 scoped_refptr<TrackedCallback> callback, | 133 scoped_refptr<TrackedCallback> callback, |
133 PP_FileHandle* output_handle, | 134 PP_FileHandle* output_handle, |
134 const ResourceMessageReplyParams& params); | 135 const ResourceMessageReplyParams& params); |
135 | 136 |
136 PP_FileHandle file_handle_; | 137 PP_FileHandle file_handle_; |
137 PP_FileSystemType file_system_type_; | 138 PP_FileSystemType file_system_type_; |
138 FileIOStateManager state_manager_; | 139 FileIOStateManager state_manager_; |
139 | 140 |
| 141 ScopedPPResource file_ref_; |
| 142 |
140 DISALLOW_COPY_AND_ASSIGN(FileIOResource); | 143 DISALLOW_COPY_AND_ASSIGN(FileIOResource); |
141 }; | 144 }; |
142 | 145 |
143 } // namespace proxy | 146 } // namespace proxy |
144 } // namespace ppapi | 147 } // namespace ppapi |
145 | 148 |
146 #endif // PPAPI_PROXY_FILE_IO_RESOURCE_H_ | 149 #endif // PPAPI_PROXY_FILE_IO_RESOURCE_H_ |
OLD | NEW |