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 14 matching lines...) Expand all Loading... |
25 #include "content/child/webmessageportchannel_impl.h" | 25 #include "content/child/webmessageportchannel_impl.h" |
26 #include "content/common/file_utilities_messages.h" | 26 #include "content/common/file_utilities_messages.h" |
27 #include "content/common/gpu/client/context_provider_command_buffer.h" | 27 #include "content/common/gpu/client/context_provider_command_buffer.h" |
28 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 28 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
29 #include "content/common/mime_registry_messages.h" | 29 #include "content/common/mime_registry_messages.h" |
30 #include "content/common/view_messages.h" | 30 #include "content/common/view_messages.h" |
31 #include "content/public/common/content_switches.h" | 31 #include "content/public/common/content_switches.h" |
32 #include "content/public/common/webplugininfo.h" | 32 #include "content/public/common/webplugininfo.h" |
33 #include "content/public/renderer/content_renderer_client.h" | 33 #include "content/public/renderer/content_renderer_client.h" |
34 #include "content/renderer/device_orientation/device_motion_event_pump.h" | 34 #include "content/renderer/device_orientation/device_motion_event_pump.h" |
| 35 #include "content/renderer/device_orientation/device_orientation_event_pump.h" |
35 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 36 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
36 #include "content/renderer/gamepad_shared_memory_reader.h" | 37 #include "content/renderer/gamepad_shared_memory_reader.h" |
37 #include "content/renderer/media/audio_decoder.h" | 38 #include "content/renderer/media/audio_decoder.h" |
38 #include "content/renderer/media/crypto/key_systems.h" | 39 #include "content/renderer/media/crypto/key_systems.h" |
39 #include "content/renderer/media/media_stream_dependency_factory.h" | 40 #include "content/renderer/media/media_stream_dependency_factory.h" |
40 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 41 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
41 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" | 42 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
42 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" | 43 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" |
43 #include "content/renderer/render_thread_impl.h" | 44 #include "content/renderer/render_thread_impl.h" |
44 #include "content/renderer/renderer_clipboard_client.h" | 45 #include "content/renderer/renderer_clipboard_client.h" |
45 #include "content/renderer/webclipboard_impl.h" | 46 #include "content/renderer/webclipboard_impl.h" |
46 #include "content/renderer/webcrypto_impl.h" | 47 #include "content/renderer/webcrypto_impl.h" |
47 #include "content/renderer/websharedworkerrepository_impl.h" | 48 #include "content/renderer/websharedworkerrepository_impl.h" |
48 #include "gpu/config/gpu_info.h" | 49 #include "gpu/config/gpu_info.h" |
49 #include "ipc/ipc_sync_message_filter.h" | 50 #include "ipc/ipc_sync_message_filter.h" |
50 #include "media/audio/audio_output_device.h" | 51 #include "media/audio/audio_output_device.h" |
51 #include "media/base/audio_hardware_config.h" | 52 #include "media/base/audio_hardware_config.h" |
52 #include "media/filters/stream_parser_factory.h" | 53 #include "media/filters/stream_parser_factory.h" |
53 #include "net/base/mime_util.h" | 54 #include "net/base/mime_util.h" |
54 #include "net/base/net_util.h" | 55 #include "net/base/net_util.h" |
55 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 56 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
56 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" | 57 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" |
| 58 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" |
57 #include "third_party/WebKit/public/platform/WebFileInfo.h" | 59 #include "third_party/WebKit/public/platform/WebFileInfo.h" |
58 #include "third_party/WebKit/public/platform/WebGamepads.h" | 60 #include "third_party/WebKit/public/platform/WebGamepads.h" |
59 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 61 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
60 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" | 62 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" |
61 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" | 63 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" |
62 #include "third_party/WebKit/public/platform/WebURL.h" | 64 #include "third_party/WebKit/public/platform/WebURL.h" |
63 #include "third_party/WebKit/public/platform/WebVector.h" | 65 #include "third_party/WebKit/public/platform/WebVector.h" |
64 #include "third_party/WebKit/public/web/WebFrame.h" | 66 #include "third_party/WebKit/public/web/WebFrame.h" |
65 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 67 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
66 #include "url/gurl.h" | 68 #include "url/gurl.h" |
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 } | 1038 } |
1037 | 1039 |
1038 // static | 1040 // static |
1039 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( | 1041 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( |
1040 const WebKit::WebDeviceMotionData& data) { | 1042 const WebKit::WebDeviceMotionData& data) { |
1041 g_test_device_motion_data.Get() = data; | 1043 g_test_device_motion_data.Get() = data; |
1042 } | 1044 } |
1043 | 1045 |
1044 //------------------------------------------------------------------------------ | 1046 //------------------------------------------------------------------------------ |
1045 | 1047 |
| 1048 void RendererWebKitPlatformSupportImpl::setDeviceOrientationListener( |
| 1049 WebKit::WebDeviceOrientationListener* listener) { |
| 1050 if (!device_orientation_event_pump_) { |
| 1051 device_orientation_event_pump_.reset(new DeviceOrientationEventPump); |
| 1052 device_orientation_event_pump_->Attach(RenderThreadImpl::current()); |
| 1053 } |
| 1054 device_orientation_event_pump_->SetListener(listener); |
| 1055 } |
| 1056 |
| 1057 //------------------------------------------------------------------------------ |
| 1058 |
1046 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { | 1059 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { |
1047 // Use a mock implementation for testing in-progress work. | 1060 // Use a mock implementation for testing in-progress work. |
1048 WebKit::WebCrypto* crypto = | 1061 WebKit::WebCrypto* crypto = |
1049 GetContentClient()->renderer()->OverrideWebCrypto(); | 1062 GetContentClient()->renderer()->OverrideWebCrypto(); |
1050 if (crypto) | 1063 if (crypto) |
1051 return crypto; | 1064 return crypto; |
1052 | 1065 |
1053 if (!web_crypto_) | 1066 if (!web_crypto_) |
1054 web_crypto_.reset(new WebCryptoImpl()); | 1067 web_crypto_.reset(new WebCryptoImpl()); |
1055 return web_crypto_.get(); | 1068 return web_crypto_.get(); |
(...skipping 23 matching lines...) Expand all Loading... |
1079 return; | 1092 return; |
1080 QuotaDispatcher::ThreadSpecificInstance( | 1093 QuotaDispatcher::ThreadSpecificInstance( |
1081 thread_safe_sender_.get(), | 1094 thread_safe_sender_.get(), |
1082 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1095 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1083 storage_partition, | 1096 storage_partition, |
1084 static_cast<quota::StorageType>(type), | 1097 static_cast<quota::StorageType>(type), |
1085 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1098 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1086 } | 1099 } |
1087 | 1100 |
1088 } // namespace content | 1101 } // namespace content |
OLD | NEW |