| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 #include "content/public/renderer/content_renderer_client.h" | 51 #include "content/public/renderer/content_renderer_client.h" |
| 52 #include "content/renderer/battery_status/battery_status_dispatcher.h" | 52 #include "content/renderer/battery_status/battery_status_dispatcher.h" |
| 53 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" | 53 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" |
| 54 #include "content/renderer/device_sensors/device_light_event_pump.h" | 54 #include "content/renderer/device_sensors/device_light_event_pump.h" |
| 55 #include "content/renderer/device_sensors/device_motion_event_pump.h" | 55 #include "content/renderer/device_sensors/device_motion_event_pump.h" |
| 56 #include "content/renderer/device_sensors/device_orientation_absolute_event_pump
.h" | 56 #include "content/renderer/device_sensors/device_orientation_absolute_event_pump
.h" |
| 57 #include "content/renderer/device_sensors/device_orientation_event_pump.h" | 57 #include "content/renderer/device_sensors/device_orientation_event_pump.h" |
| 58 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 58 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
| 59 #include "content/renderer/gamepad_shared_memory_reader.h" | 59 #include "content/renderer/gamepad_shared_memory_reader.h" |
| 60 #include "content/renderer/media/audio_decoder.h" | 60 #include "content/renderer/media/audio_decoder.h" |
| 61 #include "content/renderer/media/canvas_capture_handler.h" |
| 61 #include "content/renderer/media/media_recorder_handler.h" | 62 #include "content/renderer/media/media_recorder_handler.h" |
| 62 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 63 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
| 63 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" | 64 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
| 64 #include "content/renderer/media/rtc_certificate_generator.h" | 65 #include "content/renderer/media/rtc_certificate_generator.h" |
| 65 #include "content/renderer/render_thread_impl.h" | 66 #include "content/renderer/render_thread_impl.h" |
| 66 #include "content/renderer/renderer_clipboard_delegate.h" | 67 #include "content/renderer/renderer_clipboard_delegate.h" |
| 67 #include "content/renderer/screen_orientation/screen_orientation_observer.h" | 68 #include "content/renderer/screen_orientation/screen_orientation_observer.h" |
| 68 #include "content/renderer/webclipboard_impl.h" | 69 #include "content/renderer/webclipboard_impl.h" |
| 69 #include "content/renderer/webgraphicscontext3d_provider_impl.h" | 70 #include "content/renderer/webgraphicscontext3d_provider_impl.h" |
| 70 #include "content/renderer/webpublicsuffixlist_impl.h" | 71 #include "content/renderer/webpublicsuffixlist_impl.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 #define WebScrollbarBehaviorImpl blink::WebScrollbarBehavior | 132 #define WebScrollbarBehaviorImpl blink::WebScrollbarBehavior |
| 132 #endif | 133 #endif |
| 133 | 134 |
| 134 #if defined(ENABLE_WEBRTC) | 135 #if defined(ENABLE_WEBRTC) |
| 135 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" | 136 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" |
| 136 #endif | 137 #endif |
| 137 | 138 |
| 138 using blink::Platform; | 139 using blink::Platform; |
| 139 using blink::WebAudioDevice; | 140 using blink::WebAudioDevice; |
| 140 using blink::WebBlobRegistry; | 141 using blink::WebBlobRegistry; |
| 142 using blink::WebCanvasCaptureHandler; |
| 141 using blink::WebDatabaseObserver; | 143 using blink::WebDatabaseObserver; |
| 142 using blink::WebFileInfo; | 144 using blink::WebFileInfo; |
| 143 using blink::WebFileSystem; | 145 using blink::WebFileSystem; |
| 144 using blink::WebGamepad; | 146 using blink::WebGamepad; |
| 145 using blink::WebGamepads; | 147 using blink::WebGamepads; |
| 146 using blink::WebIDBFactory; | 148 using blink::WebIDBFactory; |
| 147 using blink::WebMIDIAccessor; | 149 using blink::WebMIDIAccessor; |
| 148 using blink::WebMediaRecorderHandler; | 150 using blink::WebMediaRecorderHandler; |
| 151 using blink::WebMediaStream; |
| 149 using blink::WebMediaStreamCenter; | 152 using blink::WebMediaStreamCenter; |
| 150 using blink::WebMediaStreamCenterClient; | 153 using blink::WebMediaStreamCenterClient; |
| 151 using blink::WebMimeRegistry; | 154 using blink::WebMimeRegistry; |
| 152 using blink::WebRTCPeerConnectionHandler; | 155 using blink::WebRTCPeerConnectionHandler; |
| 153 using blink::WebRTCPeerConnectionHandlerClient; | 156 using blink::WebRTCPeerConnectionHandlerClient; |
| 154 using blink::WebStorageNamespace; | 157 using blink::WebStorageNamespace; |
| 158 using blink::WebSize; |
| 155 using blink::WebString; | 159 using blink::WebString; |
| 156 using blink::WebURL; | 160 using blink::WebURL; |
| 157 using blink::WebVector; | 161 using blink::WebVector; |
| 158 | 162 |
| 159 namespace content { | 163 namespace content { |
| 160 | 164 |
| 161 namespace { | 165 namespace { |
| 162 | 166 |
| 163 bool g_sandbox_enabled = true; | 167 bool g_sandbox_enabled = true; |
| 164 double g_test_device_light_data = -1; | 168 double g_test_device_light_data = -1; |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 | 938 |
| 935 // static | 939 // static |
| 936 bool RendererBlinkPlatformImpl::SetSandboxEnabledForTesting(bool enable) { | 940 bool RendererBlinkPlatformImpl::SetSandboxEnabledForTesting(bool enable) { |
| 937 bool was_enabled = g_sandbox_enabled; | 941 bool was_enabled = g_sandbox_enabled; |
| 938 g_sandbox_enabled = enable; | 942 g_sandbox_enabled = enable; |
| 939 return was_enabled; | 943 return was_enabled; |
| 940 } | 944 } |
| 941 | 945 |
| 942 //------------------------------------------------------------------------------ | 946 //------------------------------------------------------------------------------ |
| 943 | 947 |
| 948 WebCanvasCaptureHandler* RendererBlinkPlatformImpl::createCanvasCaptureHandler( |
| 949 const WebSize& size, |
| 950 WebMediaStream* stream) { |
| 951 return new CanvasCaptureHandler(size, stream); |
| 952 } |
| 953 |
| 954 //------------------------------------------------------------------------------ |
| 955 |
| 944 blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::createSpeechSynthesizer( | 956 blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::createSpeechSynthesizer( |
| 945 blink::WebSpeechSynthesizerClient* client) { | 957 blink::WebSpeechSynthesizerClient* client) { |
| 946 return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client); | 958 return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client); |
| 947 } | 959 } |
| 948 | 960 |
| 949 //------------------------------------------------------------------------------ | 961 //------------------------------------------------------------------------------ |
| 950 | 962 |
| 951 blink::WebGraphicsContext3D* | 963 blink::WebGraphicsContext3D* |
| 952 RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D( | 964 RendererBlinkPlatformImpl::createOffscreenGraphicsContext3D( |
| 953 const blink::WebGraphicsContext3D::Attributes& attributes) { | 965 const blink::WebGraphicsContext3D::Attributes& attributes) { |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 //------------------------------------------------------------------------------ | 1287 //------------------------------------------------------------------------------ |
| 1276 | 1288 |
| 1277 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1289 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
| 1278 const blink::WebBatteryStatus& status) { | 1290 const blink::WebBatteryStatus& status) { |
| 1279 if (!g_test_battery_status_listener) | 1291 if (!g_test_battery_status_listener) |
| 1280 return; | 1292 return; |
| 1281 g_test_battery_status_listener->updateBatteryStatus(status); | 1293 g_test_battery_status_listener->updateBatteryStatus(status); |
| 1282 } | 1294 } |
| 1283 | 1295 |
| 1284 } // namespace content | 1296 } // namespace content |
| OLD | NEW |