| 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 #include "ppapi/proxy/ppp_input_event_proxy.h" | 5 #include "ppapi/proxy/ppp_input_event_proxy.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ppapi/c/ppp_input_event.h" | 9 #include "ppapi/c/ppp_input_event.h" |
| 10 #include "ppapi/proxy/host_dispatcher.h" | 10 #include "ppapi/proxy/host_dispatcher.h" |
| 11 #include "ppapi/proxy/plugin_dispatcher.h" | 11 #include "ppapi/proxy/plugin_dispatcher.h" |
| 12 #include "ppapi/proxy/plugin_resource_tracker.h" | 12 #include "ppapi/proxy/plugin_resource_tracker.h" |
| 13 #include "ppapi/proxy/ppapi_messages.h" | 13 #include "ppapi/proxy/ppapi_messages.h" |
| 14 #include "ppapi/shared_impl/input_event_impl.h" | 14 #include "ppapi/shared_impl/ppb_input_event_shared.h" |
| 15 #include "ppapi/thunk/enter.h" | 15 #include "ppapi/thunk/enter.h" |
| 16 #include "ppapi/thunk/ppb_input_event_api.h" | 16 #include "ppapi/thunk/ppb_input_event_api.h" |
| 17 | 17 |
| 18 using ppapi::thunk::EnterResourceNoLock; | 18 using ppapi::thunk::EnterResourceNoLock; |
| 19 using ppapi::thunk::PPB_InputEvent_API; | 19 using ppapi::thunk::PPB_InputEvent_API; |
| 20 | 20 |
| 21 namespace ppapi { | 21 namespace ppapi { |
| 22 namespace proxy { | 22 namespace proxy { |
| 23 | 23 |
| 24 namespace { | 24 namespace { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 OnMsgHandleInputEvent) | 89 OnMsgHandleInputEvent) |
| 90 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInputEvent_HandleFilteredInputEvent, | 90 IPC_MESSAGE_HANDLER(PpapiMsg_PPPInputEvent_HandleFilteredInputEvent, |
| 91 OnMsgHandleFilteredInputEvent) | 91 OnMsgHandleFilteredInputEvent) |
| 92 IPC_MESSAGE_UNHANDLED(handled = false) | 92 IPC_MESSAGE_UNHANDLED(handled = false) |
| 93 IPC_END_MESSAGE_MAP() | 93 IPC_END_MESSAGE_MAP() |
| 94 return handled; | 94 return handled; |
| 95 } | 95 } |
| 96 | 96 |
| 97 void PPP_InputEvent_Proxy::OnMsgHandleInputEvent(PP_Instance instance, | 97 void PPP_InputEvent_Proxy::OnMsgHandleInputEvent(PP_Instance instance, |
| 98 const InputEventData& data) { | 98 const InputEventData& data) { |
| 99 scoped_refptr<InputEventImpl> resource(new InputEventImpl( | 99 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( |
| 100 InputEventImpl::InitAsProxy(), instance, data)); | 100 PPB_InputEvent_Shared::InitAsProxy(), instance, data)); |
| 101 ppp_input_event_impl_->HandleInputEvent(instance, resource->pp_resource()); | 101 ppp_input_event_impl_->HandleInputEvent(instance, resource->pp_resource()); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent( | 104 void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent( |
| 105 PP_Instance instance, | 105 PP_Instance instance, |
| 106 const InputEventData& data, | 106 const InputEventData& data, |
| 107 PP_Bool* result) { | 107 PP_Bool* result) { |
| 108 scoped_refptr<InputEventImpl> resource(new InputEventImpl( | 108 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( |
| 109 InputEventImpl::InitAsProxy(), instance, data)); | 109 PPB_InputEvent_Shared::InitAsProxy(), instance, data)); |
| 110 *result = ppp_input_event_impl_->HandleInputEvent(instance, | 110 *result = ppp_input_event_impl_->HandleInputEvent(instance, |
| 111 resource->pp_resource()); | 111 resource->pp_resource()); |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace proxy | 114 } // namespace proxy |
| 115 } // namespace ppapi | 115 } // namespace ppapi |
| OLD | NEW |