| Index: ppapi/shared_impl/ppb_audio_input_shared.cc
|
| diff --git a/ppapi/shared_impl/audio_input_impl.cc b/ppapi/shared_impl/ppb_audio_input_shared.cc
|
| similarity index 81%
|
| rename from ppapi/shared_impl/audio_input_impl.cc
|
| rename to ppapi/shared_impl/ppb_audio_input_shared.cc
|
| index 659cd47cd26e51ccd28736332845a84103a43b33..ae5b37ea5d79551d193a08852eb09cc5d5ee5f97 100644
|
| --- a/ppapi/shared_impl/audio_input_impl.cc
|
| +++ b/ppapi/shared_impl/ppb_audio_input_shared.cc
|
| @@ -2,20 +2,20 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ppapi/shared_impl/audio_input_impl.h"
|
| +#include "ppapi/shared_impl/ppb_audio_input_shared.h"
|
|
|
| #include "base/logging.h"
|
|
|
| namespace ppapi {
|
|
|
| -AudioInputImpl::AudioInputImpl()
|
| +PPB_AudioInput_Shared::PPB_AudioInput_Shared()
|
| : capturing_(false),
|
| shared_memory_size_(0),
|
| callback_(NULL),
|
| user_data_(NULL) {
|
| }
|
|
|
| -AudioInputImpl::~AudioInputImpl() {
|
| +PPB_AudioInput_Shared::~PPB_AudioInput_Shared() {
|
| // Closing the socket causes the thread to exit - wait for it.
|
| if (socket_.get())
|
| socket_->Close();
|
| @@ -25,13 +25,13 @@ AudioInputImpl::~AudioInputImpl() {
|
| }
|
| }
|
|
|
| -void AudioInputImpl::SetCallback(PPB_AudioInput_Callback callback,
|
| - void* user_data) {
|
| +void PPB_AudioInput_Shared::SetCallback(PPB_AudioInput_Callback callback,
|
| + void* user_data) {
|
| callback_ = callback;
|
| user_data_ = user_data;
|
| }
|
|
|
| -void AudioInputImpl::SetStartCaptureState() {
|
| +void PPB_AudioInput_Shared::SetStartCaptureState() {
|
| DCHECK(!capturing_);
|
| DCHECK(!audio_input_thread_.get());
|
|
|
| @@ -45,7 +45,7 @@ void AudioInputImpl::SetStartCaptureState() {
|
| capturing_ = true;
|
| }
|
|
|
| -void AudioInputImpl::SetStopCaptureState() {
|
| +void PPB_AudioInput_Shared::SetStopCaptureState() {
|
| DCHECK(capturing_);
|
|
|
| if (audio_input_thread_.get()) {
|
| @@ -55,7 +55,7 @@ void AudioInputImpl::SetStopCaptureState() {
|
| capturing_ = false;
|
| }
|
|
|
| -void AudioInputImpl::SetStreamInfo(
|
| +void PPB_AudioInput_Shared::SetStreamInfo(
|
| base::SharedMemoryHandle shared_memory_handle,
|
| size_t shared_memory_size,
|
| base::SyncSocket::Handle socket_handle) {
|
| @@ -72,7 +72,7 @@ void AudioInputImpl::SetStreamInfo(
|
| }
|
| }
|
|
|
| -void AudioInputImpl::StartThread() {
|
| +void PPB_AudioInput_Shared::StartThread() {
|
| DCHECK(callback_);
|
| DCHECK(!audio_input_thread_.get());
|
| audio_input_thread_.reset(new base::DelegateSimpleThread(
|
| @@ -80,7 +80,7 @@ void AudioInputImpl::StartThread() {
|
| audio_input_thread_->Start();
|
| }
|
|
|
| -void AudioInputImpl::Run() {
|
| +void PPB_AudioInput_Shared::Run() {
|
| int pending_data;
|
| void* buffer = shared_memory_->memory();
|
|
|
|
|