| Index: content/renderer/pepper/pepper_platform_audio_input_impl.cc
|
| diff --git a/content/renderer/pepper/pepper_platform_audio_input_impl.cc b/content/renderer/pepper/pepper_platform_audio_input_impl.cc
|
| index 61b88048455f985da6188e30bcda32ac8f7f393e..1bc956b4999606eb4c06b69f0a693554095ab7ed 100644
|
| --- a/content/renderer/pepper/pepper_platform_audio_input_impl.cc
|
| +++ b/content/renderer/pepper/pepper_platform_audio_input_impl.cc
|
| @@ -18,13 +18,14 @@ namespace content {
|
|
|
| // static
|
| PepperPlatformAudioInputImpl* PepperPlatformAudioInputImpl::Create(
|
| + int render_view_id,
|
| const base::WeakPtr<PepperPluginDelegateImpl>& plugin_delegate,
|
| const std::string& device_id,
|
| int sample_rate,
|
| int frames_per_buffer,
|
| webkit::ppapi::PluginDelegate::PlatformAudioInputClient* client) {
|
| scoped_refptr<PepperPlatformAudioInputImpl> audio_input(
|
| - new PepperPlatformAudioInputImpl());
|
| + new PepperPlatformAudioInputImpl(render_view_id));
|
| if (audio_input->Initialize(plugin_delegate, device_id, sample_rate,
|
| frames_per_buffer, client)) {
|
| // Balanced by Release invoked in
|
| @@ -120,7 +121,7 @@ void PepperPlatformAudioInputImpl::OnDeviceReady(const std::string& device_id) {
|
| }
|
|
|
| void PepperPlatformAudioInputImpl::OnIPCClosed() {
|
| - ipc_ = NULL;
|
| + ipc_.reset();
|
| }
|
|
|
| PepperPlatformAudioInputImpl::~PepperPlatformAudioInputImpl() {
|
| @@ -135,12 +136,13 @@ PepperPlatformAudioInputImpl::~PepperPlatformAudioInputImpl() {
|
| DCHECK(shutdown_called_);
|
| }
|
|
|
| -PepperPlatformAudioInputImpl::PepperPlatformAudioInputImpl()
|
| +PepperPlatformAudioInputImpl::PepperPlatformAudioInputImpl(int render_view_id)
|
| : client_(NULL),
|
| stream_id_(0),
|
| main_message_loop_proxy_(base::MessageLoopProxy::current()),
|
| shutdown_called_(false) {
|
| - ipc_ = RenderThreadImpl::current()->audio_input_message_filter();
|
| + ipc_.reset(RenderThreadImpl::current()->audio_input_message_filter()->
|
| + CreateAudioInputIPC(render_view_id));
|
| }
|
|
|
| bool PepperPlatformAudioInputImpl::Initialize(
|
|
|