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

Unified Diff: ppapi/proxy/ppp_instance_proxy.cc

Issue 10543029: PPAPI/NaCl: Reinitialize some stuff when the ipc proxy starts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: should fix mac Created 8 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 | « ppapi/proxy/ppapi_proxy_test.cc ('k') | ppapi/shared_impl/ppp_instance_combined.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppp_instance_proxy.cc
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
index 27495bb507d32223f7e23ca724e43b1039b6dfb9..f7c7dfd861e093628d1c84c71227e6faed5f3cf1 100644
--- a/ppapi/proxy/ppp_instance_proxy.cc
+++ b/ppapi/proxy/ppp_instance_proxy.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "base/bind.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/c/ppb_core.h"
#include "ppapi/c/ppb_fullscreen.h"
@@ -144,16 +145,8 @@ PPP_Instance_Proxy::PPP_Instance_Proxy(Dispatcher* dispatcher)
// the interface, we want to say it supports the 1.1 version since we'll
// convert it here. This magic conversion code is hardcoded into
// PluginDispatcher::OnMsgSupportsInterface.
- const PPP_Instance* instance = static_cast<const PPP_Instance*>(
- dispatcher->local_get_interface()(PPP_INSTANCE_INTERFACE));
- if (instance) {
- combined_interface_.reset(new PPP_Instance_Combined(*instance));
- } else {
- const PPP_Instance_1_0* instance_1_0 =
- static_cast<const PPP_Instance_1_0*>(
- dispatcher->local_get_interface()(PPP_INSTANCE_INTERFACE_1_0));
- combined_interface_.reset(new PPP_Instance_Combined(*instance_1_0));
- }
+ combined_interface_.reset(PPP_Instance_Combined::Create(
+ base::Bind(dispatcher->local_get_interface())));
}
}
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | ppapi/shared_impl/ppp_instance_combined.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698