OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "content/common/database_util.h" | 13 #include "content/common/database_util.h" |
14 #include "content/common/file_system/webfilesystem_impl.h" | 14 #include "content/common/file_system/webfilesystem_impl.h" |
15 #include "content/common/file_utilities_messages.h" | 15 #include "content/common/file_utilities_messages.h" |
16 #include "content/common/mime_registry_messages.h" | 16 #include "content/common/mime_registry_messages.h" |
17 #include "content/common/npobject_util.h" | 17 #include "content/common/npobject_util.h" |
18 #include "content/common/view_messages.h" | 18 #include "content/common/view_messages.h" |
19 #include "content/common/webblobregistry_impl.h" | 19 #include "content/common/webblobregistry_impl.h" |
20 #include "content/common/webmessageportchannel_impl.h" | 20 #include "content/common/webmessageportchannel_impl.h" |
21 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
22 #include "content/public/renderer/content_renderer_client.h" | 22 #include "content/public/renderer/content_renderer_client.h" |
23 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" | 23 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" |
24 #include "content/renderer/media/audio_device.h" | 24 #include "content/renderer/media/audio_device.h" |
25 #include "content/renderer/render_thread_impl.h" | 25 #include "content/renderer/render_thread_impl.h" |
26 #include "content/renderer/render_view_impl.h" | |
26 #include "content/renderer/renderer_webaudiodevice_impl.h" | 27 #include "content/renderer/renderer_webaudiodevice_impl.h" |
27 #include "content/renderer/renderer_webidbfactory_impl.h" | 28 #include "content/renderer/renderer_webidbfactory_impl.h" |
28 #include "content/renderer/renderer_webstoragenamespace_impl.h" | 29 #include "content/renderer/renderer_webstoragenamespace_impl.h" |
29 #include "content/renderer/websharedworkerrepository_impl.h" | 30 #include "content/renderer/websharedworkerrepository_impl.h" |
30 #include "googleurl/src/gurl.h" | 31 #include "googleurl/src/gurl.h" |
31 #include "ipc/ipc_sync_message_filter.h" | 32 #include "ipc/ipc_sync_message_filter.h" |
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobRegistry.h" | 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobRegistry.h" |
33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
34 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D. h" | 35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebGraphicsContext3D. h" |
35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" | 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" |
36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" | 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h" |
37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h" |
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPeerConnectionHand ler.h" | |
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPeerConnectionHand lerClient.h" | |
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" | |
38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa lue.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptVa lue.h" |
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat cher.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat cher.h" |
40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" |
41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" | 45 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" |
42 #include "webkit/glue/simple_webmimeregistry_impl.h" | 46 #include "webkit/glue/simple_webmimeregistry_impl.h" |
43 #include "webkit/glue/webclipboard_impl.h" | 47 #include "webkit/glue/webclipboard_impl.h" |
44 #include "webkit/glue/webfileutilities_impl.h" | 48 #include "webkit/glue/webfileutilities_impl.h" |
45 #include "webkit/glue/webkit_glue.h" | 49 #include "webkit/glue/webkit_glue.h" |
46 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 50 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
47 | 51 |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
607 blob_registry_.reset(new WebBlobRegistryImpl(ChildThread::current())); | 611 blob_registry_.reset(new WebBlobRegistryImpl(ChildThread::current())); |
608 } | 612 } |
609 return blob_registry_.get(); | 613 return blob_registry_.get(); |
610 } | 614 } |
611 | 615 |
612 WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( | 616 WebKit::WebString RendererWebKitPlatformSupportImpl::userAgent( |
613 const WebKit::WebURL& url) { | 617 const WebKit::WebURL& url) { |
614 return WebKitPlatformSupportImpl::userAgent(url); | 618 return WebKitPlatformSupportImpl::userAgent(url); |
615 } | 619 } |
616 | 620 |
621 //------------------------------------------------------------------------------ | |
622 | |
623 WebKit::WebPeerConnectionHandler* | |
624 RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( | |
625 WebKit::WebPeerConnectionHandlerClient* client) { | |
626 // TODO(grunell): Do we really need this? Isn't it already checked in WebKit | |
627 // before calling us? | |
tommi (sloooow) - chröme
2011/11/08 12:27:24
address before checkin?
Henrik Grunell
2011/11/08 22:06:41
Yes I will. I'll get back to this shortly.
| |
628 if (!WebKit::WebRuntimeFeatures::isMediaStreamEnabled()) | |
629 return NULL; | |
630 WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext(); | |
631 if (!web_frame) | |
632 return NULL; | |
633 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); | |
634 if (!render_view) | |
635 return NULL; | |
tommi (sloooow) - chröme
2011/11/08 12:27:24
do we need to delete web_frame here or is ownershi
Henrik Grunell
2011/11/08 22:06:41
I think it's only a weak ptr, I'll check this and
| |
636 return render_view->CreatePeerConnectionHandler(client); | |
637 } | |
OLD | NEW |