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

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

Issue 10379003: enable media stream by default. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 520
521 WebRuntimeFeatures::enableGeolocation( 521 WebRuntimeFeatures::enableGeolocation(
522 !command_line.HasSwitch(switches::kDisableGeolocation)); 522 !command_line.HasSwitch(switches::kDisableGeolocation));
523 523
524 WebKit::WebRuntimeFeatures::enableMediaSource( 524 WebKit::WebRuntimeFeatures::enableMediaSource(
525 command_line.HasSwitch(switches::kEnableMediaSource)); 525 command_line.HasSwitch(switches::kEnableMediaSource));
526 526
527 WebRuntimeFeatures::enableMediaPlayer( 527 WebRuntimeFeatures::enableMediaPlayer(
528 media::IsMediaLibraryInitialized()); 528 media::IsMediaLibraryInitialized());
529 529
530 WebKit::WebRuntimeFeatures::enableMediaStream( 530 WebKit::WebRuntimeFeatures::enableMediaStream(true);
jam 2012/05/14 06:30:11 nit: since this is always true, just get rid of th
wjia(left Chromium) 2012/05/14 20:42:17 This is the WebKit function to set media stream fl
531 command_line.HasSwitch(switches::kEnableMediaStream));
532 531
533 WebKit::WebRuntimeFeatures::enablePeerConnection( 532 WebKit::WebRuntimeFeatures::enablePeerConnection(
534 command_line.HasSwitch(switches::kEnablePeerConnection)); 533 command_line.HasSwitch(switches::kEnablePeerConnection));
535 534
536 WebKit::WebRuntimeFeatures::enableFullScreenAPI( 535 WebKit::WebRuntimeFeatures::enableFullScreenAPI(
537 !command_line.HasSwitch(switches::kDisableFullScreen)); 536 !command_line.HasSwitch(switches::kDisableFullScreen));
538 537
539 WebKit::WebRuntimeFeatures::enablePointerLock( 538 WebKit::WebRuntimeFeatures::enablePointerLock(
540 command_line.HasSwitch(switches::kEnablePointerLock)); 539 command_line.HasSwitch(switches::kEnablePointerLock));
541 540
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 913
915 // Connect to the GPU process if a channel name was received. 914 // Connect to the GPU process if a channel name was received.
916 gpu_channel_->Connect(channel_handle); 915 gpu_channel_->Connect(channel_handle);
917 916
918 return GetGpuChannel(); 917 return GetGpuChannel();
919 } 918 }
920 919
921 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( 920 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter(
922 WebKit::WebMediaStreamCenterClient* client) { 921 WebKit::WebMediaStreamCenterClient* client) {
923 #if defined(ENABLE_WEBRTC) 922 #if defined(ENABLE_WEBRTC)
924 if (!CommandLine::ForCurrentProcess()->HasSwitch(
925 switches::kEnableMediaStream)) {
926 return NULL;
927 }
928 if (!media_stream_center_) 923 if (!media_stream_center_)
929 media_stream_center_ = new content::MediaStreamCenter(client); 924 media_stream_center_ = new content::MediaStreamCenter(client);
930 #endif 925 #endif
931 return media_stream_center_; 926 return media_stream_center_;
932 } 927 }
933 928
934 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { 929 GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
935 if (!gpu_channel_.get()) 930 if (!gpu_channel_.get())
936 return NULL; 931 return NULL;
937 932
(...skipping 28 matching lines...) Expand all
966 961
967 scoped_refptr<base::MessageLoopProxy> 962 scoped_refptr<base::MessageLoopProxy>
968 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 963 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
969 DCHECK(message_loop() == MessageLoop::current()); 964 DCHECK(message_loop() == MessageLoop::current());
970 if (!file_thread_.get()) { 965 if (!file_thread_.get()) {
971 file_thread_.reset(new base::Thread("Renderer::FILE")); 966 file_thread_.reset(new base::Thread("Renderer::FILE"));
972 file_thread_->Start(); 967 file_thread_->Start();
973 } 968 }
974 return file_thread_->message_loop_proxy(); 969 return file_thread_->message_loop_proxy();
975 } 970 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698