OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 |
| 6 #include "content/renderer/media/audio_output_ipc.h" |
| 7 |
| 8 #include "content/common/media/audio_messages.h" |
| 9 #include "content/renderer/media/audio_message_filter.h" |
| 10 |
| 11 AudioOutputIPC::AudioOutputIPC(int render_view_id) |
| 12 : render_view_id_(render_view_id) { |
| 13 } |
| 14 |
| 15 AudioOutputIPC::~AudioOutputIPC() { |
| 16 } |
| 17 |
| 18 int AudioOutputIPC::AddDelegate(media::AudioOutputIPCDelegate* delegate) { |
| 19 return AudioMessageFilter::Get()->AddDelegate(delegate); |
| 20 } |
| 21 |
| 22 void AudioOutputIPC::RemoveDelegate(int id) { |
| 23 AudioMessageFilter::Get()->RemoveDelegate(id); |
| 24 } |
| 25 |
| 26 void AudioOutputIPC::CreateStream(int stream_id, |
| 27 const media::AudioParameters& params) { |
| 28 Send(new AudioHostMsg_CreateStream(render_view_id_, stream_id, params)); |
| 29 } |
| 30 |
| 31 void AudioOutputIPC::PlayStream(int stream_id) { |
| 32 Send(new AudioHostMsg_PlayStream(render_view_id_, stream_id)); |
| 33 } |
| 34 |
| 35 void AudioOutputIPC::PauseStream(int stream_id) { |
| 36 Send(new AudioHostMsg_PauseStream(render_view_id_, stream_id)); |
| 37 } |
| 38 |
| 39 void AudioOutputIPC::FlushStream(int stream_id) { |
| 40 Send(new AudioHostMsg_FlushStream(render_view_id_, stream_id)); |
| 41 } |
| 42 |
| 43 void AudioOutputIPC::CloseStream(int stream_id) { |
| 44 Send(new AudioHostMsg_CloseStream(render_view_id_, stream_id)); |
| 45 } |
| 46 |
| 47 void AudioOutputIPC::SetVolume(int stream_id, double volume) { |
| 48 Send(new AudioHostMsg_SetVolume(render_view_id_, stream_id, volume)); |
| 49 } |
| 50 |
| 51 bool AudioOutputIPC::Send(IPC::Message* message) { |
| 52 return AudioMessageFilter::Get()->Send(message); |
| 53 } |
OLD | NEW |