| OLD | NEW |
| 1 // Copyright (c) 2011 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 WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| 11 #include "base/sync_socket.h" | 11 #include "base/sync_socket.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 PPB_Audio_Callback user_callback, | 50 PPB_Audio_Callback user_callback, |
| 51 void* user_data); | 51 void* user_data); |
| 52 | 52 |
| 53 // Resource overrides. | 53 // Resource overrides. |
| 54 virtual ::ppapi::thunk::PPB_Audio_API* AsPPB_Audio_API(); | 54 virtual ::ppapi::thunk::PPB_Audio_API* AsPPB_Audio_API(); |
| 55 | 55 |
| 56 // PPB_Audio_API implementation. | 56 // PPB_Audio_API implementation. |
| 57 virtual PP_Resource GetCurrentConfig() OVERRIDE; | 57 virtual PP_Resource GetCurrentConfig() OVERRIDE; |
| 58 virtual PP_Bool StartPlayback() OVERRIDE; | 58 virtual PP_Bool StartPlayback() OVERRIDE; |
| 59 virtual PP_Bool StopPlayback() OVERRIDE; | 59 virtual PP_Bool StopPlayback() OVERRIDE; |
| 60 virtual int32_t OpenTrusted(PP_Resource config_id, | 60 virtual int32_t OpenTrusted( |
| 61 PP_CompletionCallback create_callback) OVERRIDE; | 61 PP_Resource config_id, |
| 62 scoped_refptr< ::ppapi::TrackedCallback> create_callback) OVERRIDE; |
| 62 virtual int32_t GetSyncSocket(int* sync_socket) OVERRIDE; | 63 virtual int32_t GetSyncSocket(int* sync_socket) OVERRIDE; |
| 63 virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) OVERRIDE; | 64 virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) OVERRIDE; |
| 64 | 65 |
| 65 private: | 66 private: |
| 66 // AudioHelper implementation. | 67 // AudioHelper implementation. |
| 67 virtual void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle, | 68 virtual void OnSetStreamInfo(base::SharedMemoryHandle shared_memory_handle, |
| 68 size_t shared_memory_size_, | 69 size_t shared_memory_size_, |
| 69 base::SyncSocket::Handle socket); | 70 base::SyncSocket::Handle socket); |
| 70 | 71 |
| 71 // AudioConfig used for creating this Audio object. We own a ref. | 72 // AudioConfig used for creating this Audio object. We own a ref. |
| 72 ::ppapi::ScopedPPResource config_; | 73 ::ppapi::ScopedPPResource config_; |
| 73 | 74 |
| 74 // PluginDelegate audio object that we delegate audio IPC through. We don't | 75 // PluginDelegate audio object that we delegate audio IPC through. We don't |
| 75 // own this pointer but are responsible for calling Shutdown on it. | 76 // own this pointer but are responsible for calling Shutdown on it. |
| 76 PluginDelegate::PlatformAudioOutput* audio_; | 77 PluginDelegate::PlatformAudioOutput* audio_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); | 79 DISALLOW_COPY_AND_ASSIGN(PPB_Audio_Impl); |
| 79 }; | 80 }; |
| 80 | 81 |
| 81 } // namespace ppapi | 82 } // namespace ppapi |
| 82 } // namespace webkit | 83 } // namespace webkit |
| 83 | 84 |
| 84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ | 85 #endif // WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_IMPL_H_ |
| OLD | NEW |