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

Unified Diff: webkit/plugins/ppapi/ppb_input_event_impl.cc

Issue 7669055: Remove webkit::ppapi::Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nulls auditeed 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 | « webkit/plugins/ppapi/ppb_input_event_impl.h ('k') | webkit/plugins/ppapi/ppb_layer_compositor_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_input_event_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_input_event_impl.cc b/webkit/plugins/ppapi/ppb_input_event_impl.cc
index f2383b040d32303b0c27b515c18828ff28f33049..b0e61002a35d2083b4edd64b6ac683926d76d7f7 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
« no previous file with comments | « webkit/plugins/ppapi/ppb_input_event_impl.h ('k') | webkit/plugins/ppapi/ppb_layer_compositor_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698