diff options
author | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 21:47:31 +0000 |
---|---|---|
committer | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-25 21:47:31 +0000 |
commit | 420ade41729ee2ef0369acf8e172ee79eb007842 (patch) | |
tree | 9db39fedb252e1ebfe872809b8d166bc11d5997a /ppapi/proxy/plugin_main_nacl.cc | |
parent | cb017d1edc4affc233a7e2c09f4920702e542ae6 (diff) | |
download | chromium_src-420ade41729ee2ef0369acf8e172ee79eb007842.zip chromium_src-420ade41729ee2ef0369acf8e172ee79eb007842.tar.gz chromium_src-420ade41729ee2ef0369acf8e172ee79eb007842.tar.bz2 |
Modify the PPB_Audio_Shared code for NaCl.
BUG=116317
TEST=none
This adds code for the NaCl untrusted build of the PPAPI proxy. The NaCl IRT can't
create threads that call back into user code, so the Audio thread must be created
using a special NaCl API.
Review URL: https://chromiumcodereview.appspot.com/10809079
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148423 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/plugin_main_nacl.cc')
-rw-r--r-- | ppapi/proxy/plugin_main_nacl.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ppapi/proxy/plugin_main_nacl.cc b/ppapi/proxy/plugin_main_nacl.cc index 9182731..96a6891 100644 --- a/ppapi/proxy/plugin_main_nacl.cc +++ b/ppapi/proxy/plugin_main_nacl.cc @@ -23,6 +23,7 @@ #include "ppapi/c/ppp_instance.h" #include "ppapi/proxy/plugin_dispatcher.h" #include "ppapi/proxy/plugin_globals.h" +#include "ppapi/shared_impl/ppb_audio_shared.h" #if defined(IPC_MESSAGE_LOG_ENABLED) #define IPC_MESSAGE_MACROS_LOG_ENABLED @@ -38,8 +39,6 @@ using ppapi::proxy::PluginGlobals; namespace { -struct PP_ThreadFunctions thread_funcs; - // Copied from src/content/ppapi_plugin/ppapi_thread. This is a minimal // implementation to get us started. class PluginDispatcherDelegate : public PluginDispatcher::PluginDelegate { @@ -101,8 +100,10 @@ class PluginDispatcherDelegate : public PluginDispatcher::PluginDelegate { } // namespace void PpapiPluginRegisterThreadCreator( - const struct PP_ThreadFunctions* new_funcs) { - thread_funcs = *new_funcs; + const struct PP_ThreadFunctions* thread_functions) { + // Initialize all classes that need to create threads that call back into + // user code. + ppapi::PPB_Audio_Shared::SetThreadFunctions(thread_functions); } int IrtInit() { |