blob: 9fbc418b687d66be5bf41487e39b6f265c8f741c [file] [log] [blame]
[email protected]256513872012-01-05 15:41:521// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]493d14212011-07-07 15:38:482// 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]256513872012-01-05 15:41:529#include "ppapi/c/ppp_input_event.h"
[email protected]493d14212011-07-07 15:38:4810#include "ppapi/proxy/interface_proxy.h"
11
[email protected]493d14212011-07-07 15:38:4812namespace ppapi {
[email protected]493d14212011-07-07 15:38:4813
[email protected]4d2efd22011-08-18 21:58:0214struct InputEventData;
15
[email protected]493d14212011-07-07 15:38:4816namespace proxy {
17
18class PPP_InputEvent_Proxy : public InterfaceProxy {
19 public:
[email protected]5c966022011-09-13 18:09:3720 PPP_InputEvent_Proxy(Dispatcher* dispatcher);
[email protected]493d14212011-07-07 15:38:4821 virtual ~PPP_InputEvent_Proxy();
22
[email protected]6642ebf2013-12-17 20:49:3023 static const PPP_InputEvent* GetProxyInterface();
[email protected]493d14212011-07-07 15:38:4824
[email protected]493d14212011-07-07 15:38:4825 // 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]5c966022011-09-13 18:09:3735
[email protected]5c966022011-09-13 18:09:3736 // 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]493d14212011-07-07 15:38:4842};
43
44} // namespace proxy
[email protected]4d2efd22011-08-18 21:58:0245} // namespace ppapi
[email protected]493d14212011-07-07 15:38:4846
47#endif // PPAPI_PROXY_PPP_INPUT_EVENT_PROXY_H_