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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_globals.cc

Issue 8951014: Change the DidChangeView update to take a new ViewChanged resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More nacl fixes Created 9 years 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/native_client/src/shared/ppapi_proxy/plugin_globals.cc
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_globals.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_globals.cc
index 8efe062dd6b8bf19438060c48145e4e65dab9e7c..cc4ce3c2460fc8352f4af2676eeeea44198baa2d 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_globals.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_globals.cc
@@ -109,9 +109,21 @@ const PPP_InputEvent* PPPInputEventInterface() {
return static_cast<const PPP_InputEvent*>(ppp);
}
-const PPP_Instance* PPPInstanceInterface() {
- static const void* ppp = GetPluginInterfaceSafe(PPP_INSTANCE_INTERFACE);
- return static_cast<const PPP_Instance*>(ppp);
+PPP_Instance_Combined* PPPInstanceInterface() {
+ static PPP_Instance_Combined combined;
+ if (!combined.initialized()) {
+ // Note: don't use "safe" version since that will assert if 1.1 isn't
+ // supported, which isn't required.
+ const void* instance1_1 = GetPluginInterface(
+ PPP_INSTANCE_INTERFACE_1_1);
+ if (instance1_1) {
+ combined.Init1_1(static_cast<const PPP_Instance_1_1*>(instance1_1));
+ } else {
+ combined.Init1_0(static_cast<const PPP_Instance_1_0*>(
+ GetPluginInterfaceSafe(PPP_INSTANCE_INTERFACE_1_0)));
+ }
+ }
+ return &combined;
}
const PPP_Messaging* PPPMessagingInterface() {

Powered by Google App Engine
This is Rietveld 408576698