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

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

Issue 10835025: Plumb render view ID to media observer (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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // RenderAudioSourceProvider provides a bridge between classes: 5 // RenderAudioSourceProvider provides a bridge between classes:
6 // WebKit::WebAudioSourceProvider <---> media::AudioRendererSink 6 // WebKit::WebAudioSourceProvider <---> media::AudioRendererSink
7 // 7 //
8 // RenderAudioSourceProvider is a "sink" of audio, and uses a default 8 // RenderAudioSourceProvider is a "sink" of audio, and uses a default
9 // AudioDevice if a client has not explicitly been set. 9 // AudioDevice if a client has not explicitly been set.
10 // 10 //
(...skipping 11 matching lines...) Expand all
22 #ifndef CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_ 22 #ifndef CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_
23 #define CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_ 23 #define CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_
24 24
25 #include <vector> 25 #include <vector>
26 26
27 #include "base/synchronization/lock.h" 27 #include "base/synchronization/lock.h"
28 #include "media/base/audio_renderer_sink.h" 28 #include "media/base/audio_renderer_sink.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 29 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h"
31 31
32 namespace content {
33 class RenderView;
34 }
35
32 namespace WebKit { 36 namespace WebKit {
33 class WebAudioSourceProviderClient; 37 class WebAudioSourceProviderClient;
34 } 38 }
35 39
36 class RenderAudioSourceProvider 40 class RenderAudioSourceProvider
37 : public WebKit::WebAudioSourceProvider, 41 : public WebKit::WebAudioSourceProvider,
38 public media::AudioRendererSink { 42 public media::AudioRendererSink {
39 public: 43 public:
40 RenderAudioSourceProvider(); 44 RenderAudioSourceProvider(content::RenderView* render_view);
41 45
42 // WebKit::WebAudioSourceProvider implementation. 46 // WebKit::WebAudioSourceProvider implementation.
43 47
44 // WebKit calls setClient() if it desires to take control of the rendered 48 // WebKit calls setClient() if it desires to take control of the rendered
45 // audio stream. We call client's setFormat() when the audio stream format 49 // audio stream. We call client's setFormat() when the audio stream format
46 // is known. 50 // is known.
47 virtual void setClient(WebKit::WebAudioSourceProviderClient* client); 51 virtual void setClient(WebKit::WebAudioSourceProviderClient* client);
48 52
49 // If setClient() has been called, then WebKit calls provideInput() 53 // If setClient() has been called, then WebKit calls provideInput()
50 // periodically to get the rendered audio stream. 54 // periodically to get the rendered audio stream.
(...skipping 26 matching lines...) Expand all
77 // Protects access to sink_ 81 // Protects access to sink_
78 base::Lock sink_lock_; 82 base::Lock sink_lock_;
79 83
80 // default_sink_ is the default sink. 84 // default_sink_ is the default sink.
81 scoped_refptr<media::AudioRendererSink> default_sink_; 85 scoped_refptr<media::AudioRendererSink> default_sink_;
82 86
83 DISALLOW_COPY_AND_ASSIGN(RenderAudioSourceProvider); 87 DISALLOW_COPY_AND_ASSIGN(RenderAudioSourceProvider);
84 }; 88 };
85 89
86 #endif // CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_ 90 #endif // CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_impl.cc ('k') | content/renderer/media/render_audiosourceprovider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698