Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 10919122: Move creation of PeerConnection from the RenderView to the RenderThreadImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: #if defined(ENABLE_WEBRTC) in RendererWebKitPlatformSupportImpl::createPeerConnection00Handler to b… Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
11 #include "base/platform_file.h" 11 #include "base/platform_file.h"
12 #include "base/shared_memory.h" 12 #include "base/shared_memory.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "content/common/database_util.h" 14 #include "content/common/database_util.h"
15 #include "content/common/fileapi/webblobregistry_impl.h" 15 #include "content/common/fileapi/webblobregistry_impl.h"
16 #include "content/common/fileapi/webfilesystem_impl.h" 16 #include "content/common/fileapi/webfilesystem_impl.h"
17 #include "content/common/file_utilities_messages.h" 17 #include "content/common/file_utilities_messages.h"
18 #include "content/common/indexed_db/proxy_webidbfactory_impl.h" 18 #include "content/common/indexed_db/proxy_webidbfactory_impl.h"
19 #include "content/common/mime_registry_messages.h" 19 #include "content/common/mime_registry_messages.h"
20 #include "content/common/npobject_util.h" 20 #include "content/common/npobject_util.h"
21 #include "content/common/view_messages.h" 21 #include "content/common/view_messages.h"
22 #include "content/common/webmessageportchannel_impl.h" 22 #include "content/common/webmessageportchannel_impl.h"
23 #include "content/public/common/content_switches.h" 23 #include "content/public/common/content_switches.h"
24 #include "content/public/common/gpu_info.h" 24 #include "content/public/common/gpu_info.h"
25 #include "content/public/renderer/content_renderer_client.h" 25 #include "content/public/renderer/content_renderer_client.h"
26 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 26 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
27 #include "content/renderer/gamepad_shared_memory_reader.h" 27 #include "content/renderer/gamepad_shared_memory_reader.h"
28 #include "content/renderer/hyphenator/hyphenator.h" 28 #include "content/renderer/hyphenator/hyphenator.h"
29 #include "content/renderer/media/audio_hardware.h" 29 #include "content/renderer/media/audio_hardware.h"
30 #include "content/renderer/media/media_stream_dependency_factory.h"
30 #include "content/renderer/media/renderer_webaudiodevice_impl.h" 31 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
31 #include "content/renderer/render_thread_impl.h" 32 #include "content/renderer/render_thread_impl.h"
32 #include "content/renderer/render_view_impl.h" 33 #include "content/renderer/render_view_impl.h"
33 #include "content/renderer/renderer_clipboard_client.h" 34 #include "content/renderer/renderer_clipboard_client.h"
34 #include "content/renderer/websharedworkerrepository_impl.h" 35 #include "content/renderer/websharedworkerrepository_impl.h"
35 #include "googleurl/src/gurl.h" 36 #include "googleurl/src/gurl.h"
36 #include "ipc/ipc_sync_message_filter.h" 37 #include "ipc/ipc_sync_message_filter.h"
37 #include "media/audio/audio_output_device.h" 38 #include "media/audio/audio_output_device.h"
38 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis try.h" 39 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebBlobRegis try.h"
39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 refresh = false; 670 refresh = false;
670 RenderThread::Get()->Send( 671 RenderThread::Get()->Send(
671 new ViewHostMsg_GetPlugins(refresh, plugins)); 672 new ViewHostMsg_GetPlugins(refresh, plugins));
672 } 673 }
673 674
674 //------------------------------------------------------------------------------ 675 //------------------------------------------------------------------------------
675 676
676 WebPeerConnection00Handler* 677 WebPeerConnection00Handler*
677 RendererWebKitPlatformSupportImpl::createPeerConnection00Handler( 678 RendererWebKitPlatformSupportImpl::createPeerConnection00Handler(
678 WebPeerConnection00HandlerClient* client) { 679 WebPeerConnection00HandlerClient* client) {
679 WebFrame* web_frame = WebFrame::frameForCurrentContext(); 680 RenderThreadImpl* render_thread = RenderThreadImpl::current();
680 if (!web_frame) 681 DCHECK(render_thread);
682 if (!render_thread)
681 return NULL; 683 return NULL;
682 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); 684 #if defined(ENABLE_WEBRTC)
683 if (!render_view) 685 MediaStreamDependencyFactory* rtc_dependency_factory =
684 return NULL; 686 render_thread->GetMediaStreamDependencyFactory();
685 return render_view->CreatePeerConnectionHandlerJsep(client); 687 return rtc_dependency_factory->CreatePeerConnectionHandlerJsep(client);
688 #else
689 return NULL;
690 #endif // defined(ENABLE_WEBRTC)
686 } 691 }
687 692
688 //------------------------------------------------------------------------------ 693 //------------------------------------------------------------------------------
689 694
690 WebMediaStreamCenter* 695 WebMediaStreamCenter*
691 RendererWebKitPlatformSupportImpl::createMediaStreamCenter( 696 RendererWebKitPlatformSupportImpl::createMediaStreamCenter(
692 WebMediaStreamCenterClient* client) { 697 WebMediaStreamCenterClient* client) {
693 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 698 RenderThreadImpl* render_thread = RenderThreadImpl::current();
694 DCHECK(render_thread); 699 DCHECK(render_thread);
695 if (!render_thread) 700 if (!render_thread)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 const char16* characters, 739 const char16* characters,
735 size_t length, 740 size_t length,
736 size_t before_index, 741 size_t before_index,
737 const WebKit::WebString& locale) { 742 const WebKit::WebString& locale) {
738 // Crash if WebKit calls this function when canHyphenate returns false. 743 // Crash if WebKit calls this function when canHyphenate returns false.
739 DCHECK(locale.isEmpty() || locale.equals("en-US")); 744 DCHECK(locale.isEmpty() || locale.equals("en-US"));
740 DCHECK(hyphenator_.get()); 745 DCHECK(hyphenator_.get());
741 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), 746 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length),
742 before_index); 747 before_index);
743 } 748 }
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698