| OLD | NEW |
| 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 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 if (input_device_id.isNull() || | 736 if (input_device_id.isNull() || |
| 737 !base::StringToInt(base::UTF16ToUTF8(input_device_id), &session_id)) { | 737 !base::StringToInt(base::UTF16ToUTF8(input_device_id), &session_id)) { |
| 738 if (input_channels > 0) | 738 if (input_channels > 0) |
| 739 DLOG(WARNING) << "createAudioDevice(): request for audio input ignored"; | 739 DLOG(WARNING) << "createAudioDevice(): request for audio input ignored"; |
| 740 | 740 |
| 741 input_channels = 0; | 741 input_channels = 0; |
| 742 } | 742 } |
| 743 | 743 |
| 744 media::AudioParameters params( | 744 media::AudioParameters params( |
| 745 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, | 745 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, |
| 746 layout, input_channels, | 746 layout, static_cast<int>(sample_rate), 16, buffer_size, |
| 747 static_cast<int>(sample_rate), 16, buffer_size, | |
| 748 media::AudioParameters::NO_EFFECTS); | 747 media::AudioParameters::NO_EFFECTS); |
| 749 | 748 |
| 750 return new RendererWebAudioDeviceImpl(params, callback, session_id); | 749 return new RendererWebAudioDeviceImpl(params, callback, session_id); |
| 751 } | 750 } |
| 752 | 751 |
| 753 #if defined(OS_ANDROID) | 752 #if defined(OS_ANDROID) |
| 754 bool RendererWebKitPlatformSupportImpl::loadAudioResource( | 753 bool RendererWebKitPlatformSupportImpl::loadAudioResource( |
| 755 blink::WebAudioBus* destination_bus, const char* audio_file_data, | 754 blink::WebAudioBus* destination_bus, const char* audio_file_data, |
| 756 size_t data_size) { | 755 size_t data_size) { |
| 757 return DecodeAudioFileData(destination_bus, | 756 return DecodeAudioFileData(destination_bus, |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 | 1199 |
| 1201 //------------------------------------------------------------------------------ | 1200 //------------------------------------------------------------------------------ |
| 1202 | 1201 |
| 1203 // static | 1202 // static |
| 1204 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( | 1203 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( |
| 1205 const blink::WebBatteryStatus& status) { | 1204 const blink::WebBatteryStatus& status) { |
| 1206 g_test_battery_status_dispatcher.Get().PostBatteryStatusChange(status); | 1205 g_test_battery_status_dispatcher.Get().PostBatteryStatusChange(status); |
| 1207 } | 1206 } |
| 1208 | 1207 |
| 1209 } // namespace content | 1208 } // namespace content |
| OLD | NEW |