| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ppapi/proxy/ppb_input_event_proxy.h" | |
| 6 | |
| 7 #include "ppapi/c/ppb_audio_config.h" | |
| 8 #include "ppapi/proxy/plugin_dispatcher.h" | |
| 9 #include "ppapi/proxy/plugin_var_tracker.h" | |
| 10 #include "ppapi/proxy/ppapi_messages.h" | |
| 11 #include "ppapi/shared_impl/input_event_impl.h" | |
| 12 #include "ppapi/shared_impl/resource.h" | |
| 13 #include "ppapi/shared_impl/var.h" | |
| 14 #include "ppapi/thunk/thunk.h" | |
| 15 | |
| 16 using ppapi::thunk::PPB_InputEvent_API; | |
| 17 | |
| 18 namespace ppapi { | |
| 19 namespace proxy { | |
| 20 | |
| 21 namespace { | |
| 22 | |
| 23 InterfaceProxy* CreateInputEventProxy(Dispatcher* dispatcher, | |
| 24 const void* target_interface) { | |
| 25 return new PPB_InputEvent_Proxy(dispatcher, target_interface); | |
| 26 } | |
| 27 | |
| 28 } // namespace | |
| 29 | |
| 30 PPB_InputEvent_Proxy::PPB_InputEvent_Proxy(Dispatcher* dispatcher, | |
| 31 const void* target_interface) | |
| 32 : InterfaceProxy(dispatcher, target_interface) { | |
| 33 } | |
| 34 | |
| 35 PPB_InputEvent_Proxy::~PPB_InputEvent_Proxy() { | |
| 36 } | |
| 37 | |
| 38 // static | |
| 39 const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetInputEventInfo() { | |
| 40 static const Info info = { | |
| 41 thunk::GetPPB_InputEvent_Thunk(), | |
| 42 PPB_INPUT_EVENT_INTERFACE, | |
| 43 INTERFACE_ID_NONE, | |
| 44 false, | |
| 45 &CreateInputEventProxy, | |
| 46 }; | |
| 47 return &info; | |
| 48 } | |
| 49 | |
| 50 // static | |
| 51 const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetKeyboardInputEventInfo() { | |
| 52 static const Info info = { | |
| 53 thunk::GetPPB_KeyboardInputEvent_Thunk(), | |
| 54 PPB_KEYBOARD_INPUT_EVENT_INTERFACE, | |
| 55 INTERFACE_ID_NONE, | |
| 56 false, | |
| 57 &CreateInputEventProxy, | |
| 58 }; | |
| 59 return &info; | |
| 60 } | |
| 61 | |
| 62 // static | |
| 63 const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetMouseInputEventInfo1_0() { | |
| 64 static const Info info = { | |
| 65 thunk::GetPPB_MouseInputEvent_1_0_Thunk(), | |
| 66 PPB_MOUSE_INPUT_EVENT_INTERFACE_1_0, | |
| 67 INTERFACE_ID_NONE, | |
| 68 false, | |
| 69 &CreateInputEventProxy, | |
| 70 }; | |
| 71 return &info; | |
| 72 } | |
| 73 | |
| 74 // static | |
| 75 const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetMouseInputEventInfo1_1() { | |
| 76 static const Info info = { | |
| 77 thunk::GetPPB_MouseInputEvent_1_1_Thunk(), | |
| 78 PPB_MOUSE_INPUT_EVENT_INTERFACE_1_1, | |
| 79 INTERFACE_ID_NONE, | |
| 80 false, | |
| 81 &CreateInputEventProxy, | |
| 82 }; | |
| 83 return &info; | |
| 84 } | |
| 85 | |
| 86 // static | |
| 87 const InterfaceProxy::Info* PPB_InputEvent_Proxy::GetWheelInputEventInfo() { | |
| 88 static const Info info = { | |
| 89 thunk::GetPPB_WheelInputEvent_Thunk(), | |
| 90 PPB_WHEEL_INPUT_EVENT_INTERFACE, | |
| 91 INTERFACE_ID_NONE, | |
| 92 false, | |
| 93 &CreateInputEventProxy, | |
| 94 }; | |
| 95 return &info; | |
| 96 } | |
| 97 | |
| 98 bool PPB_InputEvent_Proxy::OnMessageReceived(const IPC::Message& msg) { | |
| 99 // There are no IPC messages for this interface. | |
| 100 NOTREACHED(); | |
| 101 return false; | |
| 102 } | |
| 103 | |
| 104 } // namespace proxy | |
| 105 } // namespace ppapi | |
| OLD | NEW |