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 PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ | 5 #ifndef PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ |
6 #define PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ | 6 #define PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
9 #include "ipc/ipc_channel.h" | 11 #include "ipc/ipc_channel.h" |
10 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
11 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
12 #include "ppapi/proxy/serialized_structs.h" | 14 #include "ppapi/proxy/serialized_structs.h" |
13 #include "ppapi/shared_impl/function_group_base.h" | 15 #include "ppapi/shared_impl/function_group_base.h" |
14 #include "ppapi/thunk/resource_creation_api.h" | 16 #include "ppapi/thunk/resource_creation_api.h" |
15 | 17 |
16 struct PP_Size; | 18 struct PP_Size; |
17 | 19 |
18 namespace pp { | 20 namespace pp { |
19 namespace proxy { | 21 namespace proxy { |
20 | 22 |
21 class HostResource; | 23 class HostResource; |
22 class Dispatcher; | 24 class Dispatcher; |
23 | 25 |
24 class ResourceCreationProxy : public ::ppapi::FunctionGroupBase, | 26 class ResourceCreationProxy : public ::ppapi::FunctionGroupBase, |
25 public ::ppapi::thunk::ResourceCreationAPI, | 27 public ::ppapi::thunk::ResourceCreationAPI, |
26 public ::IPC::Channel::Listener, | 28 public ::IPC::Channel::Listener, |
27 public IPC::Message::Sender { | 29 public IPC::Message::Sender { |
28 public: | 30 public: |
29 ResourceCreationProxy(Dispatcher* dispatcher); | 31 explicit ResourceCreationProxy(Dispatcher* dispatcher); |
30 virtual ~ResourceCreationProxy(); | 32 virtual ~ResourceCreationProxy(); |
31 | 33 |
32 virtual ::ppapi::thunk::ResourceCreationAPI* AsResourceCreationAPI() OVERRIDE; | 34 virtual ::ppapi::thunk::ResourceCreationAPI* AsResourceCreationAPI() OVERRIDE; |
33 | 35 |
34 // ResourceCreationAPI (called in plugin). | 36 // ResourceCreationAPI (called in plugin). |
35 virtual PP_Resource CreateAudio(PP_Instance instance, | 37 virtual PP_Resource CreateAudio(PP_Instance instance, |
36 PP_Resource config_id, | 38 PP_Resource config_id, |
37 PPB_Audio_Callback audio_callback, | 39 PPB_Audio_Callback audio_callback, |
38 void* user_data) OVERRIDE; | 40 void* user_data) OVERRIDE; |
39 virtual PP_Resource CreateAudioConfig(PP_Instance instance, | 41 virtual PP_Resource CreateAudioConfig(PP_Instance instance, |
(...skipping 12 matching lines...) Expand all Loading... |
52 PP_Resource share_context, | 54 PP_Resource share_context, |
53 const int32_t* attrib_list) OVERRIDE; | 55 const int32_t* attrib_list) OVERRIDE; |
54 virtual PP_Resource CreateDirectoryReader(PP_Resource directory_ref) OVERRIDE; | 56 virtual PP_Resource CreateDirectoryReader(PP_Resource directory_ref) OVERRIDE; |
55 virtual PP_Resource CreateFileChooser( | 57 virtual PP_Resource CreateFileChooser( |
56 PP_Instance instance, | 58 PP_Instance instance, |
57 const PP_FileChooserOptions_Dev* options) OVERRIDE; | 59 const PP_FileChooserOptions_Dev* options) OVERRIDE; |
58 virtual PP_Resource CreateFileIO(PP_Instance instance) OVERRIDE; | 60 virtual PP_Resource CreateFileIO(PP_Instance instance) OVERRIDE; |
59 virtual PP_Resource CreateFileRef(PP_Resource file_system, | 61 virtual PP_Resource CreateFileRef(PP_Resource file_system, |
60 const char* path) OVERRIDE; | 62 const char* path) OVERRIDE; |
61 virtual PP_Resource CreateFileSystem(PP_Instance instance, | 63 virtual PP_Resource CreateFileSystem(PP_Instance instance, |
62 PP_FileSystemType_Dev type) OVERRIDE; | 64 PP_FileSystemType type) OVERRIDE; |
63 virtual PP_Resource CreateFlashMenu(PP_Instance instance, | 65 virtual PP_Resource CreateFlashMenu(PP_Instance instance, |
64 const PP_Flash_Menu* menu_data) OVERRIDE; | 66 const PP_Flash_Menu* menu_data) OVERRIDE; |
65 virtual PP_Resource CreateFlashNetConnector(PP_Instance instance) OVERRIDE; | 67 virtual PP_Resource CreateFlashNetConnector(PP_Instance instance) OVERRIDE; |
66 virtual PP_Resource CreateFontObject( | 68 virtual PP_Resource CreateFontObject( |
67 PP_Instance instance, | 69 PP_Instance instance, |
68 const PP_FontDescription_Dev* description) OVERRIDE; | 70 const PP_FontDescription_Dev* description) OVERRIDE; |
69 virtual PP_Resource CreateGraphics2D(PP_Instance pp_instance, | 71 virtual PP_Resource CreateGraphics2D(PP_Instance pp_instance, |
70 const PP_Size& size, | 72 const PP_Size& size, |
71 PP_Bool is_always_opaque) OVERRIDE; | 73 PP_Bool is_always_opaque) OVERRIDE; |
72 virtual PP_Resource CreateGraphics3D(PP_Instance instance, | 74 virtual PP_Resource CreateGraphics3D(PP_Instance instance, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 116 |
115 Dispatcher* dispatcher_; | 117 Dispatcher* dispatcher_; |
116 | 118 |
117 DISALLOW_COPY_AND_ASSIGN(ResourceCreationProxy); | 119 DISALLOW_COPY_AND_ASSIGN(ResourceCreationProxy); |
118 }; | 120 }; |
119 | 121 |
120 } // namespace proxy | 122 } // namespace proxy |
121 } // namespace pp | 123 } // namespace pp |
122 | 124 |
123 #endif // PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ | 125 #endif // PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ |
OLD | NEW |