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

Unified Diff: ppapi/proxy/resource_creation_proxy.cc

Issue 7578001: Unify var tracking between webkit and the proxy. (Closed) Base URL: svn://chrome-svn/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/proxy_object_var.cc ('k') | ppapi/proxy/serialized_var_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/resource_creation_proxy.cc
===================================================================
--- ppapi/proxy/resource_creation_proxy.cc (revision 96002)
+++ ppapi/proxy/resource_creation_proxy.cc (working copy)
@@ -36,10 +36,12 @@
#include "ppapi/shared_impl/font_impl.h"
#include "ppapi/shared_impl/function_group_base.h"
#include "ppapi/shared_impl/input_event_impl.h"
+#include "ppapi/shared_impl/var.h"
#include "ppapi/thunk/enter.h"
#include "ppapi/thunk/ppb_image_data_api.h"
using ppapi::InputEventData;
+using ppapi::StringVar;
using ppapi::thunk::ResourceCreationAPI;
namespace pp {
@@ -206,15 +208,17 @@
type != PP_INPUTEVENT_TYPE_KEYUP &&
type != PP_INPUTEVENT_TYPE_CHAR)
return 0;
- PluginVarTracker* tracker = PluginVarTracker::GetInstance();
-
ppapi::InputEventData data;
data.event_type = type;
data.event_time_stamp = time_stamp;
data.event_modifiers = modifiers;
data.key_code = key_code;
- if (character_text.type == PP_VARTYPE_STRING)
- data.character_text = *tracker->GetExistingString(character_text);
+ if (character_text.type == PP_VARTYPE_STRING) {
+ scoped_refptr<StringVar> text_str(StringVar::FromPPVar(character_text));
+ if (!text_str)
+ return 0;
+ data.character_text = text_str->value();
+ }
return PPB_InputEvent_Proxy::CreateProxyResource(instance, data);
}
« no previous file with comments | « ppapi/proxy/proxy_object_var.cc ('k') | ppapi/proxy/serialized_var_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698