| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ | 5 #ifndef PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ |
| 6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ | 6 #define PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
| 10 #include "base/sync_socket.h" | 10 #include "base/sync_socket.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void SetStreamInfo(PP_Instance instance, | 53 void SetStreamInfo(PP_Instance instance, |
| 54 base::SharedMemoryHandle shared_memory_handle, | 54 base::SharedMemoryHandle shared_memory_handle, |
| 55 size_t shared_memory_size, | 55 size_t shared_memory_size, |
| 56 base::SyncSocket::Handle socket_handle); | 56 base::SyncSocket::Handle socket_handle); |
| 57 | 57 |
| 58 #if defined(OS_NACL) | 58 #if defined(OS_NACL) |
| 59 // NaCl has a special API for IRT code to create threads that can call back | 59 // NaCl has a special API for IRT code to create threads that can call back |
| 60 // into user code. | 60 // into user code. |
| 61 static void SetThreadFunctions(const struct PP_ThreadFunctions* functions); | 61 static void SetThreadFunctions(const struct PP_ThreadFunctions* functions); |
| 62 #endif | 62 #endif |
| 63 |
| 63 private: | 64 private: |
| 64 // Starts execution of the audio thread. | 65 // Starts execution of the audio thread. |
| 65 void StartThread(); | 66 void StartThread(); |
| 66 | 67 |
| 67 // Stop execution of the audio thread. | 68 // Stop execution of the audio thread. |
| 68 void StopThread(); | 69 void StopThread(); |
| 69 | 70 |
| 70 // DelegateSimpleThread::Delegate implementation. Run on the audio thread. | 71 // DelegateSimpleThread::Delegate implementation. Run on the audio thread. |
| 71 virtual void Run(); | 72 virtual void Run(); |
| 72 | 73 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 100 | 101 |
| 101 // User data pointer passed verbatim to the callback function. | 102 // User data pointer passed verbatim to the callback function. |
| 102 void* user_data_; | 103 void* user_data_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared); | 105 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Shared); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace ppapi | 108 } // namespace ppapi |
| 108 | 109 |
| 109 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ | 110 #endif // PPAPI_SHARED_IMPL_PPB_AUDIO_SHARED_H_ |
| OLD | NEW |