| OLD | NEW |
| 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 | 656 |
| 657 if (command_line.HasSwitch(switches::kDisableGeolocation)) | 657 if (command_line.HasSwitch(switches::kDisableGeolocation)) |
| 658 WebRuntimeFeatures::enableGeolocation(false); | 658 WebRuntimeFeatures::enableGeolocation(false); |
| 659 | 659 |
| 660 #if !defined(OS_ANDROID) || defined(GOOGLE_TV) | 660 #if !defined(OS_ANDROID) || defined(GOOGLE_TV) |
| 661 if (command_line.HasSwitch(switches::kDisableMediaSource)) | 661 if (command_line.HasSwitch(switches::kDisableMediaSource)) |
| 662 WebRuntimeFeatures::enableMediaSource(false); | 662 WebRuntimeFeatures::enableMediaSource(false); |
| 663 #endif | 663 #endif |
| 664 | 664 |
| 665 #if defined(OS_ANDROID) | 665 #if defined(OS_ANDROID) |
| 666 if (command_line.HasSwitch(switches::kDisableWebRTC)) | 666 if (!command_line.HasSwitch(switches::kEnableWebRTC)) |
| 667 WebRuntimeFeatures::enableMediaStream(false); | 667 WebRuntimeFeatures::enableMediaStream(false); |
| 668 #endif | 668 #endif |
| 669 | 669 |
| 670 #if defined(OS_ANDROID) | 670 #if defined(OS_ANDROID) |
| 671 if (command_line.HasSwitch(switches::kDisableWebRTC)) | 671 if (!command_line.HasSwitch(switches::kEnableWebRTC)) |
| 672 WebRuntimeFeatures::enablePeerConnection(false); | 672 WebRuntimeFeatures::enablePeerConnection(false); |
| 673 #endif | 673 #endif |
| 674 | 674 |
| 675 if (command_line.HasSwitch(switches::kDisableFullScreen)) | 675 if (command_line.HasSwitch(switches::kDisableFullScreen)) |
| 676 WebRuntimeFeatures::enableFullScreenAPI(false); | 676 WebRuntimeFeatures::enableFullScreenAPI(false); |
| 677 | 677 |
| 678 if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) | 678 if (command_line.HasSwitch(switches::kDisableEncryptedMedia)) |
| 679 WebRuntimeFeatures::enableEncryptedMedia(false); | 679 WebRuntimeFeatures::enableEncryptedMedia(false); |
| 680 | 680 |
| 681 #if defined(OS_ANDROID) | 681 #if defined(OS_ANDROID) |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 | 1220 |
| 1221 // Connect to the GPU process if a channel name was received. | 1221 // Connect to the GPU process if a channel name was received. |
| 1222 gpu_channel_->Connect(channel_handle); | 1222 gpu_channel_->Connect(channel_handle); |
| 1223 | 1223 |
| 1224 return GetGpuChannel(); | 1224 return GetGpuChannel(); |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( | 1227 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( |
| 1228 WebKit::WebMediaStreamCenterClient* client) { | 1228 WebKit::WebMediaStreamCenterClient* client) { |
| 1229 #if defined(OS_ANDROID) | 1229 #if defined(OS_ANDROID) |
| 1230 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1230 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 1231 switches::kDisableWebRTC)) | 1231 switches::kEnableWebRTC)) |
| 1232 return NULL; | 1232 return NULL; |
| 1233 #endif | 1233 #endif |
| 1234 | 1234 |
| 1235 #if defined(ENABLE_WEBRTC) | 1235 #if defined(ENABLE_WEBRTC) |
| 1236 if (!media_stream_center_) { | 1236 if (!media_stream_center_) { |
| 1237 media_stream_center_ = GetContentClient()->renderer() | 1237 media_stream_center_ = GetContentClient()->renderer() |
| 1238 ->OverrideCreateWebMediaStreamCenter(client); | 1238 ->OverrideCreateWebMediaStreamCenter(client); |
| 1239 if (!media_stream_center_) { | 1239 if (!media_stream_center_) { |
| 1240 media_stream_center_ = new MediaStreamCenter( | 1240 media_stream_center_ = new MediaStreamCenter( |
| 1241 client, GetMediaStreamDependencyFactory()); | 1241 client, GetMediaStreamDependencyFactory()); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 | 1305 |
| 1306 void RenderThreadImpl::SetFlingCurveParameters( | 1306 void RenderThreadImpl::SetFlingCurveParameters( |
| 1307 const std::vector<float>& new_touchpad, | 1307 const std::vector<float>& new_touchpad, |
| 1308 const std::vector<float>& new_touchscreen) { | 1308 const std::vector<float>& new_touchscreen) { |
| 1309 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1309 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
| 1310 new_touchscreen); | 1310 new_touchscreen); |
| 1311 | 1311 |
| 1312 } | 1312 } |
| 1313 | 1313 |
| 1314 } // namespace content | 1314 } // namespace content |
| OLD | NEW |