Chromium Code Reviews| Index: content/renderer/media/audio_output_ipc_impl.cc |
| diff --git a/content/renderer/media/audio_output_ipc_impl.cc b/content/renderer/media/audio_output_ipc_impl.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..954f92b8757f057261752814047cdbae5f7a0b00 |
| --- /dev/null |
| +++ b/content/renderer/media/audio_output_ipc_impl.cc |
| @@ -0,0 +1,54 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +// |
|
scherkus (not reviewing)
2012/08/03 21:12:52
remove extra //
|
| + |
| +#include "content/renderer/media/audio_output_ipc_impl.h" |
| + |
| +#include "content/common/media/audio_messages.h" |
| +#include "content/renderer/media/audio_message_filter.h" |
| + |
| +AudioOutputIPCImpl::AudioOutputIPCImpl(int render_view_id) |
| + : render_view_id_(render_view_id) { |
| +} |
| + |
| +AudioOutputIPCImpl::~AudioOutputIPCImpl() { |
| +} |
| + |
| +int AudioOutputIPCImpl::AddDelegate( |
| + media::AudioOutputIPCDelegate* delegate) { |
| + return AudioMessageFilter::Get()->AddDelegate(delegate); |
| +} |
| + |
| +void AudioOutputIPCImpl::RemoveDelegate(int id) { |
| + AudioMessageFilter::Get()->RemoveDelegate(id); |
| +} |
| + |
| +void AudioOutputIPCImpl::CreateStream(int stream_id, |
| + const media::AudioParameters& params) { |
| + Send(new AudioHostMsg_CreateStream(render_view_id_, stream_id, params)); |
| +} |
| + |
| +void AudioOutputIPCImpl::PlayStream(int stream_id) { |
| + Send(new AudioHostMsg_PlayStream(stream_id)); |
| +} |
| + |
| +void AudioOutputIPCImpl::PauseStream(int stream_id) { |
| + Send(new AudioHostMsg_PauseStream(stream_id)); |
| +} |
| + |
| +void AudioOutputIPCImpl::FlushStream(int stream_id) { |
| + Send(new AudioHostMsg_FlushStream(stream_id)); |
| +} |
| + |
| +void AudioOutputIPCImpl::CloseStream(int stream_id) { |
| + Send(new AudioHostMsg_CloseStream(stream_id)); |
| +} |
| + |
| +void AudioOutputIPCImpl::SetVolume(int stream_id, double volume) { |
| + Send(new AudioHostMsg_SetVolume(stream_id, volume)); |
| +} |
| + |
| +bool AudioOutputIPCImpl::Send(IPC::Message* message) { |
| + return AudioMessageFilter::Get()->Send(message); |
| +} |