OLD | NEW |
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 | |
OLD | NEW |