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

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: enforce ordering of events, make previous view emptyenforce ordering of events, make previous view … 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
Index: ppapi/proxy/ppp_instance_proxy.cc
diff --git a/ppapi/proxy/ppp_instance_proxy.cc b/ppapi/proxy/ppp_instance_proxy.cc
index 083cc91bb96e70a1ae3616917116b840df0072fd..48e1be847eae3605e38dce4ae851200256bfc121 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())));
}
}

Powered by Google App Engine
This is Rietveld 408576698