Changes to allow testing interface for new NaCl Proxy
BUG=none
TEST=ppapi/tests
Review URL: https://chromiumcodereview.appspot.com/10918083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157871 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc
index d77c1cb..99b846f 100644
--- a/ppapi/proxy/interface_list.cc
+++ b/ppapi/proxy/interface_list.cc
@@ -229,7 +229,6 @@
// TODO(brettw) remove these.
AddPPB(PPB_Instance_Proxy::GetInfoPrivate());
AddPPB(PPB_PDF_Proxy::GetInfo());
- AddPPB(PPB_Testing_Proxy::GetInfo());
AddPPB(PPB_URLLoader_Proxy::GetTrustedInfo());
AddPPB(PPB_Var_Deprecated_Proxy::GetInfo());
@@ -241,6 +240,7 @@
API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
PPP_ContentDecryptor_Private_Proxy::GetProxyInterface());
#endif
+ AddPPB(PPB_Testing_Proxy::GetInfo());
// PPP (plugin) interfaces.
// TODO(brettw) move these to interface_list*.h
diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc
index 2f91fc7..5a6b43ac 100644
--- a/ppapi/proxy/ppb_audio_proxy.cc
+++ b/ppapi/proxy/ppb_audio_proxy.cc
@@ -74,6 +74,13 @@
}
Audio::~Audio() {
+#if defined(OS_NACL)
+ // Invoke StopPlayback() to ensure audio back-end has a chance to send the
+ // escape value over the sync socket, which will terminate the client side
+ // audio callback loop. This is required for NaCl Plugins that can't escape
+ // by shutting down the sync_socket.
+ StopPlayback();
+#endif
PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(config_);
}
diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc
index b8c9ce0..da2475a 100644
--- a/ppapi/proxy/ppb_testing_proxy.cc
+++ b/ppapi/proxy/ppb_testing_proxy.cc
@@ -93,10 +93,16 @@
}
PP_Var GetDocumentURL(PP_Instance instance, PP_URLComponents_Dev* components) {
+#if !defined(OS_NACL)
EnterInstance enter(instance);
if (enter.failed())
return PP_MakeUndefined();
return enter.functions()->GetDocumentURL(instance, components);
+#else
+ // TODO(nfullagar): Implement something better for the new NaCl IPC plugin.
+ // For now, this will at least allow some of the PPAPI tests to work.
+ return PP_MakeUndefined();
+#endif
}
// TODO(dmichael): Ideally we could get a way to check the number of vars in the