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

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: Fixed UMA_HISTOGRAM_ENUMERATION and cleaned up. 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "content/renderer/dom_storage/webstoragearea_impl.h" 57 #include "content/renderer/dom_storage/webstoragearea_impl.h"
58 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 58 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
59 #include "content/renderer/gpu/compositor_thread.h" 59 #include "content/renderer/gpu/compositor_thread.h"
60 #include "content/renderer/gpu/compositor_output_surface.h" 60 #include "content/renderer/gpu/compositor_output_surface.h"
61 #include "content/renderer/gpu/gpu_benchmarking_extension.h" 61 #include "content/renderer/gpu/gpu_benchmarking_extension.h"
62 #include "content/renderer/media/audio_hardware.h" 62 #include "content/renderer/media/audio_hardware.h"
63 #include "content/renderer/media/audio_input_message_filter.h" 63 #include "content/renderer/media/audio_input_message_filter.h"
64 #include "content/renderer/media/audio_message_filter.h" 64 #include "content/renderer/media/audio_message_filter.h"
65 #include "content/renderer/media/audio_renderer_mixer_manager.h" 65 #include "content/renderer/media/audio_renderer_mixer_manager.h"
66 #include "content/renderer/media/media_stream_center.h" 66 #include "content/renderer/media/media_stream_center.h"
67 #include "content/renderer/media/media_stream_dependency_factory.h"
67 #include "content/renderer/media/video_capture_impl_manager.h" 68 #include "content/renderer/media/video_capture_impl_manager.h"
68 #include "content/renderer/media/video_capture_message_filter.h" 69 #include "content/renderer/media/video_capture_message_filter.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"
76 #include "ipc/ipc_platform_file.h" 77 #include "ipc/ipc_platform_file.h"
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 1103
1103 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( 1104 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter(
1104 WebKit::WebMediaStreamCenterClient* client) { 1105 WebKit::WebMediaStreamCenterClient* client) {
1105 #if defined(ENABLE_WEBRTC) 1106 #if defined(ENABLE_WEBRTC)
1106 if (!media_stream_center_) 1107 if (!media_stream_center_)
1107 media_stream_center_ = new content::MediaStreamCenter(client); 1108 media_stream_center_ = new content::MediaStreamCenter(client);
1108 #endif 1109 #endif
1109 return media_stream_center_; 1110 return media_stream_center_;
1110 } 1111 }
1111 1112
1113 MediaStreamDependencyFactory*
1114 RenderThreadImpl::GetMediaStreamDependencyFactory() {
1115 if (!media_stream_factory_.get()) {
piman 2012/09/06 17:04:45 nit: no need for braces.
perkj_chrome 2012/09/12 13:54:38 now its needed....
1116 media_stream_factory_.reset(new MediaStreamDependencyFactory(vc_manager_));
1117 }
1118 return media_stream_factory_.get();
1119 }
1120
darin (slow to review) 2012/09/06 18:24:59 nit: only one new line here
perkj_chrome 2012/09/12 13:54:39 Done.
1121
1112 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { 1122 GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
1113 if (!gpu_channel_.get()) 1123 if (!gpu_channel_.get())
1114 return NULL; 1124 return NULL;
1115 1125
1116 if (gpu_channel_->state() != GpuChannelHost::kConnected) 1126 if (gpu_channel_->state() != GpuChannelHost::kConnected)
1117 return NULL; 1127 return NULL;
1118 1128
1119 return gpu_channel_.get(); 1129 return gpu_channel_.get();
1120 } 1130 }
1121 1131
(...skipping 22 matching lines...) Expand all
1144 1154
1145 scoped_refptr<base::MessageLoopProxy> 1155 scoped_refptr<base::MessageLoopProxy>
1146 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1156 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1147 DCHECK(message_loop() == MessageLoop::current()); 1157 DCHECK(message_loop() == MessageLoop::current());
1148 if (!file_thread_.get()) { 1158 if (!file_thread_.get()) {
1149 file_thread_.reset(new base::Thread("Renderer::FILE")); 1159 file_thread_.reset(new base::Thread("Renderer::FILE"));
1150 file_thread_->Start(); 1160 file_thread_->Start();
1151 } 1161 }
1152 return file_thread_->message_loop_proxy(); 1162 return file_thread_->message_loop_proxy();
1153 } 1163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698