diff options
author | hidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-21 10:36:21 +0000 |
---|---|---|
committer | hidehiko@chromium.org <hidehiko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-21 10:36:21 +0000 |
commit | a4a01e47a657b2a74fa6f2748006efcb01f63523 (patch) | |
tree | df08272594c974115fdadf892e12f445ec527a0d /ppapi/shared_impl/ppb_audio_shared.h | |
parent | ad6d13372a73c90fc24059b22b2fa0ea927f2151 (diff) | |
download | chromium_src-a4a01e47a657b2a74fa6f2748006efcb01f63523.zip chromium_src-a4a01e47a657b2a74fa6f2748006efcb01f63523.tar.gz chromium_src-a4a01e47a657b2a74fa6f2748006efcb01f63523.tar.bz2 |
Add test to make sure if PPB_Audio_Shared::StartThread() works.
To NaCl in either SFI or non-SFI mode, PPB_Audio_Shraed::StartThread requires
ppapi_register_thread_creator invoked in advance.
Currently no test about it. This CL adds the test.
Tests are guarded by #ifdef __native_client__, because it
won't work and is meaningless for trusted plugins.
TEST=Ran browser_tests --gtest_filter=*AudioThreadCreation locally, and ran trybots.
BUG=359710
Review URL: https://codereview.chromium.org/240523002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264974 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/ppb_audio_shared.h')
-rw-r--r-- | ppapi/shared_impl/ppb_audio_shared.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ppapi/shared_impl/ppb_audio_shared.h b/ppapi/shared_impl/ppb_audio_shared.h index 6ba8cac..c9fbd9c 100644 --- a/ppapi/shared_impl/ppb_audio_shared.h +++ b/ppapi/shared_impl/ppb_audio_shared.h @@ -79,6 +79,12 @@ class PPAPI_SHARED_EXPORT PPB_Audio_Shared PP_AudioSampleRate sample_rate, int sample_frame_count); + // Returns whether a thread can be created on the client context. + // In trusted plugin, this should always return true, as it uses Chrome's + // thread library. In NaCl plugin, this returns whether SetThreadFunctions + // was invoked properly. + static bool IsThreadFunctionReady(); + #if defined(OS_NACL) // NaCl has a special API for IRT code to create threads that can call back // into user code. |