[email protected] | 25651387 | 2012-01-05 15:41:52 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_ | ||||
6 | #define PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_ | ||||
7 | |||||
8 | #include "ppapi/c/pp_instance.h" | ||||
[email protected] | 25651387 | 2012-01-05 15:41:52 | [diff] [blame] | 9 | #include "ppapi/c/ppp_input_event.h" |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 10 | #include "ppapi/proxy/interface_proxy.h" |
11 | |||||
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 12 | namespace ppapi { |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 13 | |
[email protected] | 4d2efd2 | 2011-08-18 21:58:02 | [diff] [blame] | 14 | struct InputEventData; |
15 | |||||
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 16 | namespace proxy { |
17 | |||||
18 | class PPP_InputEvent_Proxy : public InterfaceProxy { | ||||
19 | public: | ||||
[email protected] | 5c96602 | 2011-09-13 18:09:37 | [diff] [blame] | 20 | PPP_InputEvent_Proxy(Dispatcher* dispatcher); |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 21 | virtual ~PPP_InputEvent_Proxy(); |
22 | |||||
[email protected] | 6642ebf | 2013-12-17 20:49:30 | [diff] [blame] | 23 | static const PPP_InputEvent* GetProxyInterface(); |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 24 | |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 25 | // InterfaceProxy implementation. |
26 | virtual bool OnMessageReceived(const IPC::Message& msg); | ||||
27 | |||||
28 | private: | ||||
29 | // Message handlers. | ||||
30 | void OnMsgHandleInputEvent(PP_Instance instance, | ||||
31 | const ppapi::InputEventData& data); | ||||
32 | void OnMsgHandleFilteredInputEvent(PP_Instance instance, | ||||
33 | const ppapi::InputEventData& data, | ||||
34 | PP_Bool* result); | ||||
[email protected] | 5c96602 | 2011-09-13 18:09:37 | [diff] [blame] | 35 | |
[email protected] | 5c96602 | 2011-09-13 18:09:37 | [diff] [blame] | 36 | // When this proxy is in the plugin side, this value caches the interface |
37 | // pointer so we don't have to retrieve it from the dispatcher each time. | ||||
38 | // In the host, this value is always NULL. | ||||
39 | const PPP_InputEvent* ppp_input_event_impl_; | ||||
40 | |||||
41 | DISALLOW_COPY_AND_ASSIGN(PPP_InputEvent_Proxy); | ||||
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 42 | }; |
43 | |||||
44 | } // namespace proxy | ||||
[email protected] | 4d2efd2 | 2011-08-18 21:58:02 | [diff] [blame] | 45 | } // namespace ppapi |
[email protected] | 493d1421 | 2011-07-07 15:38:48 | [diff] [blame] | 46 | |
47 | #endif // PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_ |