| 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/renderer_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 #endif | 119 #endif |
| 120 | 120 |
| 121 #if defined(USE_AURA) | 121 #if defined(USE_AURA) |
| 122 #include "content/renderer/webscrollbarbehavior_impl_gtkoraura.h" | 122 #include "content/renderer/webscrollbarbehavior_impl_gtkoraura.h" |
| 123 #elif !defined(OS_MACOSX) | 123 #elif !defined(OS_MACOSX) |
| 124 #include "third_party/WebKit/public/platform/WebScrollbarBehavior.h" | 124 #include "third_party/WebKit/public/platform/WebScrollbarBehavior.h" |
| 125 #define WebScrollbarBehaviorImpl blink::WebScrollbarBehavior | 125 #define WebScrollbarBehaviorImpl blink::WebScrollbarBehavior |
| 126 #endif | 126 #endif |
| 127 | 127 |
| 128 #if defined(ENABLE_WEBRTC) | 128 #if defined(ENABLE_WEBRTC) |
| 129 #include "content/renderer/media/media_recorder_handler.h" |
| 129 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" | 130 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
| 130 #endif | 131 #endif |
| 131 | 132 |
| 132 using blink::Platform; | 133 using blink::Platform; |
| 133 using blink::WebAudioDevice; | 134 using blink::WebAudioDevice; |
| 134 using blink::WebBlobRegistry; | 135 using blink::WebBlobRegistry; |
| 135 using blink::WebDatabaseObserver; | 136 using blink::WebDatabaseObserver; |
| 136 using blink::WebFileInfo; | 137 using blink::WebFileInfo; |
| 137 using blink::WebFileSystem; | 138 using blink::WebFileSystem; |
| 138 using blink::WebGamepad; | 139 using blink::WebGamepad; |
| 139 using blink::WebGamepads; | 140 using blink::WebGamepads; |
| 140 using blink::WebIDBFactory; | 141 using blink::WebIDBFactory; |
| 141 using blink::WebMIDIAccessor; | 142 using blink::WebMIDIAccessor; |
| 143 using blink::WebMediaRecorderHandler; |
| 142 using blink::WebMediaStreamCenter; | 144 using blink::WebMediaStreamCenter; |
| 143 using blink::WebMediaStreamCenterClient; | 145 using blink::WebMediaStreamCenterClient; |
| 144 using blink::WebMimeRegistry; | 146 using blink::WebMimeRegistry; |
| 145 using blink::WebRTCPeerConnectionHandler; | 147 using blink::WebRTCPeerConnectionHandler; |
| 146 using blink::WebRTCPeerConnectionHandlerClient; | 148 using blink::WebRTCPeerConnectionHandlerClient; |
| 147 using blink::WebStorageNamespace; | 149 using blink::WebStorageNamespace; |
| 148 using blink::WebString; | 150 using blink::WebString; |
| 149 using blink::WebURL; | 151 using blink::WebURL; |
| 150 using blink::WebVector; | 152 using blink::WebVector; |
| 151 | 153 |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 858 | 860 |
| 859 void RendererBlinkPlatformImpl::sampleGamepads(WebGamepads& gamepads) { | 861 void RendererBlinkPlatformImpl::sampleGamepads(WebGamepads& gamepads) { |
| 860 PlatformEventObserverBase* observer = | 862 PlatformEventObserverBase* observer = |
| 861 platform_event_observers_.Lookup(blink::WebPlatformEventGamepad); | 863 platform_event_observers_.Lookup(blink::WebPlatformEventGamepad); |
| 862 if (!observer) | 864 if (!observer) |
| 863 return; | 865 return; |
| 864 static_cast<RendererGamepadProvider*>(observer)->SampleGamepads(gamepads); | 866 static_cast<RendererGamepadProvider*>(observer)->SampleGamepads(gamepads); |
| 865 } | 867 } |
| 866 | 868 |
| 867 //------------------------------------------------------------------------------ | 869 //------------------------------------------------------------------------------ |
| 870 WebMediaRecorderHandler* |
| 871 RendererBlinkPlatformImpl::createMediaRecorderHandler() { |
| 872 return new content::MediaRecorderHandler(); |
| 873 } |
| 874 |
| 875 //------------------------------------------------------------------------------ |
| 868 | 876 |
| 869 WebRTCPeerConnectionHandler* | 877 WebRTCPeerConnectionHandler* |
| 870 RendererBlinkPlatformImpl::createRTCPeerConnectionHandler( | 878 RendererBlinkPlatformImpl::createRTCPeerConnectionHandler( |
| 871 WebRTCPeerConnectionHandlerClient* client) { | 879 WebRTCPeerConnectionHandlerClient* client) { |
| 872 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 880 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
| 873 DCHECK(render_thread); | 881 DCHECK(render_thread); |
| 874 if (!render_thread) | 882 if (!render_thread) |
| 875 return NULL; | 883 return NULL; |
| 876 | 884 |
| 877 #if defined(ENABLE_WEBRTC) | 885 #if defined(ENABLE_WEBRTC) |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1237 //------------------------------------------------------------------------------ | 1245 //------------------------------------------------------------------------------ |
| 1238 | 1246 |
| 1239 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1247 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
| 1240 const blink::WebBatteryStatus& status) { | 1248 const blink::WebBatteryStatus& status) { |
| 1241 if (!g_test_battery_status_listener) | 1249 if (!g_test_battery_status_listener) |
| 1242 return; | 1250 return; |
| 1243 g_test_battery_status_listener->updateBatteryStatus(status); | 1251 g_test_battery_status_listener->updateBatteryStatus(status); |
| 1244 } | 1252 } |
| 1245 | 1253 |
| 1246 } // namespace content | 1254 } // namespace content |
| OLD | NEW |