OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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 #ifndef CONTENT_RENDERER_RENDERER_WEBAUDIOSOURCEPROVIDER_IMPL_H_ | |
6 #define CONTENT_RENDERER_RENDERER_WEBAUDIOSOURCEPROVIDER_IMPL_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/memory/ref_counted.h" | |
11 #include "content/renderer/media/audio_device.h" | |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide r.h" | |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" | |
14 | |
15 class RendererWebAudioSourceProviderImpl : public WebKit::WebAudioSourceProvider , | |
scherkus (not reviewing)
2011/08/23 15:16:01
naming nit... similar to how WebViewClient -> Rend
scherkus (not reviewing)
2011/08/23 15:16:01
docs for this class
Chris Rogers
2011/08/24 00:41:52
Ok, sounds good. I've renamed this class to Rende
Chris Rogers
2011/08/24 00:41:52
I've added some comments here. I can add more det
| |
16 public AudioSink { | |
17 public: | |
18 RendererWebAudioSourceProviderImpl(AudioSink::RenderCallback* callback); | |
19 virtual ~RendererWebAudioSourceProviderImpl() { } | |
20 | |
21 // WebKit::WebAudioSourceProvider implementation. | |
22 // WebKit calls this to get the rendered audio stream. | |
23 virtual void provideInput(const WebKit::WebVector<float*>& audio_data, | |
24 size_t number_of_frames); | |
25 | |
26 // AudioSink implementation. | |
27 virtual bool Start(); | |
28 virtual bool Stop(); | |
29 virtual bool SetVolume(double volume); | |
30 | |
31 private: | |
32 bool is_running_; | |
33 double volume_; | |
34 AudioSink::RenderCallback* callback_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioSourceProviderImpl); | |
37 }; | |
38 | |
39 #endif // CONTENT_RENDERER_RENDERER_WEBAUDIOSOURCEPROVIDER_IMPL_H_ | |
OLD | NEW |