| 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/resource_creation_proxy.h" | 5 #include "ppapi/proxy/resource_creation_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
| 8 #include "ppapi/c/pp_size.h" | 8 #include "ppapi/c/pp_size.h" |
| 9 #include "ppapi/proxy/interface_id.h" | 9 #include "ppapi/proxy/interface_id.h" |
| 10 #include "ppapi/proxy/plugin_dispatcher.h" | 10 #include "ppapi/proxy/plugin_dispatcher.h" |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 instance, data))->GetReference(); | 220 instance, data))->GetReference(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 PP_Resource ResourceCreationProxy::CreateMouseInputEvent( | 223 PP_Resource ResourceCreationProxy::CreateMouseInputEvent( |
| 224 PP_Instance instance, | 224 PP_Instance instance, |
| 225 PP_InputEvent_Type type, | 225 PP_InputEvent_Type type, |
| 226 PP_TimeTicks time_stamp, | 226 PP_TimeTicks time_stamp, |
| 227 uint32_t modifiers, | 227 uint32_t modifiers, |
| 228 PP_InputEvent_MouseButton mouse_button, | 228 PP_InputEvent_MouseButton mouse_button, |
| 229 const PP_Point* mouse_position, | 229 const PP_Point* mouse_position, |
| 230 int32_t click_count) { | 230 int32_t click_count, |
| 231 const PP_Point* mouse_movement) { |
| 231 if (type != PP_INPUTEVENT_TYPE_MOUSEDOWN && | 232 if (type != PP_INPUTEVENT_TYPE_MOUSEDOWN && |
| 232 type != PP_INPUTEVENT_TYPE_MOUSEUP && | 233 type != PP_INPUTEVENT_TYPE_MOUSEUP && |
| 233 type != PP_INPUTEVENT_TYPE_MOUSEMOVE && | 234 type != PP_INPUTEVENT_TYPE_MOUSEMOVE && |
| 234 type != PP_INPUTEVENT_TYPE_MOUSEENTER && | 235 type != PP_INPUTEVENT_TYPE_MOUSEENTER && |
| 235 type != PP_INPUTEVENT_TYPE_MOUSELEAVE) | 236 type != PP_INPUTEVENT_TYPE_MOUSELEAVE) |
| 236 return 0; | 237 return 0; |
| 237 | 238 |
| 238 ppapi::InputEventData data; | 239 ppapi::InputEventData data; |
| 239 data.event_type = type; | 240 data.event_type = type; |
| 240 data.event_time_stamp = time_stamp; | 241 data.event_time_stamp = time_stamp; |
| 241 data.event_modifiers = modifiers; | 242 data.event_modifiers = modifiers; |
| 242 data.mouse_button = mouse_button; | 243 data.mouse_button = mouse_button; |
| 243 data.mouse_position = *mouse_position; | 244 data.mouse_position = *mouse_position; |
| 244 data.mouse_click_count = click_count; | 245 data.mouse_click_count = click_count; |
| 246 data.mouse_movement = *mouse_movement; |
| 245 | 247 |
| 246 return (new InputEventImpl(InputEventImpl::InitAsProxy(), | 248 return (new InputEventImpl(InputEventImpl::InitAsProxy(), |
| 247 instance, data))->GetReference(); | 249 instance, data))->GetReference(); |
| 248 } | 250 } |
| 249 | 251 |
| 250 PP_Resource ResourceCreationProxy::CreateGraphics3D( | 252 PP_Resource ResourceCreationProxy::CreateGraphics3D( |
| 251 PP_Instance instance, | 253 PP_Instance instance, |
| 252 PP_Resource share_context, | 254 PP_Resource share_context, |
| 253 const int32_t* attrib_list) { | 255 const int32_t* attrib_list) { |
| 254 return PPB_Graphics3D_Proxy::CreateProxyResource( | 256 return PPB_Graphics3D_Proxy::CreateProxyResource( |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); | 405 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); |
| 404 #else | 406 #else |
| 405 *result_image_handle = ImageData::HandleFromInt(handle); | 407 *result_image_handle = ImageData::HandleFromInt(handle); |
| 406 #endif | 408 #endif |
| 407 } | 409 } |
| 408 } | 410 } |
| 409 } | 411 } |
| 410 | 412 |
| 411 } // namespace proxy | 413 } // namespace proxy |
| 412 } // namespace ppapi | 414 } // namespace ppapi |
| OLD | NEW |