Index: ppapi/shared_impl/ppb_audio_shared.h |
diff --git a/ppapi/shared_impl/ppb_audio_shared.h b/ppapi/shared_impl/ppb_audio_shared.h |
index c9fbd9cf4c2df62e235195e120cd6e4d3b32b53a..f507b25a70e2c2920896180111260def27e7ac80 100644 |
--- a/ppapi/shared_impl/ppb_audio_shared.h |
+++ b/ppapi/shared_impl/ppb_audio_shared.h |
@@ -15,9 +15,7 @@ |
#include "ppapi/shared_impl/resource.h" |
#include "ppapi/thunk/ppb_audio_api.h" |
-#if defined(OS_NACL) |
-#include "ppapi/nacl_irt/public/irt_ppapi.h" |
-#endif |
+struct PP_ThreadFunctions; |
namespace ppapi { |
@@ -85,11 +83,13 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared |
// was invoked properly. |
static bool IsThreadFunctionReady(); |
-#if defined(OS_NACL) |
+ // Sets the mode that this class is used for NaCl plugin. |
+ // If set, SetThreadFunctions() must be called before this class is used. |
+ static void SetNaClMode(); |
+ |
// NaCl has a special API for IRT code to create threads that can call back |
// into user code. |
static void SetThreadFunctions(const struct PP_ThreadFunctions* functions); |
-#endif |
private: |
// Starts execution of the audio thread. |
@@ -116,15 +116,12 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared |
// The size of the sample buffer in bytes. |
size_t shared_memory_size_; |
-#if !defined(OS_NACL) |
// When the callback is set, this thread is spawned for calling it. |
scoped_ptr<base::DelegateSimpleThread> audio_thread_; |
-#else |
uintptr_t thread_id_; |
bool thread_active_; |
bbudge
2014/04/21 20:20:29
Suggestion: rename these nacl_thread_id_ and nacl_
hidehiko
2014/04/21 22:59:47
Done.
|
static void CallRun(void* self); |
-#endif |
// Callback to call when audio is ready to accept new samples. |
AudioCallbackCombined callback_; |