summaryrefslogtreecommitdiffstats
path: root/webkit/plugins/ppapi/ppb_input_event_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/plugins/ppapi/ppb_input_event_impl.cc')
-rw-r--r--webkit/plugins/ppapi/ppb_input_event_impl.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/webkit/plugins/ppapi/ppb_input_event_impl.cc b/webkit/plugins/ppapi/ppb_input_event_impl.cc
index f2383b0..b0e6100 100644
--- a/webkit/plugins/ppapi/ppb_input_event_impl.cc
+++ b/webkit/plugins/ppapi/ppb_input_event_impl.cc
@@ -7,6 +7,7 @@
#include "ppapi/shared_impl/var.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
+#include "webkit/plugins/ppapi/resource_helper.h"
using ppapi::InputEventData;
using ppapi::InputEventImpl;
@@ -16,24 +17,21 @@ using ppapi::thunk::PPB_InputEvent_API;
namespace webkit {
namespace ppapi {
-PPB_InputEvent_Impl::PPB_InputEvent_Impl(PluginInstance* instance,
+PPB_InputEvent_Impl::PPB_InputEvent_Impl(PP_Instance instance,
const InputEventData& data)
: Resource(instance),
InputEventImpl(data) {
}
-// static
-PP_Resource PPB_InputEvent_Impl::Create(PluginInstance* instance,
- const InputEventData& data) {
- return (new PPB_InputEvent_Impl(instance, data))->GetReference();
-}
-
PPB_InputEvent_API* PPB_InputEvent_Impl::AsPPB_InputEvent_API() {
return this;
}
PP_Var PPB_InputEvent_Impl::StringToPPVar(const std::string& str) {
- return StringVar::StringToPPVar(instance()->module()->pp_module(), str);
+ PluginModule* plugin_module = ResourceHelper::GetPluginModule(this);
+ if (!plugin_module)
+ return PP_MakeUndefined();
+ return StringVar::StringToPPVar(plugin_module->pp_module(), str);
}
} // namespace ppapi