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

Unified Diff: content/renderer/media/mock_audio_device_factory.cc

Issue 1834323002: MediaStream audio: Refactor 3 separate "glue" implementations into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE + Workaround to ensure MediaStreamAudioProcessor is destroyed on the main thread. Created 4 years, 7 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
Index: content/renderer/media/mock_audio_device_factory.cc
diff --git a/third_party/WebKit/Source/platform/fonts/AcceptLanguagesResolver.h b/content/renderer/media/mock_audio_device_factory.cc
similarity index 25%
copy from third_party/WebKit/Source/platform/fonts/AcceptLanguagesResolver.h
copy to content/renderer/media/mock_audio_device_factory.cc
index c643d5ed04b26e954d8203a8c3b3fd73889bae35..80303c50f629fa60183e4c3a556d7a2e72f12331 100644
--- a/third_party/WebKit/Source/platform/fonts/AcceptLanguagesResolver.h
+++ b/content/renderer/media/mock_audio_device_factory.cc
@@ -2,33 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef AcceptLanguagesResolver_h
-#define AcceptLanguagesResolver_h
+#include "content/renderer/media/mock_audio_device_factory.h"
-#include "platform/PlatformExport.h"
-#include "wtf/text/WTFString.h"
+namespace content {
-#include <unicode/uscript.h>
+MockCapturerSource::MockCapturerSource() {}
-namespace blink {
+MockCapturerSource::~MockCapturerSource() {}
-class PLATFORM_EXPORT AcceptLanguagesResolver {
-public:
- static UScriptCode preferredHanScript() { return m_preferredHanScript; }
- static const char* preferredHanSkFontMgrLocale()
- {
- return m_preferredHanSkFontMgrLocale;
- }
+void MockCapturerSource::SetVolume(double volume) {}
- static void acceptLanguagesChanged(const String&);
+MockAudioDeviceFactory::MockAudioDeviceFactory()
+ : AudioDeviceFactory(), mock_capturer_source_(new MockCapturerSource()),
+ did_create_once_(false) {}
- static void updateFromAcceptLanguages(const String&);
+MockAudioDeviceFactory::~MockAudioDeviceFactory() {}
-private:
- static UScriptCode m_preferredHanScript;
- static const char* m_preferredHanSkFontMgrLocale;
-};
+scoped_refptr<media::AudioCapturerSource>
+MockAudioDeviceFactory::CreateAudioCapturerSource(int render_frame_id) {
+ CHECK(!did_create_once_);
+ did_create_once_ = true;
+ return scoped_refptr<media::AudioCapturerSource>(mock_capturer_source_);
+}
-} // namespace blink
-
-#endif // AcceptLanguagesResolver_h
+} // namespace content
« no previous file with comments | « content/renderer/media/mock_audio_device_factory.h ('k') | content/renderer/media/mock_media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698