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_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> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "ipc/ipc_channel.h" | 11 #include "ipc/ipc_channel.h" |
12 #include "ppapi/c/pp_bool.h" | 12 #include "ppapi/c/pp_bool.h" |
13 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
14 #include "ppapi/proxy/interface_proxy.h" | 14 #include "ppapi/proxy/interface_proxy.h" |
15 #include "ppapi/proxy/serialized_structs.h" | 15 #include "ppapi/proxy/serialized_structs.h" |
16 #include "ppapi/thunk/resource_creation_api.h" | 16 #include "ppapi/thunk/resource_creation_api.h" |
17 | 17 |
18 struct PP_Size; | 18 struct PP_Size; |
19 | 19 |
20 namespace ppapi { | 20 namespace ppapi { |
21 | 21 |
22 class HostResource; | 22 class HostResource; |
23 | 23 |
24 namespace proxy { | 24 namespace proxy { |
25 | 25 |
| 26 struct Connection; |
26 class Dispatcher; | 27 class Dispatcher; |
27 | 28 |
28 class ResourceCreationProxy : public InterfaceProxy, | 29 class ResourceCreationProxy : public InterfaceProxy, |
29 public thunk::ResourceCreationAPI { | 30 public thunk::ResourceCreationAPI { |
30 public: | 31 public: |
31 explicit ResourceCreationProxy(Dispatcher* dispatcher); | 32 explicit ResourceCreationProxy(Dispatcher* dispatcher); |
32 virtual ~ResourceCreationProxy(); | 33 virtual ~ResourceCreationProxy(); |
33 | 34 |
34 // Factory function used for registration (normal code can just use the | 35 // Factory function used for registration (normal code can just use the |
35 // constructor). | 36 // constructor). |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 PP_VideoLayerMode_Dev mode) OVERRIDE; | 152 PP_VideoLayerMode_Dev mode) OVERRIDE; |
152 virtual PP_Resource CreateWebSocket(PP_Instance instance) OVERRIDE; | 153 virtual PP_Resource CreateWebSocket(PP_Instance instance) OVERRIDE; |
153 virtual PP_Resource CreateX509CertificatePrivate( | 154 virtual PP_Resource CreateX509CertificatePrivate( |
154 PP_Instance instance) OVERRIDE; | 155 PP_Instance instance) OVERRIDE; |
155 #endif // !defined(OS_NACL) | 156 #endif // !defined(OS_NACL) |
156 | 157 |
157 virtual bool Send(IPC::Message* msg) OVERRIDE; | 158 virtual bool Send(IPC::Message* msg) OVERRIDE; |
158 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 159 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
159 | 160 |
160 private: | 161 private: |
| 162 Connection GetConnection(); |
161 DISALLOW_COPY_AND_ASSIGN(ResourceCreationProxy); | 163 DISALLOW_COPY_AND_ASSIGN(ResourceCreationProxy); |
162 }; | 164 }; |
163 | 165 |
164 } // namespace proxy | 166 } // namespace proxy |
165 } // namespace ppapi | 167 } // namespace ppapi |
166 | 168 |
167 #endif // PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ | 169 #endif // PPAPI_PROXY_RESOURCE_CREATION_PROXY_H_ |
OLD | NEW |