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

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

Issue 7189045: Make o.o.p. proxy handle PPP_Instance versions 0.4 and 0.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 9 years, 6 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/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppapi_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index dac78fc4dbafa732d97bb890b953c1e01a5b565f..0e809c43fcac5abf4291e55c0f274988d0d9287b 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -238,9 +238,34 @@ const PPB_Zoom_Dev ppb_zoom = {
} // namespace
-PluginInstance::PluginInstance(PluginDelegate* delegate,
- PluginModule* module,
- PPP_Instance_Combined* instance_interface)
+// static
+PluginInstance* PluginInstance::Create0_5(PluginDelegate* delegate,
+ PluginModule* module,
+ const void* ppp_instance_if_0_5) {
+ const PPP_Instance_0_5* interface =
+ static_cast<const PPP_Instance_0_5*>(ppp_instance_if_0_5);
+ return new PluginInstance(
+ delegate,
+ module,
+ new ::ppapi::PPP_Instance_Combined(*interface));
+}
+
+// static
+PluginInstance* PluginInstance::Create0_4(PluginDelegate* delegate,
+ PluginModule* module,
+ const void* ppp_instance_if_0_4) {
+ const PPP_Instance_0_4* interface =
+ static_cast<const PPP_Instance_0_4*>(ppp_instance_if_0_4);
+ return new PluginInstance(
+ delegate,
+ module,
+ new ::ppapi::PPP_Instance_Combined(*interface));
+}
+
+PluginInstance::PluginInstance(
+ PluginDelegate* delegate,
+ PluginModule* module,
+ ::ppapi::PPP_Instance_Combined* instance_interface)
: delegate_(delegate),
module_(module),
instance_interface_(instance_interface),
@@ -691,23 +716,6 @@ bool PluginInstance::LoadFindInterface() {
return !!plugin_find_interface_;
}
-PluginInstance::PPP_Instance_Combined::PPP_Instance_Combined(
- const PPP_Instance_0_5& instance_if)
- : PPP_Instance_0_5(instance_if),
- GetInstanceObject_0_4(NULL) {}
-
-PluginInstance::PPP_Instance_Combined::PPP_Instance_Combined(
- const PPP_Instance_0_4& instance_if)
- : PPP_Instance_0_5(), // Zero-initialize.
- GetInstanceObject_0_4(instance_if.GetInstanceObject) {
- DidCreate = instance_if.DidCreate;
- DidDestroy = instance_if.DidDestroy;
- DidChangeView = instance_if.DidChangeView;
- DidChangeFocus = instance_if.DidChangeFocus;
- HandleInputEvent = instance_if.HandleInputEvent;
- HandleDocumentLoad = instance_if.HandleDocumentLoad;
-}
-
bool PluginInstance::LoadMessagingInterface() {
if (!checked_for_plugin_messaging_interface_) {
checked_for_plugin_messaging_interface_ = true;
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.h ('k') | webkit/plugins/ppapi/ppapi_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698