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" |
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" | 13 #include "base/memory/scoped_callback_factory.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
16 #include "ppapi/c/pp_file_info.h" | 16 #include "ppapi/c/pp_file_info.h" |
17 #include "ppapi/c/pp_time.h" | 17 #include "ppapi/c/pp_time.h" |
| 18 #include "ppapi/shared_impl/resource.h" |
18 #include "ppapi/thunk/ppb_file_io_api.h" | 19 #include "ppapi/thunk/ppb_file_io_api.h" |
19 #include "webkit/plugins/ppapi/callbacks.h" | 20 #include "webkit/plugins/ppapi/callbacks.h" |
20 #include "webkit/plugins/ppapi/plugin_delegate.h" | 21 #include "webkit/plugins/ppapi/plugin_delegate.h" |
21 #include "webkit/plugins/ppapi/resource.h" | |
22 | 22 |
23 struct PP_CompletionCallback; | 23 struct PP_CompletionCallback; |
24 struct PPB_FileIO; | 24 struct PPB_FileIO; |
25 struct PPB_FileIOTrusted; | 25 struct PPB_FileIOTrusted; |
26 | 26 |
27 namespace webkit { | 27 namespace webkit { |
28 namespace ppapi { | 28 namespace ppapi { |
29 | 29 |
30 class PluginModule; | 30 class PluginModule; |
31 class PPB_FileRef_Impl; | 31 class PPB_FileRef_Impl; |
32 class QuotaFileIO; | 32 class QuotaFileIO; |
33 | 33 |
34 class PPB_FileIO_Impl : public Resource, | 34 class PPB_FileIO_Impl : public ::ppapi::Resource, |
35 public ::ppapi::thunk::PPB_FileIO_API { | 35 public ::ppapi::thunk::PPB_FileIO_API { |
36 public: | 36 public: |
37 explicit PPB_FileIO_Impl(PluginInstance* instance); | 37 explicit PPB_FileIO_Impl(PP_Instance instance); |
38 virtual ~PPB_FileIO_Impl(); | 38 virtual ~PPB_FileIO_Impl(); |
39 | 39 |
40 // Resource overrides. | 40 // Resource overrides. |
41 virtual ::ppapi::thunk::PPB_FileIO_API* AsPPB_FileIO_API() OVERRIDE; | 41 virtual ::ppapi::thunk::PPB_FileIO_API* AsPPB_FileIO_API() OVERRIDE; |
42 | 42 |
43 // PPB_FileIO_API implementation. | 43 // PPB_FileIO_API implementation. |
44 virtual int32_t Open(PP_Resource file_ref, | 44 virtual int32_t Open(PP_Resource file_ref, |
45 int32_t open_flags, | 45 int32_t open_flags, |
46 PP_CompletionCallback callback) OVERRIDE; | 46 PP_CompletionCallback callback) OVERRIDE; |
47 virtual int32_t Query(PP_FileInfo* info, | 47 virtual int32_t Query(PP_FileInfo* info, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // of type PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY} is opened. | 143 // of type PP_FILESYSTEMTYPE_LOCAL{PERSISTENT,TEMPORARY} is opened. |
144 scoped_ptr<QuotaFileIO> quota_file_io_; | 144 scoped_ptr<QuotaFileIO> quota_file_io_; |
145 | 145 |
146 DISALLOW_COPY_AND_ASSIGN(PPB_FileIO_Impl); | 146 DISALLOW_COPY_AND_ASSIGN(PPB_FileIO_Impl); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace ppapi | 149 } // namespace ppapi |
150 } // namespace webkit | 150 } // namespace webkit |
151 | 151 |
152 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ | 152 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FILE_IO_IMPL_H_ |
OLD | NEW |