Chromium Code Reviews| Index: content/renderer/renderer_webaudiosourceprovider_impl.h |
| =================================================================== |
| --- content/renderer/renderer_webaudiosourceprovider_impl.h (revision 0) |
| +++ content/renderer/renderer_webaudiosourceprovider_impl.h (revision 0) |
| @@ -0,0 +1,39 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_RENDERER_WEBAUDIOSOURCEPROVIDER_IMPL_H_ |
| +#define CONTENT_RENDERER_RENDERER_WEBAUDIOSOURCEPROVIDER_IMPL_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "content/renderer/media/audio_device.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvider.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" |
| + |
| +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
|
| + public AudioSink { |
| + public: |
| + RendererWebAudioSourceProviderImpl(AudioSink::RenderCallback* callback); |
| + virtual ~RendererWebAudioSourceProviderImpl() { } |
| + |
| + // WebKit::WebAudioSourceProvider implementation. |
| + // WebKit calls this to get the rendered audio stream. |
| + virtual void provideInput(const WebKit::WebVector<float*>& audio_data, |
| + size_t number_of_frames); |
| + |
| + // AudioSink implementation. |
| + virtual bool Start(); |
| + virtual bool Stop(); |
| + virtual bool SetVolume(double volume); |
| + |
| + private: |
| + bool is_running_; |
| + double volume_; |
| + AudioSink::RenderCallback* callback_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(RendererWebAudioSourceProviderImpl); |
| +}; |
| + |
| +#endif // CONTENT_RENDERER_RENDERER_WEBAUDIOSOURCEPROVIDER_IMPL_H_ |