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

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

Issue 10391157: reland http://codereview.chromium.org/10379003/ (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_view_impl.cc » ('j') | 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/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);
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 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 914
916 // Connect to the GPU process if a channel name was received. 915 // Connect to the GPU process if a channel name was received.
917 gpu_channel_->Connect(channel_handle); 916 gpu_channel_->Connect(channel_handle);
918 917
919 return GetGpuChannel(); 918 return GetGpuChannel();
920 } 919 }
921 920
922 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( 921 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter(
923 WebKit::WebMediaStreamCenterClient* client) { 922 WebKit::WebMediaStreamCenterClient* client) {
924 #if defined(ENABLE_WEBRTC) 923 #if defined(ENABLE_WEBRTC)
925 if (!CommandLine::ForCurrentProcess()->HasSwitch(
926 switches::kEnableMediaStream)) {
927 return NULL;
928 }
929 if (!media_stream_center_) 924 if (!media_stream_center_)
930 media_stream_center_ = new content::MediaStreamCenter(client); 925 media_stream_center_ = new content::MediaStreamCenter(client);
931 #endif 926 #endif
932 return media_stream_center_; 927 return media_stream_center_;
933 } 928 }
934 929
935 GpuChannelHost* RenderThreadImpl::GetGpuChannel() { 930 GpuChannelHost* RenderThreadImpl::GetGpuChannel() {
936 if (!gpu_channel_.get()) 931 if (!gpu_channel_.get())
937 return NULL; 932 return NULL;
938 933
(...skipping 28 matching lines...) Expand all
967 962
968 scoped_refptr<base::MessageLoopProxy> 963 scoped_refptr<base::MessageLoopProxy>
969 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 964 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
970 DCHECK(message_loop() == MessageLoop::current()); 965 DCHECK(message_loop() == MessageLoop::current());
971 if (!file_thread_.get()) { 966 if (!file_thread_.get()) {
972 file_thread_.reset(new base::Thread("Renderer::FILE")); 967 file_thread_.reset(new base::Thread("Renderer::FILE"));
973 file_thread_->Start(); 968 file_thread_->Start();
974 } 969 }
975 return file_thread_->message_loop_proxy(); 970 return file_thread_->message_loop_proxy();
976 } 971 }
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698