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

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

Issue 9805001: Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix various compiler errors Created 8 years, 9 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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "content/renderer/media/audio_device.h" 11 #include "content/renderer/media/audio_device.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebAudioDevi ce.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebAudioDevi ce.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
14 14
15 namespace media {
15 class AudioParameters; 16 class AudioParameters;
17 }
16 18
17 class RendererWebAudioDeviceImpl : public WebKit::WebAudioDevice, 19 class RendererWebAudioDeviceImpl : public WebKit::WebAudioDevice,
scherkus (not reviewing) 2012/03/21 08:50:27 nit: want to fix this to be initializer list style
vrk (LEFT CHROMIUM) 2012/03/21 20:17:48 Done.
18 public AudioDevice::RenderCallback { 20 public AudioDevice::RenderCallback {
19 public: 21 public:
20 RendererWebAudioDeviceImpl(const AudioParameters& params, 22 RendererWebAudioDeviceImpl(const media::AudioParameters& params,
21 WebKit::WebAudioDevice::RenderCallback* callback); 23 WebKit::WebAudioDevice::RenderCallback* callback);
22 virtual ~RendererWebAudioDeviceImpl(); 24 virtual ~RendererWebAudioDeviceImpl();
23 25
24 // WebKit::WebAudioDevice implementation. 26 // WebKit::WebAudioDevice implementation.
25 virtual void start(); 27 virtual void start();
26 virtual void stop(); 28 virtual void stop();
27 virtual double sampleRate(); 29 virtual double sampleRate();
28 30
29 // AudioDevice::RenderCallback implementation. 31 // AudioDevice::RenderCallback implementation.
30 virtual size_t Render(const std::vector<float*>& audio_data, 32 virtual size_t Render(const std::vector<float*>& audio_data,
31 size_t number_of_frames, 33 size_t number_of_frames,
32 size_t audio_delay_milliseconds) OVERRIDE; 34 size_t audio_delay_milliseconds) OVERRIDE;
33 virtual void OnRenderError() OVERRIDE; 35 virtual void OnRenderError() OVERRIDE;
34 36
35 private: 37 private:
36 scoped_refptr<AudioDevice> audio_device_; 38 scoped_refptr<AudioDevice> audio_device_;
37 bool is_running_; 39 bool is_running_;
38 40
39 // Weak reference to the callback into WebKit code. 41 // Weak reference to the callback into WebKit code.
40 WebKit::WebAudioDevice::RenderCallback* client_callback_; 42 WebKit::WebAudioDevice::RenderCallback* client_callback_;
41 43
42 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl); 44 DISALLOW_COPY_AND_ASSIGN(RendererWebAudioDeviceImpl);
43 }; 45 };
44 46
45 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_ 47 #endif // CONTENT_RENDERER_MEDIA_MEDIA_RENDERER_WEBAUDIODEVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698