| 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 "content/renderer/pepper/ppb_audio_impl.h" | 5 #include "content/renderer/pepper/ppb_audio_impl.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/renderer/pepper/pepper_platform_audio_output.h" | 8 #include "content/renderer/pepper/pepper_platform_audio_output.h" |
| 9 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" | 9 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" |
| 10 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" | 10 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // once and only once. | 134 // once and only once. |
| 135 SetCreateCallback(create_callback); | 135 SetCreateCallback(create_callback); |
| 136 | 136 |
| 137 return PP_OK_COMPLETIONPENDING; | 137 return PP_OK_COMPLETIONPENDING; |
| 138 } | 138 } |
| 139 | 139 |
| 140 int32_t PPB_Audio_Impl::GetSyncSocket(int* sync_socket) { | 140 int32_t PPB_Audio_Impl::GetSyncSocket(int* sync_socket) { |
| 141 return GetSyncSocketImpl(sync_socket); | 141 return GetSyncSocketImpl(sync_socket); |
| 142 } | 142 } |
| 143 | 143 |
| 144 int32_t PPB_Audio_Impl::GetSharedMemory(int* shm_handle, uint32_t* shm_size) { | 144 int32_t PPB_Audio_Impl::GetSharedMemory(base::SharedMemoryHandle* shm_handle, |
| 145 uint32_t* shm_size) { |
| 145 return GetSharedMemoryImpl(shm_handle, shm_size); | 146 return GetSharedMemoryImpl(shm_handle, shm_size); |
| 146 } | 147 } |
| 147 | 148 |
| 148 void PPB_Audio_Impl::OnSetStreamInfo( | 149 void PPB_Audio_Impl::OnSetStreamInfo( |
| 149 base::SharedMemoryHandle shared_memory_handle, | 150 base::SharedMemoryHandle shared_memory_handle, |
| 150 size_t shared_memory_size, | 151 size_t shared_memory_size, |
| 151 base::SyncSocket::Handle socket_handle) { | 152 base::SyncSocket::Handle socket_handle) { |
| 152 EnterResourceNoLock<PPB_AudioConfig_API> enter(config_, true); | 153 EnterResourceNoLock<PPB_AudioConfig_API> enter(config_, true); |
| 153 SetStreamInfo(pp_instance(), | 154 SetStreamInfo(pp_instance(), |
| 154 shared_memory_handle, | 155 shared_memory_handle, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 170 | 171 |
| 171 void PPB_Audio_Impl::StartDeferredPlayback() { | 172 void PPB_Audio_Impl::StartDeferredPlayback() { |
| 172 DCHECK(playback_throttled_); | 173 DCHECK(playback_throttled_); |
| 173 playback_throttled_ = false; | 174 playback_throttled_ = false; |
| 174 | 175 |
| 175 SetStartPlaybackState(); | 176 SetStartPlaybackState(); |
| 176 audio_->StartPlayback(); | 177 audio_->StartPlayback(); |
| 177 } | 178 } |
| 178 | 179 |
| 179 } // namespace content | 180 } // namespace content |
| OLD | NEW |