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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.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/browser_ppp.cc
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc
index d31de7824934ac69cfba6582d0db1136cf7345ad..437a694843e5f688562510d061ddda2d24c14729 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/browser_ppp.cc
@@ -164,6 +164,18 @@ const void* BrowserPpp::GetPluginInterface(const char* interface_name) {
interface_name, NaClSrpcErrorString(srpc_result));
is_nexe_alive_ = (srpc_result != NACL_SRPC_RESULT_INTERNAL);
+ // Special case PPP_Instance versioning. The plugin side of the proxy
+ // converts Instance 1.1 to Instance 1.0 as needed, so we want to say here
+ // in the browser side that any time either 1.0 or 1.1 is supported, that
+ // we'll support 1.1.
+ if (srpc_result == NACL_SRPC_RESULT_OK && !exports_interface_name &&
+ strcmp(interface_name, PPP_INSTANCE_INTERFACE_1_1) == 0) {
+ srpc_result =
+ PppRpcClient::PPP_GetInterface(main_channel_,
+ PPP_INSTANCE_INTERFACE_1_0,
+ &exports_interface_name);
+ }
+
const void* ppp_interface = NULL;
if (srpc_result != NACL_SRPC_RESULT_OK || !exports_interface_name) {
ppp_interface = NULL;

Powered by Google App Engine
This is Rietveld 408576698