OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PPP_INSTANCE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ |
6 #define PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ | 6 #define PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace pp { | 21 namespace pp { |
22 namespace proxy { | 22 namespace proxy { |
23 | 23 |
24 class SerializedVarReturnValue; | 24 class SerializedVarReturnValue; |
25 | 25 |
26 class PPP_Instance_Proxy : public InterfaceProxy { | 26 class PPP_Instance_Proxy : public InterfaceProxy { |
27 public: | 27 public: |
28 PPP_Instance_Proxy(Dispatcher* dispatcher, const void* target_interface); | 28 PPP_Instance_Proxy(Dispatcher* dispatcher, const void* target_interface); |
29 virtual ~PPP_Instance_Proxy(); | 29 virtual ~PPP_Instance_Proxy(); |
30 | 30 |
| 31 static const Info* GetInfo(); |
| 32 |
31 const PPP_Instance* ppp_instance_target() const { | 33 const PPP_Instance* ppp_instance_target() const { |
32 return reinterpret_cast<const PPP_Instance*>(target_interface()); | 34 return reinterpret_cast<const PPP_Instance*>(target_interface()); |
33 } | 35 } |
34 | 36 |
35 // InterfaceProxy implementation. | 37 // InterfaceProxy implementation. |
36 virtual const void* GetSourceInterface() const; | |
37 virtual InterfaceID GetInterfaceId() const; | |
38 virtual bool OnMessageReceived(const IPC::Message& msg); | 38 virtual bool OnMessageReceived(const IPC::Message& msg); |
39 | 39 |
40 private: | 40 private: |
41 // Message handlers. | 41 // Message handlers. |
42 void OnMsgDidCreate(PP_Instance instance, | 42 void OnMsgDidCreate(PP_Instance instance, |
43 const std::vector<std::string>& argn, | 43 const std::vector<std::string>& argn, |
44 const std::vector<std::string>& argv, | 44 const std::vector<std::string>& argv, |
45 PP_Bool* result); | 45 PP_Bool* result); |
46 void OnMsgDidDestroy(PP_Instance instance); | 46 void OnMsgDidDestroy(PP_Instance instance); |
47 void OnMsgDidChangeView(PP_Instance instance, | 47 void OnMsgDidChangeView(PP_Instance instance, |
48 const PP_Rect& position, | 48 const PP_Rect& position, |
49 const PP_Rect& clip); | 49 const PP_Rect& clip); |
50 void OnMsgDidChangeFocus(PP_Instance instance, PP_Bool has_focus); | 50 void OnMsgDidChangeFocus(PP_Instance instance, PP_Bool has_focus); |
51 void OnMsgHandleInputEvent(PP_Instance instance, | 51 void OnMsgHandleInputEvent(PP_Instance instance, |
52 const PP_InputEvent& event, | 52 const PP_InputEvent& event, |
53 PP_Bool* result); | 53 PP_Bool* result); |
54 void OnMsgHandleDocumentLoad(PP_Instance instance, | 54 void OnMsgHandleDocumentLoad(PP_Instance instance, |
55 const HostResource& url_loader, | 55 const HostResource& url_loader, |
56 PP_Bool* result); | 56 PP_Bool* result); |
57 void OnMsgGetInstanceObject(PP_Instance instance, | 57 void OnMsgGetInstanceObject(PP_Instance instance, |
58 SerializedVarReturnValue result); | 58 SerializedVarReturnValue result); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace proxy | 61 } // namespace proxy |
62 } // namespace pp | 62 } // namespace pp |
63 | 63 |
64 #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ | 64 #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ |
OLD | NEW |