OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( | 99 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( |
100 OBJECT_IS_PROXY, instance, data)); | 100 OBJECT_IS_PROXY, instance, data)); |
101 CallWhileUnlocked(ppp_input_event_impl_->HandleInputEvent, | 101 ppp_input_event_impl_->HandleInputEvent(instance, resource->pp_resource()); |
102 instance, | |
103 resource->pp_resource()); | |
104 } | 102 } |
105 | 103 |
106 void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent( | 104 void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent( |
107 PP_Instance instance, | 105 PP_Instance instance, |
108 const InputEventData& data, | 106 const InputEventData& data, |
109 PP_Bool* result) { | 107 PP_Bool* result) { |
110 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( | 108 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( |
111 OBJECT_IS_PROXY, instance, data)); | 109 OBJECT_IS_PROXY, instance, data)); |
112 *result = CallWhileUnlocked(ppp_input_event_impl_->HandleInputEvent, | 110 *result = ppp_input_event_impl_->HandleInputEvent(instance, |
113 instance, | 111 resource->pp_resource()); |
114 resource->pp_resource()); | |
115 } | 112 } |
116 | 113 |
117 } // namespace proxy | 114 } // namespace proxy |
118 } // namespace ppapi | 115 } // namespace ppapi |
OLD | NEW |