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/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 30 matching lines...) Expand all Loading... | |
41 #include "content/renderer/media/audio_decoder.h" | 41 #include "content/renderer/media/audio_decoder.h" |
42 #include "content/renderer/media/crypto/key_systems.h" | 42 #include "content/renderer/media/crypto/key_systems.h" |
43 #include "content/renderer/media/media_stream_dependency_factory.h" | 43 #include "content/renderer/media/media_stream_dependency_factory.h" |
44 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 44 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
45 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" | 45 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
46 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" | 46 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" |
47 #include "content/renderer/render_thread_impl.h" | 47 #include "content/renderer/render_thread_impl.h" |
48 #include "content/renderer/renderer_clipboard_client.h" | 48 #include "content/renderer/renderer_clipboard_client.h" |
49 #include "content/renderer/webclipboard_impl.h" | 49 #include "content/renderer/webclipboard_impl.h" |
50 #include "content/renderer/webcrypto/webcrypto_impl.h" | 50 #include "content/renderer/webcrypto/webcrypto_impl.h" |
51 #include "content/renderer/webpublicsuffixlist_impl.h" | |
51 #include "gpu/config/gpu_info.h" | 52 #include "gpu/config/gpu_info.h" |
52 #include "ipc/ipc_sync_message_filter.h" | 53 #include "ipc/ipc_sync_message_filter.h" |
53 #include "media/audio/audio_output_device.h" | 54 #include "media/audio/audio_output_device.h" |
54 #include "media/base/audio_hardware_config.h" | 55 #include "media/base/audio_hardware_config.h" |
55 #include "media/filters/stream_parser_factory.h" | 56 #include "media/filters/stream_parser_factory.h" |
56 #include "net/base/mime_util.h" | 57 #include "net/base/mime_util.h" |
57 #include "net/base/net_util.h" | 58 #include "net/base/net_util.h" |
58 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 59 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
59 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" | 60 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" |
60 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" | 61 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
199 #endif // defined(OS_ANDROID) | 200 #endif // defined(OS_ANDROID) |
200 | 201 |
201 //------------------------------------------------------------------------------ | 202 //------------------------------------------------------------------------------ |
202 | 203 |
203 RendererWebKitPlatformSupportImpl::RendererWebKitPlatformSupportImpl() | 204 RendererWebKitPlatformSupportImpl::RendererWebKitPlatformSupportImpl() |
204 : clipboard_client_(new RendererClipboardClient), | 205 : clipboard_client_(new RendererClipboardClient), |
205 clipboard_(new WebClipboardImpl(clipboard_client_.get())), | 206 clipboard_(new WebClipboardImpl(clipboard_client_.get())), |
206 mime_registry_(new RendererWebKitPlatformSupportImpl::MimeRegistry), | 207 mime_registry_(new RendererWebKitPlatformSupportImpl::MimeRegistry), |
207 sudden_termination_disables_(0), | 208 sudden_termination_disables_(0), |
208 plugin_refresh_allowed_(true), | 209 plugin_refresh_allowed_(true), |
210 public_suffix_list_(new WebPublicSuffixListImpl()), | |
jamesr
2013/11/15 23:13:47
why does this need heap allocation?
Tom Sepez
2013/11/15 23:22:59
fixed.
| |
209 child_thread_loop_(base::MessageLoopProxy::current()) { | 211 child_thread_loop_(base::MessageLoopProxy::current()) { |
210 if (g_sandbox_enabled && sandboxEnabled()) { | 212 if (g_sandbox_enabled && sandboxEnabled()) { |
211 sandbox_support_.reset( | 213 sandbox_support_.reset( |
212 new RendererWebKitPlatformSupportImpl::SandboxSupport); | 214 new RendererWebKitPlatformSupportImpl::SandboxSupport); |
213 } else { | 215 } else { |
214 DVLOG(1) << "Disabling sandbox support for testing."; | 216 DVLOG(1) << "Disabling sandbox support for testing."; |
215 } | 217 } |
216 | 218 |
217 // ChildThread may not exist in some tests. | 219 // ChildThread may not exist in some tests. |
218 if (ChildThread::current()) { | 220 if (ChildThread::current()) { |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
800 builder->addFileExtensionToLastMediaType( | 802 builder->addFileExtensionToLastMediaType( |
801 WebString::fromUTF8(mime_type.file_extensions[k])); | 803 WebString::fromUTF8(mime_type.file_extensions[k])); |
802 } | 804 } |
803 } | 805 } |
804 } | 806 } |
805 #endif | 807 #endif |
806 } | 808 } |
807 | 809 |
808 //------------------------------------------------------------------------------ | 810 //------------------------------------------------------------------------------ |
809 | 811 |
812 blink::WebPublicSuffixList* | |
813 RendererWebKitPlatformSupportImpl::publicSuffixList() { | |
814 return public_suffix_list_.get(); | |
815 } | |
816 | |
817 //------------------------------------------------------------------------------ | |
818 | |
810 blink::WebString | 819 blink::WebString |
811 RendererWebKitPlatformSupportImpl::signedPublicKeyAndChallengeString( | 820 RendererWebKitPlatformSupportImpl::signedPublicKeyAndChallengeString( |
812 unsigned key_size_index, | 821 unsigned key_size_index, |
813 const blink::WebString& challenge, | 822 const blink::WebString& challenge, |
814 const blink::WebURL& url) { | 823 const blink::WebURL& url) { |
815 std::string signed_public_key; | 824 std::string signed_public_key; |
816 RenderThread::Get()->Send(new ViewHostMsg_Keygen( | 825 RenderThread::Get()->Send(new ViewHostMsg_Keygen( |
817 static_cast<uint32>(key_size_index), | 826 static_cast<uint32>(key_size_index), |
818 challenge.utf8(), | 827 challenge.utf8(), |
819 GURL(url), | 828 GURL(url), |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1063 return; | 1072 return; |
1064 QuotaDispatcher::ThreadSpecificInstance( | 1073 QuotaDispatcher::ThreadSpecificInstance( |
1065 thread_safe_sender_.get(), | 1074 thread_safe_sender_.get(), |
1066 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1075 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1067 storage_partition, | 1076 storage_partition, |
1068 static_cast<quota::StorageType>(type), | 1077 static_cast<quota::StorageType>(type), |
1069 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1078 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1070 } | 1079 } |
1071 | 1080 |
1072 } // namespace content | 1081 } // namespace content |
OLD | NEW |