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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 AcceptLanguagesResolver_h 5 #include "content/renderer/media/mock_audio_device_factory.h"
6 #define AcceptLanguagesResolver_h
7 6
8 #include "platform/PlatformExport.h" 7 namespace content {
9 #include "wtf/text/WTFString.h"
10 8
11 #include <unicode/uscript.h> 9 MockCapturerSource::MockCapturerSource() {}
12 10
13 namespace blink { 11 MockCapturerSource::~MockCapturerSource() {}
14 12
15 class PLATFORM_EXPORT AcceptLanguagesResolver { 13 void MockCapturerSource::SetVolume(double volume) {}
16 public:
17 static UScriptCode preferredHanScript() { return m_preferredHanScript; }
18 static const char* preferredHanSkFontMgrLocale()
19 {
20 return m_preferredHanSkFontMgrLocale;
21 }
22 14
23 static void acceptLanguagesChanged(const String&); 15 MockAudioDeviceFactory::MockAudioDeviceFactory()
16 : AudioDeviceFactory(), mock_capturer_source_(new MockCapturerSource()),
17 did_create_once_(false) {}
24 18
25 static void updateFromAcceptLanguages(const String&); 19 MockAudioDeviceFactory::~MockAudioDeviceFactory() {}
26 20
27 private: 21 scoped_refptr<media::AudioCapturerSource>
28 static UScriptCode m_preferredHanScript; 22 MockAudioDeviceFactory::CreateAudioCapturerSource(int render_frame_id) {
29 static const char* m_preferredHanSkFontMgrLocale; 23 CHECK(!did_create_once_);
30 }; 24 did_create_once_ = true;
25 return scoped_refptr<media::AudioCapturerSource>(mock_capturer_source_);
26 }
31 27
32 } // namespace blink 28 } // namespace content
33
34 #endif // AcceptLanguagesResolver_h
OLDNEW
« 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