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_PPB_INSTANCE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
7 | 7 |
8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
9 #include "ppapi/c/pp_resource.h" | 9 #include "ppapi/c/pp_resource.h" |
10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
11 #include "ppapi/proxy/host_resource.h" | 11 #include "ppapi/proxy/host_resource.h" |
12 #include "ppapi/proxy/interface_proxy.h" | 12 #include "ppapi/proxy/interface_proxy.h" |
13 | 13 |
14 struct PPB_Instance; | 14 struct PPB_Instance; |
15 | 15 |
16 namespace pp { | 16 namespace pp { |
17 namespace proxy { | 17 namespace proxy { |
18 | 18 |
19 class SerializedVarReceiveInput; | 19 class SerializedVarReceiveInput; |
20 class SerializedVarOutParam; | 20 class SerializedVarOutParam; |
21 class SerializedVarReturnValue; | 21 class SerializedVarReturnValue; |
22 | 22 |
23 class PPB_Instance_Proxy : public InterfaceProxy { | 23 class PPB_Instance_Proxy : public InterfaceProxy { |
24 public: | 24 public: |
25 PPB_Instance_Proxy(Dispatcher* dispatcher, const void* target_interface); | 25 PPB_Instance_Proxy(Dispatcher* dispatcher, const void* target_interface); |
26 virtual ~PPB_Instance_Proxy(); | 26 virtual ~PPB_Instance_Proxy(); |
27 | 27 |
| 28 static const Info* GetInfo(); |
| 29 |
28 const PPB_Instance* ppb_instance_target() const { | 30 const PPB_Instance* ppb_instance_target() const { |
29 return reinterpret_cast<const PPB_Instance*>(target_interface()); | 31 return reinterpret_cast<const PPB_Instance*>(target_interface()); |
30 } | 32 } |
31 | 33 |
32 // InterfaceProxy implementation. | 34 // InterfaceProxy implementation. |
33 virtual const void* GetSourceInterface() const; | |
34 virtual InterfaceID GetInterfaceId() const; | |
35 virtual bool OnMessageReceived(const IPC::Message& msg); | 35 virtual bool OnMessageReceived(const IPC::Message& msg); |
36 | 36 |
37 private: | 37 private: |
38 // Message handlers. | 38 // Message handlers. |
39 void OnMsgGetWindowObject(PP_Instance instance, | 39 void OnMsgGetWindowObject(PP_Instance instance, |
40 SerializedVarReturnValue result); | 40 SerializedVarReturnValue result); |
41 void OnMsgGetOwnerElementObject(PP_Instance instance, | 41 void OnMsgGetOwnerElementObject(PP_Instance instance, |
42 SerializedVarReturnValue result); | 42 SerializedVarReturnValue result); |
43 void OnMsgBindGraphics(PP_Instance instance, | 43 void OnMsgBindGraphics(PP_Instance instance, |
44 HostResource device, | 44 HostResource device, |
45 PP_Bool* result); | 45 PP_Bool* result); |
46 void OnMsgIsFullFrame(PP_Instance instance, PP_Bool* result); | 46 void OnMsgIsFullFrame(PP_Instance instance, PP_Bool* result); |
47 void OnMsgExecuteScript(PP_Instance instance, | 47 void OnMsgExecuteScript(PP_Instance instance, |
48 SerializedVarReceiveInput script, | 48 SerializedVarReceiveInput script, |
49 SerializedVarOutParam out_exception, | 49 SerializedVarOutParam out_exception, |
50 SerializedVarReturnValue result); | 50 SerializedVarReturnValue result); |
51 }; | 51 }; |
52 | 52 |
53 } // namespace proxy | 53 } // namespace proxy |
54 } // namespace pp | 54 } // namespace pp |
55 | 55 |
56 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ | 56 #endif // PPAPI_PROXY_PPB_INSTANCE_PROXY_H_ |
OLD | NEW |