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/hyphenator/hyphenator.h" | 38 #include "content/renderer/hyphenator/hyphenator.h" |
38 #include "content/renderer/media/audio_decoder.h" | 39 #include "content/renderer/media/audio_decoder.h" |
39 #include "content/renderer/media/crypto/key_systems.h" | 40 #include "content/renderer/media/crypto/key_systems.h" |
40 #include "content/renderer/media/media_stream_dependency_factory.h" | 41 #include "content/renderer/media/media_stream_dependency_factory.h" |
41 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 42 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
42 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" | 43 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
43 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" | 44 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" |
44 #include "content/renderer/render_thread_impl.h" | 45 #include "content/renderer/render_thread_impl.h" |
45 #include "content/renderer/renderer_clipboard_client.h" | 46 #include "content/renderer/renderer_clipboard_client.h" |
46 #include "content/renderer/webclipboard_impl.h" | 47 #include "content/renderer/webclipboard_impl.h" |
47 #include "content/renderer/webcrypto_impl.h" | 48 #include "content/renderer/webcrypto_impl.h" |
48 #include "content/renderer/websharedworkerrepository_impl.h" | 49 #include "content/renderer/websharedworkerrepository_impl.h" |
49 #include "gpu/config/gpu_info.h" | 50 #include "gpu/config/gpu_info.h" |
50 #include "ipc/ipc_sync_message_filter.h" | 51 #include "ipc/ipc_sync_message_filter.h" |
51 #include "media/audio/audio_output_device.h" | 52 #include "media/audio/audio_output_device.h" |
52 #include "media/base/audio_hardware_config.h" | 53 #include "media/base/audio_hardware_config.h" |
53 #include "media/filters/stream_parser_factory.h" | 54 #include "media/filters/stream_parser_factory.h" |
54 #include "net/base/mime_util.h" | 55 #include "net/base/mime_util.h" |
55 #include "net/base/net_util.h" | 56 #include "net/base/net_util.h" |
56 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" | 57 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" |
57 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" | 58 #include "third_party/WebKit/public/platform/WebDeviceMotionListener.h" |
| 59 #include "third_party/WebKit/public/platform/WebDeviceOrientationListener.h" |
58 #include "third_party/WebKit/public/platform/WebFileInfo.h" | 60 #include "third_party/WebKit/public/platform/WebFileInfo.h" |
59 #include "third_party/WebKit/public/platform/WebGamepads.h" | 61 #include "third_party/WebKit/public/platform/WebGamepads.h" |
60 #include "third_party/WebKit/public/platform/WebHyphenator.h" | 62 #include "third_party/WebKit/public/platform/WebHyphenator.h" |
61 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" | 63 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" |
62 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" | 64 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" |
63 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" | 65 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" |
64 #include "third_party/WebKit/public/platform/WebURL.h" | 66 #include "third_party/WebKit/public/platform/WebURL.h" |
65 #include "third_party/WebKit/public/platform/WebVector.h" | 67 #include "third_party/WebKit/public/platform/WebVector.h" |
66 #include "third_party/WebKit/public/web/WebFrame.h" | 68 #include "third_party/WebKit/public/web/WebFrame.h" |
67 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 69 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1101 } | 1103 } |
1102 | 1104 |
1103 // static | 1105 // static |
1104 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( | 1106 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( |
1105 const WebKit::WebDeviceMotionData& data) { | 1107 const WebKit::WebDeviceMotionData& data) { |
1106 g_test_device_motion_data.Get() = data; | 1108 g_test_device_motion_data.Get() = data; |
1107 } | 1109 } |
1108 | 1110 |
1109 //------------------------------------------------------------------------------ | 1111 //------------------------------------------------------------------------------ |
1110 | 1112 |
| 1113 void RendererWebKitPlatformSupportImpl::setDeviceOrientationListener( |
| 1114 WebKit::WebDeviceOrientationListener* listener) { |
| 1115 if (!device_orientation_event_pump_) { |
| 1116 device_orientation_event_pump_.reset(new DeviceOrientationEventPump); |
| 1117 device_orientation_event_pump_->Attach(RenderThreadImpl::current()); |
| 1118 } |
| 1119 device_orientation_event_pump_->SetListener(listener); |
| 1120 } |
| 1121 |
| 1122 //------------------------------------------------------------------------------ |
| 1123 |
1111 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { | 1124 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { |
1112 // Use a mock implementation for testing in-progress work. | 1125 // Use a mock implementation for testing in-progress work. |
1113 WebKit::WebCrypto* crypto = | 1126 WebKit::WebCrypto* crypto = |
1114 GetContentClient()->renderer()->OverrideWebCrypto(); | 1127 GetContentClient()->renderer()->OverrideWebCrypto(); |
1115 if (crypto) | 1128 if (crypto) |
1116 return crypto; | 1129 return crypto; |
1117 | 1130 |
1118 if (!web_crypto_) | 1131 if (!web_crypto_) |
1119 web_crypto_.reset(new WebCryptoImpl()); | 1132 web_crypto_.reset(new WebCryptoImpl()); |
1120 return web_crypto_.get(); | 1133 return web_crypto_.get(); |
(...skipping 23 matching lines...) Expand all Loading... |
1144 return; | 1157 return; |
1145 QuotaDispatcher::ThreadSpecificInstance( | 1158 QuotaDispatcher::ThreadSpecificInstance( |
1146 thread_safe_sender_.get(), | 1159 thread_safe_sender_.get(), |
1147 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1160 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1148 storage_partition, | 1161 storage_partition, |
1149 static_cast<quota::StorageType>(type), | 1162 static_cast<quota::StorageType>(type), |
1150 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1163 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1151 } | 1164 } |
1152 | 1165 |
1153 } // namespace content | 1166 } // namespace content |
OLD | NEW |