Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Side by Side Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 7621054: Don't use a scoped_refptr for StringVar::FromPPVar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppp_messaging_proxy_test.cc ('k') | ppapi/shared_impl/url_util_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_messaging_proxy_test.cc ('k') | ppapi/shared_impl/url_util_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698