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_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_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/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 | 877 |
878 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() { | 878 WebBlobRegistry* RendererWebKitPlatformSupportImpl::blobRegistry() { |
879 // blob_registry_ can be NULL when running some tests. | 879 // blob_registry_ can be NULL when running some tests. |
880 return blob_registry_.get(); | 880 return blob_registry_.get(); |
881 } | 881 } |
882 | 882 |
883 //------------------------------------------------------------------------------ | 883 //------------------------------------------------------------------------------ |
884 | 884 |
885 void RendererWebKitPlatformSupportImpl::sampleGamepads(WebGamepads& gamepads) { | 885 void RendererWebKitPlatformSupportImpl::sampleGamepads(WebGamepads& gamepads) { |
886 if (g_test_gamepads == 0) { | 886 if (g_test_gamepads == 0) { |
887 RenderThreadImpl::current()->SampleGamepads(&gamepads); | 887 RenderThreadImpl::current()->gamepad_shared_memory_reader()-> |
| 888 SampleGamepads(gamepads); |
888 } else { | 889 } else { |
889 gamepads = g_test_gamepads.Get(); | 890 gamepads = g_test_gamepads.Get(); |
890 } | 891 } |
891 } | 892 } |
892 | 893 |
893 void RendererWebKitPlatformSupportImpl::setGamepadListener( | 894 void RendererWebKitPlatformSupportImpl::setGamepadListener( |
894 blink::WebGamepadListener* listener) { | 895 blink::WebGamepadListener* listener) { |
895 web_gamepad_listener = listener; | 896 web_gamepad_listener = listener; |
| 897 RenderThreadImpl::current()->gamepad_shared_memory_reader()-> |
| 898 SetGamepadListener(listener); |
896 } | 899 } |
897 | 900 |
898 //------------------------------------------------------------------------------ | 901 //------------------------------------------------------------------------------ |
899 | 902 |
900 WebRTCPeerConnectionHandler* | 903 WebRTCPeerConnectionHandler* |
901 RendererWebKitPlatformSupportImpl::createRTCPeerConnectionHandler( | 904 RendererWebKitPlatformSupportImpl::createRTCPeerConnectionHandler( |
902 WebRTCPeerConnectionHandlerClient* client) { | 905 WebRTCPeerConnectionHandlerClient* client) { |
903 RenderThreadImpl* render_thread = RenderThreadImpl::current(); | 906 RenderThreadImpl* render_thread = RenderThreadImpl::current(); |
904 DCHECK(render_thread); | 907 DCHECK(render_thread); |
905 if (!render_thread) | 908 if (!render_thread) |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1173 return; | 1176 return; |
1174 QuotaDispatcher::ThreadSpecificInstance( | 1177 QuotaDispatcher::ThreadSpecificInstance( |
1175 thread_safe_sender_.get(), | 1178 thread_safe_sender_.get(), |
1176 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1179 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1177 storage_partition, | 1180 storage_partition, |
1178 static_cast<quota::StorageType>(type), | 1181 static_cast<quota::StorageType>(type), |
1179 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1182 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1180 } | 1183 } |
1181 | 1184 |
1182 } // namespace content | 1185 } // namespace content |
OLD | NEW |