Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: content/renderer/media/audio_output_ipc.cc

Issue 10836025: Part 1: Plumb render view ID to render host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698