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

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

Issue 9648007: Adding a skeleton MediaStreamCenter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't create MediaStreamCenter if WebRTC is disabled. Created 8 years, 9 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 30 matching lines...) Expand all
41 #include "content/public/common/content_paths.h" 41 #include "content/public/common/content_paths.h"
42 #include "content/public/common/content_switches.h" 42 #include "content/public/common/content_switches.h"
43 #include "content/public/common/renderer_preferences.h" 43 #include "content/public/common/renderer_preferences.h"
44 #include "content/public/renderer/content_renderer_client.h" 44 #include "content/public/renderer/content_renderer_client.h"
45 #include "content/public/renderer/render_process_observer.h" 45 #include "content/public/renderer/render_process_observer.h"
46 #include "content/public/renderer/render_view_visitor.h" 46 #include "content/public/renderer/render_view_visitor.h"
47 #include "content/renderer/devtools_agent_filter.h" 47 #include "content/renderer/devtools_agent_filter.h"
48 #include "content/renderer/gpu/compositor_thread.h" 48 #include "content/renderer/gpu/compositor_thread.h"
49 #include "content/renderer/media/audio_input_message_filter.h" 49 #include "content/renderer/media/audio_input_message_filter.h"
50 #include "content/renderer/media/audio_message_filter.h" 50 #include "content/renderer/media/audio_message_filter.h"
51 #include "content/renderer/media/media_stream_center.h"
51 #include "content/renderer/media/video_capture_impl_manager.h" 52 #include "content/renderer/media/video_capture_impl_manager.h"
52 #include "content/renderer/media/video_capture_message_filter.h" 53 #include "content/renderer/media/video_capture_message_filter.h"
53 #include "content/renderer/plugin_channel_host.h" 54 #include "content/renderer/plugin_channel_host.h"
54 #include "content/renderer/render_process_impl.h" 55 #include "content/renderer/render_process_impl.h"
55 #include "content/renderer/render_view_impl.h" 56 #include "content/renderer/render_view_impl.h"
56 #include "content/renderer/renderer_webkitplatformsupport_impl.h" 57 #include "content/renderer/renderer_webkitplatformsupport_impl.h"
57 #include "grit/content_resources.h" 58 #include "grit/content_resources.h"
58 #include "ipc/ipc_channel_handle.h" 59 #include "ipc/ipc_channel_handle.h"
59 #include "ipc/ipc_platform_file.h" 60 #include "ipc/ipc_platform_file.h"
60 #include "media/base/media.h" 61 #include "media/base/media.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 widget_count_ = 0; 203 widget_count_ = 0;
203 hidden_widget_count_ = 0; 204 hidden_widget_count_ = 0;
204 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs; 205 idle_notification_delay_in_ms_ = kInitialIdleHandlerDelayMs;
205 idle_notifications_to_skip_ = 0; 206 idle_notifications_to_skip_ = 0;
206 compositor_initialized_ = false; 207 compositor_initialized_ = false;
207 208
208 appcache_dispatcher_.reset(new AppCacheDispatcher(Get())); 209 appcache_dispatcher_.reset(new AppCacheDispatcher(Get()));
209 main_thread_indexed_db_dispatcher_.reset( 210 main_thread_indexed_db_dispatcher_.reset(
210 IndexedDBDispatcher::ThreadSpecificInstance()); 211 IndexedDBDispatcher::ThreadSpecificInstance());
211 212
213 media_stream_center_ = NULL;
214
212 db_message_filter_ = new DBMessageFilter(); 215 db_message_filter_ = new DBMessageFilter();
213 AddFilter(db_message_filter_.get()); 216 AddFilter(db_message_filter_.get());
214 217
215 vc_manager_ = new VideoCaptureImplManager(); 218 vc_manager_ = new VideoCaptureImplManager();
216 AddFilter(vc_manager_->video_capture_message_filter()); 219 AddFilter(vc_manager_->video_capture_message_filter());
217 220
218 audio_input_message_filter_ = new AudioInputMessageFilter(); 221 audio_input_message_filter_ = new AudioInputMessageFilter();
219 AddFilter(audio_input_message_filter_.get()); 222 AddFilter(audio_input_message_filter_.get());
220 223
221 audio_message_filter_ = new AudioMessageFilter(); 224 audio_message_filter_ = new AudioMessageFilter();
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 gpu_channel_ = new GpuChannelHost(this, client_id); 920 gpu_channel_ = new GpuChannelHost(this, client_id);
918 gpu_channel_->set_gpu_info(gpu_info); 921 gpu_channel_->set_gpu_info(gpu_info);
919 content::GetContentClient()->SetGpuInfo(gpu_info); 922 content::GetContentClient()->SetGpuInfo(gpu_info);
920 923
921 // Connect to the GPU process if a channel name was received. 924 // Connect to the GPU process if a channel name was received.
922 gpu_channel_->Connect(channel_handle, renderer_process_for_gpu); 925 gpu_channel_->Connect(channel_handle, renderer_process_for_gpu);
923 926
924 return GetGpuChannel(); 927 return GetGpuChannel();
925 } 928 }
926 929
930 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter(
931 WebKit::WebMediaStreamCenterClient* client) {
932 #if defined(ENABLE_WEBRTC)
933 if (!CommandLine::ForCurrentProcess()->HasSwitch(
934 switches::kEnableMediaStream)) {
935 return NULL;
936 }
937 if (!media_stream_center_)
938 media_stream_center_ = new content::MediaStreamCenter(client);
939 #endif
940 return media_stream_center_;
941 }
942
927 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { 943 GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
928 if (!gpu_channel_.get()) 944 if (!gpu_channel_.get())
929 return NULL; 945 return NULL;
930 946
931 if (gpu_channel_->state() != GpuChannelHost::kConnected) 947 if (gpu_channel_->state() != GpuChannelHost::kConnected)
932 return NULL; 948 return NULL;
933 949
934 return gpu_channel_.get(); 950 return gpu_channel_.get();
935 } 951 }
936 952
(...skipping 22 matching lines...) Expand all
959 975
960 scoped_refptr<base::MessageLoopProxy> 976 scoped_refptr<base::MessageLoopProxy>
961 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 977 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
962 DCHECK(message_loop() == MessageLoop::current()); 978 DCHECK(message_loop() == MessageLoop::current());
963 if (!file_thread_.get()) { 979 if (!file_thread_.get()) {
964 file_thread_.reset(new base::Thread("Renderer::FILE")); 980 file_thread_.reset(new base::Thread("Renderer::FILE"));
965 file_thread_->Start(); 981 file_thread_->Start();
966 } 982 }
967 return file_thread_->message_loop_proxy(); 983 return file_thread_->message_loop_proxy();
968 } 984 }
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/renderer_webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698