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

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

Issue 10836025: Part 1: Plumb render view ID to render host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments 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 // AudioOutputDevice if a client has not explicitly been set. 9 // AudioOutputDevice if a client has not explicitly been set.
10 // 10 //
(...skipping 19 matching lines...) Expand all
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 WebKit { 32 namespace WebKit {
33 class WebAudioSourceProviderClient; 33 class WebAudioSourceProviderClient;
34 } 34 }
35 35
36 class RenderAudioSourceProvider 36 class RenderAudioSourceProvider
37 : public WebKit::WebAudioSourceProvider, 37 : public WebKit::WebAudioSourceProvider,
38 public media::AudioRendererSink { 38 public media::AudioRendererSink {
39 public: 39 public:
40 RenderAudioSourceProvider(); 40 RenderAudioSourceProvider(int render_view_id);
41 41
42 // WebKit::WebAudioSourceProvider implementation. 42 // WebKit::WebAudioSourceProvider implementation.
43 43
44 // WebKit calls setClient() if it desires to take control of the rendered 44 // 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 45 // audio stream. We call client's setFormat() when the audio stream format
46 // is known. 46 // is known.
47 virtual void setClient(WebKit::WebAudioSourceProviderClient* client); 47 virtual void setClient(WebKit::WebAudioSourceProviderClient* client);
48 48
49 // If setClient() has been called, then WebKit calls provideInput() 49 // If setClient() has been called, then WebKit calls provideInput()
50 // periodically to get the rendered audio stream. 50 // periodically to get the rendered audio stream.
(...skipping 26 matching lines...) Expand all
77 // Protects access to sink_ 77 // Protects access to sink_
78 base::Lock sink_lock_; 78 base::Lock sink_lock_;
79 79
80 // default_sink_ is the default sink. 80 // default_sink_ is the default sink.
81 scoped_refptr<media::AudioRendererSink> default_sink_; 81 scoped_refptr<media::AudioRendererSink> default_sink_;
82 82
83 DISALLOW_COPY_AND_ASSIGN(RenderAudioSourceProvider); 83 DISALLOW_COPY_AND_ASSIGN(RenderAudioSourceProvider);
84 }; 84 };
85 85
86 #endif // CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_ 86 #endif // CONTENT_RENDERER_MEDIA_RENDER_AUDIOSOURCEPROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698