| 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 #include "ppapi/proxy/ppb_audio_proxy.h" | 5 #include "ppapi/proxy/ppb_audio_proxy.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/threading/simple_thread.h" | 8 #include "base/threading/simple_thread.h" |
| 9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/ppb_audio.h" | 10 #include "ppapi/c/ppb_audio.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 Audio(const HostResource& audio_id, | 37 Audio(const HostResource& audio_id, |
| 38 PP_Resource config_id, | 38 PP_Resource config_id, |
| 39 const AudioCallbackCombined& callback, | 39 const AudioCallbackCombined& callback, |
| 40 void* user_data); | 40 void* user_data); |
| 41 virtual ~Audio(); | 41 virtual ~Audio(); |
| 42 | 42 |
| 43 // Resource overrides. | 43 // Resource overrides. |
| 44 virtual PPB_Audio_API* AsPPB_Audio_API(); | 44 virtual PPB_Audio_API* AsPPB_Audio_API(); |
| 45 | 45 |
| 46 // PPB_Audio_API implementation. | 46 // PPB_Audio_API implementation. |
| 47 virtual PP_Resource GetCurrentConfig() OVERRIDE; | 47 virtual PP_Resource GetCurrentConfig() override; |
| 48 virtual PP_Bool StartPlayback() OVERRIDE; | 48 virtual PP_Bool StartPlayback() override; |
| 49 virtual PP_Bool StopPlayback() OVERRIDE; | 49 virtual PP_Bool StopPlayback() override; |
| 50 virtual int32_t Open( | 50 virtual int32_t Open( |
| 51 PP_Resource config_id, | 51 PP_Resource config_id, |
| 52 scoped_refptr<TrackedCallback> create_callback) OVERRIDE; | 52 scoped_refptr<TrackedCallback> create_callback) override; |
| 53 virtual int32_t GetSyncSocket(int* sync_socket) OVERRIDE; | 53 virtual int32_t GetSyncSocket(int* sync_socket) override; |
| 54 virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) OVERRIDE; | 54 virtual int32_t GetSharedMemory(int* shm_handle, uint32_t* shm_size) override; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 // Owning reference to the current config object. This isn't actually used, | 57 // Owning reference to the current config object. This isn't actually used, |
| 58 // we just dish it out as requested by the plugin. | 58 // we just dish it out as requested by the plugin. |
| 59 PP_Resource config_; | 59 PP_Resource config_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(Audio); | 61 DISALLOW_COPY_AND_ASSIGN(Audio); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 Audio::Audio(const HostResource& audio_id, | 64 Audio::Audio(const HostResource& audio_id, |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 static_cast<Audio*>(enter.object())->SetStreamInfo( | 329 static_cast<Audio*>(enter.object())->SetStreamInfo( |
| 330 enter.resource()->pp_instance(), handle.shmem(), handle.size(), | 330 enter.resource()->pp_instance(), handle.shmem(), handle.size(), |
| 331 IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor()), | 331 IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor()), |
| 332 config.object()->GetSampleRate(), | 332 config.object()->GetSampleRate(), |
| 333 config.object()->GetSampleFrameCount()); | 333 config.object()->GetSampleFrameCount()); |
| 334 } | 334 } |
| 335 } | 335 } |
| 336 | 336 |
| 337 } // namespace proxy | 337 } // namespace proxy |
| 338 } // namespace ppapi | 338 } // namespace ppapi |
| OLD | NEW |