Chromium Code Reviews| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 #include "content/renderer/gamepad_shared_memory_reader.h" | 47 #include "content/renderer/gamepad_shared_memory_reader.h" |
| 48 #include "content/renderer/media/audio_decoder.h" | 48 #include "content/renderer/media/audio_decoder.h" |
| 49 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 49 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
| 50 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" | 50 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
| 51 #include "content/renderer/render_thread_impl.h" | 51 #include "content/renderer/render_thread_impl.h" |
| 52 #include "content/renderer/renderer_clipboard_delegate.h" | 52 #include "content/renderer/renderer_clipboard_delegate.h" |
| 53 #include "content/renderer/scheduler/renderer_scheduler.h" | 53 #include "content/renderer/scheduler/renderer_scheduler.h" |
| 54 #include "content/renderer/scheduler/web_scheduler_impl.h" | 54 #include "content/renderer/scheduler/web_scheduler_impl.h" |
| 55 #include "content/renderer/scheduler/webthread_impl_for_scheduler.h" | 55 #include "content/renderer/scheduler/webthread_impl_for_scheduler.h" |
| 56 #include "content/renderer/screen_orientation/screen_orientation_observer.h" | 56 #include "content/renderer/screen_orientation/screen_orientation_observer.h" |
| 57 #include "content/renderer/vr_dispatcher.h" | |
| 57 #include "content/renderer/webclipboard_impl.h" | 58 #include "content/renderer/webclipboard_impl.h" |
| 58 #include "content/renderer/webgraphicscontext3d_provider_impl.h" | 59 #include "content/renderer/webgraphicscontext3d_provider_impl.h" |
| 59 #include "content/renderer/webpublicsuffixlist_impl.h" | 60 #include "content/renderer/webpublicsuffixlist_impl.h" |
| 60 #include "gpu/config/gpu_info.h" | 61 #include "gpu/config/gpu_info.h" |
| 61 #include "ipc/ipc_sync_message_filter.h" | 62 #include "ipc/ipc_sync_message_filter.h" |
| 62 #include "media/audio/audio_output_device.h" | 63 #include "media/audio/audio_output_device.h" |
| 63 #include "media/base/audio_hardware_config.h" | 64 #include "media/base/audio_hardware_config.h" |
| 64 #include "media/base/key_systems.h" | 65 #include "media/base/key_systems.h" |
| 65 #include "media/blink/webcontentdecryptionmodule_impl.h" | 66 #include "media/blink/webcontentdecryptionmodule_impl.h" |
| 66 #include "media/filters/stream_parser_factory.h" | 67 #include "media/filters/stream_parser_factory.h" |
| 67 #include "net/base/mime_util.h" | 68 #include "net/base/mime_util.h" |
| 68 #include "net/base/net_util.h" | 69 #include "net/base/net_util.h" |
| 69 #include "storage/common/quota/quota_types.h" | 70 #include "storage/common/quota/quota_types.h" |
| 70 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h" | 71 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h" |
| 71 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 72 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
| 72 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h" | 73 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h" |
| 73 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" | 74 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" |
| 74 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" | 75 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" |
| 75 #include "third_party/WebKit/public/platform/WebFileInfo.h" | 76 #include "third_party/WebKit/public/platform/WebFileInfo.h" |
| 76 #include "third_party/WebKit/public/platform/WebGamepads.h" | 77 #include "third_party/WebKit/public/platform/WebGamepads.h" |
| 77 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 78 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
| 78 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" | 79 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" |
| 79 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" | 80 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" |
| 80 #include "third_party/WebKit/public/platform/WebURL.h" | 81 #include "third_party/WebKit/public/platform/WebURL.h" |
| 82 #include "third_party/WebKit/public/platform/WebVR.h" | |
| 81 #include "third_party/WebKit/public/platform/WebVector.h" | 83 #include "third_party/WebKit/public/platform/WebVector.h" |
| 82 #include "ui/gfx/color_profile.h" | 84 #include "ui/gfx/color_profile.h" |
| 83 #include "url/gurl.h" | 85 #include "url/gurl.h" |
| 84 | 86 |
| 85 #if defined(OS_ANDROID) | 87 #if defined(OS_ANDROID) |
| 86 #include "content/renderer/android/synchronous_compositor_factory.h" | 88 #include "content/renderer/android/synchronous_compositor_factory.h" |
| 87 #include "content/renderer/media/android/audio_decoder_android.h" | 89 #include "content/renderer/media/android/audio_decoder_android.h" |
| 88 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" | 90 #include "gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.h" |
| 89 #endif | 91 #endif |
| 90 | 92 |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 834 void RendererBlinkPlatformImpl::sampleGamepads(WebGamepads& gamepads) { | 836 void RendererBlinkPlatformImpl::sampleGamepads(WebGamepads& gamepads) { |
| 835 PlatformEventObserverBase* observer = | 837 PlatformEventObserverBase* observer = |
| 836 platform_event_observers_.Lookup(blink::WebPlatformEventGamepad); | 838 platform_event_observers_.Lookup(blink::WebPlatformEventGamepad); |
| 837 if (!observer) | 839 if (!observer) |
| 838 return; | 840 return; |
| 839 static_cast<RendererGamepadProvider*>(observer)->SampleGamepads(gamepads); | 841 static_cast<RendererGamepadProvider*>(observer)->SampleGamepads(gamepads); |
| 840 } | 842 } |
| 841 | 843 |
| 842 //------------------------------------------------------------------------------ | 844 //------------------------------------------------------------------------------ |
| 843 | 845 |
| 846 void RendererBlinkPlatformImpl::getVRDevices( | |
| 847 blink::WebVector<blink::WebVRDevice>* devices) { | |
|
no sievers
2015/03/26 19:55:15
Looks like all the APIs below check RenderThreadIm
| |
| 848 RenderThreadImpl::current()->vr_dispatcher()->GetVRDevices( | |
| 849 devices); | |
| 850 } | |
| 851 | |
| 852 void RendererBlinkPlatformImpl::getHMDSensorState( | |
| 853 unsigned index, blink::WebHMDSensorState& into) { | |
| 854 RenderThreadImpl::current()->vr_dispatcher()->GetSensorState(index, into); | |
| 855 } | |
| 856 | |
| 857 void RendererBlinkPlatformImpl::resetVRSensor(unsigned index) { | |
| 858 RenderThreadImpl::current()->vr_dispatcher()->ResetSensor(index); | |
| 859 } | |
| 860 | |
| 861 void RendererBlinkPlatformImpl::getVRRenderTargetRects(unsigned index, | |
| 862 blink::WebVRFieldOfView leftFov, | |
| 863 blink::WebVRFieldOfView rightFov, | |
| 864 blink::WebVRVector4* leftRect, | |
| 865 blink::WebVRVector4* rightRect) { | |
| 866 RenderThreadImpl::current()->vr_dispatcher()->GetRenderTargetRects( | |
| 867 index, leftFov, rightFov, leftRect, rightRect); | |
| 868 } | |
| 869 | |
| 870 //------------------------------------------------------------------------------ | |
| 871 | |
| 844 WebRTCPeerConnectionHandler* | 872 WebRTCPeerConnectionHandler* |
| 845 RendererBlinkPlatformImpl::createRTCPeerConnectionHandler( | 873 RendererBlinkPlatformImpl::createRTCPeerConnectionHandler( |
| 846 WebRTCPeerConnectionHandlerClient* client) { | 874 WebRTCPeerConnectionHandlerClient* client) { |
| 847 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 875 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
| 848 DCHECK(render_thread); | 876 DCHECK(render_thread); |
| 849 if (!render_thread) | 877 if (!render_thread) |
| 850 return NULL; | 878 return NULL; |
| 851 | 879 |
| 852 #if defined(ENABLE_WEBRTC) | 880 #if defined(ENABLE_WEBRTC) |
| 853 WebRTCPeerConnectionHandler* peer_connection_handler = | 881 WebRTCPeerConnectionHandler* peer_connection_handler = |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1201 //------------------------------------------------------------------------------ | 1229 //------------------------------------------------------------------------------ |
| 1202 | 1230 |
| 1203 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1231 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
| 1204 const blink::WebBatteryStatus& status) { | 1232 const blink::WebBatteryStatus& status) { |
| 1205 if (!g_test_battery_status_listener) | 1233 if (!g_test_battery_status_listener) |
| 1206 return; | 1234 return; |
| 1207 g_test_battery_status_listener->updateBatteryStatus(status); | 1235 g_test_battery_status_listener->updateBatteryStatus(status); |
| 1208 } | 1236 } |
| 1209 | 1237 |
| 1210 } // namespace content | 1238 } // namespace content |
| OLD | NEW |