| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 type != PP_INPUTEVENT_TYPE_KEYDOWN && | 204 type != PP_INPUTEVENT_TYPE_KEYDOWN && |
| 205 type != PP_INPUTEVENT_TYPE_KEYUP && | 205 type != PP_INPUTEVENT_TYPE_KEYUP && |
| 206 type != PP_INPUTEVENT_TYPE_CHAR) | 206 type != PP_INPUTEVENT_TYPE_CHAR) |
| 207 return 0; | 207 return 0; |
| 208 ppapi::InputEventData data; | 208 ppapi::InputEventData data; |
| 209 data.event_type = type; | 209 data.event_type = type; |
| 210 data.event_time_stamp = time_stamp; | 210 data.event_time_stamp = time_stamp; |
| 211 data.event_modifiers = modifiers; | 211 data.event_modifiers = modifiers; |
| 212 data.key_code = key_code; | 212 data.key_code = key_code; |
| 213 if (character_text.type == PP_VARTYPE_STRING) { | 213 if (character_text.type == PP_VARTYPE_STRING) { |
| 214 scoped_refptr<StringVar> text_str(StringVar::FromPPVar(character_text)); | 214 StringVar* text_str = StringVar::FromPPVar(character_text); |
| 215 if (!text_str) | 215 if (!text_str) |
| 216 return 0; | 216 return 0; |
| 217 data.character_text = text_str->value(); | 217 data.character_text = text_str->value(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 return PPB_InputEvent_Proxy::CreateProxyResource(instance, data); | 220 return PPB_InputEvent_Proxy::CreateProxyResource(instance, data); |
| 221 } | 221 } |
| 222 | 222 |
| 223 PP_Resource ResourceCreationProxy::CreateMouseInputEvent( | 223 PP_Resource ResourceCreationProxy::CreateMouseInputEvent( |
| 224 PP_Instance instance, | 224 PP_Instance instance, |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); | 398 *result_image_handle = dispatcher_->ShareHandleWithRemote(ih, false); |
| 399 #else | 399 #else |
| 400 *result_image_handle = ImageData::HandleFromInt(handle); | 400 *result_image_handle = ImageData::HandleFromInt(handle); |
| 401 #endif | 401 #endif |
| 402 } | 402 } |
| 403 } | 403 } |
| 404 } | 404 } |
| 405 | 405 |
| 406 } // namespace proxy | 406 } // namespace proxy |
| 407 } // namespace ppapi | 407 } // namespace ppapi |
| OLD | NEW |