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_TESTING_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_TESTING_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_TESTING_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_TESTING_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/c/pp_resource.h" | 10 #include "ppapi/c/pp_resource.h" |
11 #include "ppapi/proxy/interface_proxy.h" | 11 #include "ppapi/proxy/interface_proxy.h" |
12 #include "ppapi/shared_impl/host_resource.h" | 12 #include "ppapi/shared_impl/host_resource.h" |
13 | 13 |
14 struct PP_Point; | 14 struct PP_Point; |
15 struct PPB_Testing_Dev; | 15 struct PPB_Testing_Dev; |
16 | 16 |
17 namespace ppapi { | 17 namespace ppapi { |
| 18 |
| 19 struct InputEventData; |
| 20 |
18 namespace proxy { | 21 namespace proxy { |
19 | 22 |
20 class PPB_Testing_Proxy : public InterfaceProxy { | 23 class PPB_Testing_Proxy : public InterfaceProxy { |
21 public: | 24 public: |
22 PPB_Testing_Proxy(Dispatcher* dispatcher); | 25 PPB_Testing_Proxy(Dispatcher* dispatcher); |
23 virtual ~PPB_Testing_Proxy(); | 26 virtual ~PPB_Testing_Proxy(); |
24 | 27 |
25 static const Info* GetInfo(); | 28 static const Info* GetInfo(); |
26 | 29 |
27 // InterfaceProxy implementation. | 30 // InterfaceProxy implementation. |
28 virtual bool OnMessageReceived(const IPC::Message& msg); | 31 virtual bool OnMessageReceived(const IPC::Message& msg); |
29 | 32 |
30 private: | 33 private: |
31 // Message handlers. | 34 // Message handlers. |
32 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d, | 35 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d, |
33 const ppapi::HostResource& image, | 36 const ppapi::HostResource& image, |
34 const PP_Point& top_left, | 37 const PP_Point& top_left, |
35 PP_Bool* result); | 38 PP_Bool* result); |
36 void OnMsgRunMessageLoop(PP_Instance instance); | 39 void OnMsgRunMessageLoop(PP_Instance instance); |
37 void OnMsgQuitMessageLoop(PP_Instance instance); | 40 void OnMsgQuitMessageLoop(PP_Instance instance); |
38 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result); | 41 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result); |
| 42 void OnMsgSimulateInputEvent(PP_Instance instance, |
| 43 const ppapi::InputEventData& input_event); |
39 | 44 |
40 // When this proxy is in the host side, this value caches the interface | 45 // When this proxy is in the host side, this value caches the interface |
41 // pointer so we don't have to retrieve it from the dispatcher each time. | 46 // pointer so we don't have to retrieve it from the dispatcher each time. |
42 // In the plugin, this value is always NULL. | 47 // In the plugin, this value is always NULL. |
43 const PPB_Testing_Dev* ppb_testing_impl_; | 48 const PPB_Testing_Dev* ppb_testing_impl_; |
44 | 49 |
45 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy); | 50 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy); |
46 }; | 51 }; |
47 | 52 |
48 } // namespace proxy | 53 } // namespace proxy |
49 } // namespace ppapi | 54 } // namespace ppapi |
50 | 55 |
51 #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_ | 56 #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_ |
OLD | NEW |