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

Side by Side Diff: content/renderer/render_thread_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: Rebased to latest codec base. 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
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/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "content/renderer/dom_storage/webstoragearea_impl.h" 56 #include "content/renderer/dom_storage/webstoragearea_impl.h"
57 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 57 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
58 #include "content/renderer/gpu/compositor_thread.h" 58 #include "content/renderer/gpu/compositor_thread.h"
59 #include "content/renderer/gpu/compositor_output_surface.h" 59 #include "content/renderer/gpu/compositor_output_surface.h"
60 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 60 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
61 #include "content/renderer/media/audio_hardware.h" 61 #include "content/renderer/media/audio_hardware.h"
62 #include "content/renderer/media/audio_input_message_filter.h" 62 #include "content/renderer/media/audio_input_message_filter.h"
63 #include "content/renderer/media/audio_message_filter.h" 63 #include "content/renderer/media/audio_message_filter.h"
64 #include "content/renderer/media/audio_renderer_mixer_manager.h" 64 #include "content/renderer/media/audio_renderer_mixer_manager.h"
65 #include "content/renderer/media/media_stream_center.h" 65 #include "content/renderer/media/media_stream_center.h"
66 #include "content/renderer/media/media_stream_dependency_factory.h"
66 #include "content/renderer/media/video_capture_impl_manager.h" 67 #include "content/renderer/media/video_capture_impl_manager.h"
67 #include "content/renderer/media/video_capture_message_filter.h" 68 #include "content/renderer/media/video_capture_message_filter.h"
68 #include "content/renderer/p2p/socket_dispatcher.h" 69 #include "content/renderer/p2p/socket_dispatcher.h"
69 #include "content/renderer/plugin_channel_host.h" 70 #include "content/renderer/plugin_channel_host.h"
70 #include "content/renderer/render_process_impl.h" 71 #include "content/renderer/render_process_impl.h"
71 #include "content/renderer/render_view_impl.h" 72 #include "content/renderer/render_view_impl.h"
72 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 73 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
73 #include "grit/content_resources.h" 74 #include "grit/content_resources.h"
74 #include "ipc/ipc_channel_handle.h" 75 #include "ipc/ipc_channel_handle.h"
75 #include "ipc/ipc_forwarding_message_filter.h" 76 #include "ipc/ipc_forwarding_message_filter.h"
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 // Connect to the GPU process if a channel name was received. 1088 // Connect to the GPU process if a channel name was received.
1088 gpu_channel_->Connect(channel_handle); 1089 gpu_channel_->Connect(channel_handle);
1089 1090
1090 return GetGpuChannel(); 1091 return GetGpuChannel();
1091 } 1092 }
1092 1093
1093 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( 1094 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter(
1094 WebKit::WebMediaStreamCenterClient* client) { 1095 WebKit::WebMediaStreamCenterClient* client) {
1095 #if defined(ENABLE_WEBRTC) 1096 #if defined(ENABLE_WEBRTC)
1096 if (!media_stream_center_) 1097 if (!media_stream_center_)
1097 media_stream_center_ = new content::MediaStreamCenter(client); 1098 media_stream_center_ = new content::MediaStreamCenter(
1099 client, GetMediaStreamDependencyFactory());
1098 #endif 1100 #endif
1099 return media_stream_center_; 1101 return media_stream_center_;
1100 } 1102 }
1101 1103
1104 MediaStreamDependencyFactory*
1105 RenderThreadImpl::GetMediaStreamDependencyFactory() {
1106 #if defined(ENABLE_WEBRTC)
1107 if (!media_stream_factory_.get()) {
1108 media_stream_factory_.reset(new MediaStreamDependencyFactory(
1109 vc_manager_, p2p_socket_dispatcher_));
1110 }
1111 #endif
1112 return media_stream_factory_.get();
1113 }
1114
1115
1102 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { 1116 GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
1103 if (!gpu_channel_.get()) 1117 if (!gpu_channel_.get())
1104 return NULL; 1118 return NULL;
1105 1119
1106 if (gpu_channel_->state() != GpuChannelHost::kConnected) 1120 if (gpu_channel_->state() != GpuChannelHost::kConnected)
1107 return NULL; 1121 return NULL;
1108 1122
1109 return gpu_channel_.get(); 1123 return gpu_channel_.get();
1110 } 1124 }
1111 1125
(...skipping 22 matching lines...) Expand all
1134 1148
1135 scoped_refptr<base::MessageLoopProxy> 1149 scoped_refptr<base::MessageLoopProxy>
1136 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1150 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1137 DCHECK(message_loop() == MessageLoop::current()); 1151 DCHECK(message_loop() == MessageLoop::current());
1138 if (!file_thread_.get()) { 1152 if (!file_thread_.get()) {
1139 file_thread_.reset(new base::Thread("Renderer::FILE")); 1153 file_thread_.reset(new base::Thread("Renderer::FILE"));
1140 file_thread_->Start(); 1154 file_thread_->Start();
1141 } 1155 }
1142 return file_thread_->message_loop_proxy(); 1156 return file_thread_->message_loop_proxy();
1143 } 1157 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698