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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 #include "base/synchronization/lock.h" | 77 #include "base/synchronization/lock.h" |
78 #include "content/common/child_process_sandbox_support_impl_linux.h" | 78 #include "content/common/child_process_sandbox_support_impl_linux.h" |
79 #include "third_party/WebKit/public/platform/linux/WebFontFamily.h" | 79 #include "third_party/WebKit/public/platform/linux/WebFontFamily.h" |
80 #include "third_party/WebKit/public/platform/linux/WebSandboxSupport.h" | 80 #include "third_party/WebKit/public/platform/linux/WebSandboxSupport.h" |
81 #endif | 81 #endif |
82 | 82 |
83 #if defined(OS_POSIX) | 83 #if defined(OS_POSIX) |
84 #include "base/file_descriptor_posix.h" | 84 #include "base/file_descriptor_posix.h" |
85 #endif | 85 #endif |
86 | 86 |
| 87 #if defined(OS_ANDROID) |
| 88 #include "content/renderer/media/android/audio_decoder_android.h" |
| 89 #endif |
| 90 |
87 using WebKit::WebAudioDevice; | 91 using WebKit::WebAudioDevice; |
88 using WebKit::WebBlobRegistry; | 92 using WebKit::WebBlobRegistry; |
89 using WebKit::WebFileInfo; | 93 using WebKit::WebFileInfo; |
90 using WebKit::WebFileSystem; | 94 using WebKit::WebFileSystem; |
91 using WebKit::WebFrame; | 95 using WebKit::WebFrame; |
92 using WebKit::WebGamepads; | 96 using WebKit::WebGamepads; |
93 using WebKit::WebIDBFactory; | 97 using WebKit::WebIDBFactory; |
94 using WebKit::Platform; | 98 using WebKit::Platform; |
95 using WebKit::WebMediaStreamCenter; | 99 using WebKit::WebMediaStreamCenter; |
96 using WebKit::WebMediaStreamCenterClient; | 100 using WebKit::WebMediaStreamCenterClient; |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 static void RunWebAudioMediaCodec(base::SharedMemoryHandle encoded_data_handle, | 740 static void RunWebAudioMediaCodec(base::SharedMemoryHandle encoded_data_handle, |
737 base::FileDescriptor pcm_output, | 741 base::FileDescriptor pcm_output, |
738 uint32_t data_size) { | 742 uint32_t data_size) { |
739 RenderThread::Get()->Send(new ViewHostMsg_RunWebAudioMediaCodec( | 743 RenderThread::Get()->Send(new ViewHostMsg_RunWebAudioMediaCodec( |
740 encoded_data_handle, pcm_output, data_size)); | 744 encoded_data_handle, pcm_output, data_size)); |
741 } | 745 } |
742 | 746 |
743 bool RendererWebKitPlatformSupportImpl::loadAudioResource( | 747 bool RendererWebKitPlatformSupportImpl::loadAudioResource( |
744 WebKit::WebAudioBus* destination_bus, const char* audio_file_data, | 748 WebKit::WebAudioBus* destination_bus, const char* audio_file_data, |
745 size_t data_size, double sample_rate) { | 749 size_t data_size, double sample_rate) { |
746 return webkit_media::DecodeAudioFileData( | 750 return DecodeAudioFileData(destination_bus, |
747 destination_bus, | 751 audio_file_data, |
748 audio_file_data, | 752 data_size, |
749 data_size, | 753 sample_rate, |
750 sample_rate, | 754 base::Bind(&RunWebAudioMediaCodec)); |
751 base::Bind(&RunWebAudioMediaCodec)); | |
752 } | 755 } |
753 #else | 756 #else |
754 bool RendererWebKitPlatformSupportImpl::loadAudioResource( | 757 bool RendererWebKitPlatformSupportImpl::loadAudioResource( |
755 WebKit::WebAudioBus* destination_bus, const char* audio_file_data, | 758 WebKit::WebAudioBus* destination_bus, const char* audio_file_data, |
756 size_t data_size, double sample_rate) { | 759 size_t data_size, double sample_rate) { |
757 return webkit_media::DecodeAudioFileData(destination_bus, | 760 return webkit_media::DecodeAudioFileData(destination_bus, |
758 audio_file_data, | 761 audio_file_data, |
759 data_size, | 762 data_size, |
760 sample_rate); | 763 sample_rate); |
761 } | 764 } |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 | 948 |
946 //------------------------------------------------------------------------------ | 949 //------------------------------------------------------------------------------ |
947 | 950 |
948 WebKit::WebString RendererWebKitPlatformSupportImpl::convertIDNToUnicode( | 951 WebKit::WebString RendererWebKitPlatformSupportImpl::convertIDNToUnicode( |
949 const WebKit::WebString& host, | 952 const WebKit::WebString& host, |
950 const WebKit::WebString& languages) { | 953 const WebKit::WebString& languages) { |
951 return net::IDNToUnicode(host.utf8(), languages.utf8()); | 954 return net::IDNToUnicode(host.utf8(), languages.utf8()); |
952 } | 955 } |
953 | 956 |
954 } // namespace content | 957 } // namespace content |
OLD | NEW |