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

Unified Diff: media/blink/webaudiosourceprovider_impl.h

Issue 495353003: Move WebMediaPlayerImpl and its dependencies to media/blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/blink/video_frame_compositor_unittest.cc ('k') | media/blink/webaudiosourceprovider_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webaudiosourceprovider_impl.h
diff --git a/content/renderer/media/webaudiosourceprovider_impl.h b/media/blink/webaudiosourceprovider_impl.h
similarity index 76%
rename from content/renderer/media/webaudiosourceprovider_impl.h
rename to media/blink/webaudiosourceprovider_impl.h
index aca9d830021cb51a64b819d8573fc7cbfc297603..e686e9d617ae041f90412c0ec433e8dd4d2a8927 100644
--- a/content/renderer/media/webaudiosourceprovider_impl.h
+++ b/media/blink/webaudiosourceprovider_impl.h
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_RENDERER_MEDIA_WEBAUDIOSOURCEPROVIDER_IMPL_H_
-#define CONTENT_RENDERER_MEDIA_WEBAUDIOSOURCEPROVIDER_IMPL_H_
+#ifndef MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_
+#define MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
-#include "content/common/content_export.h"
#include "media/base/audio_renderer_sink.h"
+#include "media/base/media_export.h"
#include "third_party/WebKit/public/platform/WebAudioSourceProvider.h"
#include "third_party/WebKit/public/platform/WebVector.h"
@@ -17,10 +17,10 @@ namespace blink {
class WebAudioSourceProviderClient;
}
-namespace content {
+namespace media {
// WebAudioSourceProviderImpl provides a bridge between classes:
-// blink::WebAudioSourceProvider <---> media::AudioRendererSink
+// blink::WebAudioSourceProvider <---> AudioRendererSink
//
// WebAudioSourceProviderImpl wraps an existing audio sink that is used unless
// WebKit has set a client via setClient(). While a client is set WebKit will
@@ -28,25 +28,25 @@ namespace content {
// sample-frames using the sink's RenderCallback to get the data.
//
// All calls are protected by a lock.
-class CONTENT_EXPORT WebAudioSourceProviderImpl
+class MEDIA_EXPORT WebAudioSourceProviderImpl
: NON_EXPORTED_BASE(public blink::WebAudioSourceProvider),
- NON_EXPORTED_BASE(public media::AudioRendererSink) {
+ NON_EXPORTED_BASE(public AudioRendererSink) {
public:
explicit WebAudioSourceProviderImpl(
- const scoped_refptr<media::AudioRendererSink>& sink);
+ const scoped_refptr<AudioRendererSink>& sink);
// blink::WebAudioSourceProvider implementation.
virtual void setClient(blink::WebAudioSourceProviderClient* client);
virtual void provideInput(const blink::WebVector<float*>& audio_data,
size_t number_of_frames);
- // media::AudioRendererSink implementation.
+ // AudioRendererSink implementation.
virtual void Start() OVERRIDE;
virtual void Stop() OVERRIDE;
virtual void Play() OVERRIDE;
virtual void Pause() OVERRIDE;
virtual bool SetVolume(double volume) OVERRIDE;
- virtual void Initialize(const media::AudioParameters& params,
+ virtual void Initialize(const AudioParameters& params,
RenderCallback* renderer) OVERRIDE;
protected:
@@ -69,15 +69,15 @@ class CONTENT_EXPORT WebAudioSourceProviderImpl
PlaybackState state_;
// Where audio comes from.
- media::AudioRendererSink::RenderCallback* renderer_;
+ AudioRendererSink::RenderCallback* renderer_;
// When set via setClient() it overrides |sink_| for consuming audio.
blink::WebAudioSourceProviderClient* client_;
// Where audio ends up unless overridden by |client_|.
base::Lock sink_lock_;
- scoped_refptr<media::AudioRendererSink> sink_;
- scoped_ptr<media::AudioBus> bus_wrapper_;
+ scoped_refptr<AudioRendererSink> sink_;
+ scoped_ptr<AudioBus> bus_wrapper_;
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<WebAudioSourceProviderImpl> weak_factory_;
@@ -85,6 +85,6 @@ class CONTENT_EXPORT WebAudioSourceProviderImpl
DISALLOW_IMPLICIT_CONSTRUCTORS(WebAudioSourceProviderImpl);
};
-} // namespace content
+} // namespace media
-#endif // CONTENT_RENDERER_MEDIA_WEBAUDIOSOURCEPROVIDER_IMPL_H_
+#endif // MEDIA_BLINK_WEBAUDIOSOURCEPROVIDER_IMPL_H_
« no previous file with comments | « media/blink/video_frame_compositor_unittest.cc ('k') | media/blink/webaudiosourceprovider_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698