| 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 !command_line.HasSwitch(switches::kDisableGeolocation)); | 698 !command_line.HasSwitch(switches::kDisableGeolocation)); |
| 699 | 699 |
| 700 WebKit::WebRuntimeFeatures::enableMediaSource( | 700 WebKit::WebRuntimeFeatures::enableMediaSource( |
| 701 !command_line.HasSwitch(switches::kDisableMediaSource)); | 701 !command_line.HasSwitch(switches::kDisableMediaSource)); |
| 702 | 702 |
| 703 WebRuntimeFeatures::enableMediaPlayer( | 703 WebRuntimeFeatures::enableMediaPlayer( |
| 704 media::IsMediaLibraryInitialized()); | 704 media::IsMediaLibraryInitialized()); |
| 705 | 705 |
| 706 #if defined(OS_ANDROID) | 706 #if defined(OS_ANDROID) |
| 707 WebKit::WebRuntimeFeatures::enableMediaStream( | 707 WebKit::WebRuntimeFeatures::enableMediaStream( |
| 708 !command_line.HasSwitch(switches::kDisableWebRTC)); | 708 command_line.HasSwitch(switches::kEnableWebRTC)); |
| 709 WebKit::WebRuntimeFeatures::enablePeerConnection( | 709 WebKit::WebRuntimeFeatures::enablePeerConnection( |
| 710 !command_line.HasSwitch(switches::kDisableWebRTC)); | 710 command_line.HasSwitch(switches::kEnableWebRTC)); |
| 711 #else | 711 #else |
| 712 WebKit::WebRuntimeFeatures::enableMediaStream(true); | 712 WebKit::WebRuntimeFeatures::enableMediaStream(true); |
| 713 WebKit::WebRuntimeFeatures::enablePeerConnection(true); | 713 WebKit::WebRuntimeFeatures::enablePeerConnection(true); |
| 714 #endif | 714 #endif |
| 715 | 715 |
| 716 WebKit::WebRuntimeFeatures::enableFullScreenAPI( | 716 WebKit::WebRuntimeFeatures::enableFullScreenAPI( |
| 717 !command_line.HasSwitch(switches::kDisableFullScreen)); | 717 !command_line.HasSwitch(switches::kDisableFullScreen)); |
| 718 | 718 |
| 719 WebKit::WebRuntimeFeatures::enableEncryptedMedia( | 719 WebKit::WebRuntimeFeatures::enableEncryptedMedia( |
| 720 !command_line.HasSwitch(switches::kDisableEncryptedMedia)); | 720 !command_line.HasSwitch(switches::kDisableEncryptedMedia)); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1203 | 1203 |
| 1204 // Connect to the GPU process if a channel name was received. | 1204 // Connect to the GPU process if a channel name was received. |
| 1205 gpu_channel_->Connect(channel_handle); | 1205 gpu_channel_->Connect(channel_handle); |
| 1206 | 1206 |
| 1207 return GetGpuChannel(); | 1207 return GetGpuChannel(); |
| 1208 } | 1208 } |
| 1209 | 1209 |
| 1210 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( | 1210 WebKit::WebMediaStreamCenter* RenderThreadImpl::CreateMediaStreamCenter( |
| 1211 WebKit::WebMediaStreamCenterClient* client) { | 1211 WebKit::WebMediaStreamCenterClient* client) { |
| 1212 #if defined(OS_ANDROID) | 1212 #if defined(OS_ANDROID) |
| 1213 if (CommandLine::ForCurrentProcess()->HasSwitch( | 1213 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 1214 switches::kDisableWebRTC)) | 1214 switches::kEnableWebRTC)) |
| 1215 return NULL; | 1215 return NULL; |
| 1216 #endif | 1216 #endif |
| 1217 | 1217 |
| 1218 #if defined(ENABLE_WEBRTC) | 1218 #if defined(ENABLE_WEBRTC) |
| 1219 if (!media_stream_center_) { | 1219 if (!media_stream_center_) { |
| 1220 media_stream_center_ = GetContentClient()->renderer() | 1220 media_stream_center_ = GetContentClient()->renderer() |
| 1221 ->OverrideCreateWebMediaStreamCenter(client); | 1221 ->OverrideCreateWebMediaStreamCenter(client); |
| 1222 if (!media_stream_center_) { | 1222 if (!media_stream_center_) { |
| 1223 media_stream_center_ = new MediaStreamCenter( | 1223 media_stream_center_ = new MediaStreamCenter( |
| 1224 client, GetMediaStreamDependencyFactory()); | 1224 client, GetMediaStreamDependencyFactory()); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 | 1288 |
| 1289 void RenderThreadImpl::SetFlingCurveParameters( | 1289 void RenderThreadImpl::SetFlingCurveParameters( |
| 1290 const std::vector<float>& new_touchpad, | 1290 const std::vector<float>& new_touchpad, |
| 1291 const std::vector<float>& new_touchscreen) { | 1291 const std::vector<float>& new_touchscreen) { |
| 1292 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, | 1292 webkit_platform_support_->SetFlingCurveParameters(new_touchpad, |
| 1293 new_touchscreen); | 1293 new_touchscreen); |
| 1294 | 1294 |
| 1295 } | 1295 } |
| 1296 | 1296 |
| 1297 } // namespace content | 1297 } // namespace content |
| OLD | NEW |