Elim cr-checkbox
[chromium-blink-merge.git] / ppapi / proxy / ppp_input_event_proxy.h
blob9fbc418b687d66be5bf41487e39b6f265c8f741c
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
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_
6 #define PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_
8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/ppp_input_event.h"
10 #include "ppapi/proxy/interface_proxy.h"
12 namespace ppapi {
14 struct InputEventData;
16 namespace proxy {
18 class PPP_InputEvent_Proxy : public InterfaceProxy {
19 public:
20 PPP_InputEvent_Proxy(Dispatcher* dispatcher);
21 virtual ~PPP_InputEvent_Proxy();
23 static const PPP_InputEvent* GetProxyInterface();
25 // InterfaceProxy implementation.
26 virtual bool OnMessageReceived(const IPC::Message& msg);
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);
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_;
41 DISALLOW_COPY_AND_ASSIGN(PPP_InputEvent_Proxy);
44 } // namespace proxy
45 } // namespace ppapi
47 #endif // PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_