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

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

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 // MessageFilter that handles audio messages and delegates them to audio
6 // renderers. Created on render thread, AudioMessageFilter is operated on
7 // IO thread (secondary thread of render process) it intercepts audio messages
8 // and process them on IO thread since these messages are time critical.
9
10 #ifndef CONTENT_RENDERER_MEDIA_AUDIO_OUTPUT_IPC_H_
11 #define CONTENT_RENDERER_MEDIA_AUDIO_OUTPUT_IPC_H_
12
13 #include "base/gtest_prod_util.h"
14 #include "base/id_map.h"
15 #include "base/shared_memory.h"
16 #include "base/sync_socket.h"
17 #include "content/common/content_export.h"
18 #include "ipc/ipc_channel_proxy.h"
19 #include "media/audio/audio_buffers_state.h"
20 #include "media/audio/audio_output_ipc.h"
21
22 class AudioMessageFilter;
23
24 class CONTENT_EXPORT AudioOutputIPC
tommi (sloooow) - chröme 2012/07/31 10:52:41 I don't think it's a good idea to call this class
sail 2012/07/31 22:02:08 Done.
25 : public NON_EXPORTED_BASE(media::AudioOutputIPC) {
26 public:
27 explicit AudioOutputIPC(int render_view_id);
28 virtual ~AudioOutputIPC();
29
30 // media::AudioOutputIPC implementation.
31 virtual int AddDelegate(media::AudioOutputIPCDelegate* delegate) OVERRIDE;
32 virtual void RemoveDelegate(int id) OVERRIDE;
33 virtual void CreateStream(int stream_id,
34 const media::AudioParameters& params) OVERRIDE;
35 virtual void PlayStream(int stream_id) OVERRIDE;
36 virtual void PauseStream(int stream_id) OVERRIDE;
37 virtual void FlushStream(int stream_id) OVERRIDE;
38 virtual void CloseStream(int stream_id) OVERRIDE;
39 virtual void SetVolume(int stream_id, double volume) OVERRIDE;
40
41 private:
42
43 // Sends an IPC message using |filter_|.
44 bool Send(IPC::Message* message);
45
46 // Cached audio message filter (lives on the main render thread).
47 scoped_refptr<AudioMessageFilter> filter_;
48
49 // A map of stream ids to delegates.
50 IDMap<media::AudioOutputIPCDelegate> delegates_;
51
52 const int render_view_id_;
53
54 DISALLOW_COPY_AND_ASSIGN(AudioOutputIPC);
55 };
56
57 #endif // CONTENT_RENDERER_MEDIA_AUDIO_OUTPUT_IPC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698