Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: content/renderer/renderer_webkitplatformsupport_impl.cc

Issue 20707002: Implement Device Orientation using shared memory in content/renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 #include "content/child/webmessageportchannel_impl.h" 24 #include "content/child/webmessageportchannel_impl.h"
25 #include "content/common/file_utilities_messages.h" 25 #include "content/common/file_utilities_messages.h"
26 #include "content/common/gpu/client/context_provider_command_buffer.h" 26 #include "content/common/gpu/client/context_provider_command_buffer.h"
27 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 27 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
28 #include "content/common/mime_registry_messages.h" 28 #include "content/common/mime_registry_messages.h"
29 #include "content/common/view_messages.h" 29 #include "content/common/view_messages.h"
30 #include "content/public/common/content_switches.h" 30 #include "content/public/common/content_switches.h"
31 #include "content/public/common/webplugininfo.h" 31 #include "content/public/common/webplugininfo.h"
32 #include "content/public/renderer/content_renderer_client.h" 32 #include "content/public/renderer/content_renderer_client.h"
33 #include "content/renderer/device_orientation/device_motion_event_pump.h" 33 #include "content/renderer/device_orientation/device_motion_event_pump.h"
34 #include "content/renderer/device_orientation/device_orientation_event_pump.h"
34 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 35 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
35 #include "content/renderer/gamepad_shared_memory_reader.h" 36 #include "content/renderer/gamepad_shared_memory_reader.h"
36 #include "content/renderer/hyphenator/hyphenator.h" 37 #include "content/renderer/hyphenator/hyphenator.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/WebHyphenator.h" 61 #include "third_party/WebKit/public/platform/WebHyphenator.h"
60 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" 62 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h"
61 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" 63 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h"
62 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" 64 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h"
63 #include "third_party/WebKit/public/platform/WebURL.h" 65 #include "third_party/WebKit/public/platform/WebURL.h"
64 #include "third_party/WebKit/public/platform/WebVector.h" 66 #include "third_party/WebKit/public/platform/WebVector.h"
65 #include "third_party/WebKit/public/web/WebFrame.h" 67 #include "third_party/WebKit/public/web/WebFrame.h"
66 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 68 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 } 1131 }
1130 1132
1131 // static 1133 // static
1132 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( 1134 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting(
1133 const WebKit::WebDeviceMotionData& data) { 1135 const WebKit::WebDeviceMotionData& data) {
1134 g_test_device_motion_data.Get() = data; 1136 g_test_device_motion_data.Get() = data;
1135 } 1137 }
1136 1138
1137 //------------------------------------------------------------------------------ 1139 //------------------------------------------------------------------------------
1138 1140
1141 void RendererWebKitPlatformSupportImpl::setDeviceOrientationListener(
1142 WebKit::WebDeviceOrientationListener* listener) {
1143 if (!device_orientation_event_pump_) {
1144 device_orientation_event_pump_.reset(new DeviceOrientationEventPump);
1145 device_orientation_event_pump_->Attach(RenderThreadImpl::current());
1146 }
1147 device_orientation_event_pump_->SetListener(listener);
1148 }
1149
1150 //------------------------------------------------------------------------------
1151
1139 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { 1152 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() {
1140 if (!web_crypto_) 1153 if (!web_crypto_)
1141 web_crypto_.reset(new WebCryptoImpl()); 1154 web_crypto_.reset(new WebCryptoImpl());
1142 return web_crypto_.get(); 1155 return web_crypto_.get();
1143 1156
1144 } 1157 }
1145 1158
1146 //------------------------------------------------------------------------------ 1159 //------------------------------------------------------------------------------
1147 1160
1148 #if defined(OS_ANDROID) 1161 #if defined(OS_ANDROID)
(...skipping 13 matching lines...) Expand all
1162 const WebKit::WebURL& storage_partition, 1175 const WebKit::WebURL& storage_partition,
1163 WebKit::WebStorageQuotaType type, 1176 WebKit::WebStorageQuotaType type,
1164 WebKit::WebStorageQuotaCallbacks* callbacks) { 1177 WebKit::WebStorageQuotaCallbacks* callbacks) {
1165 ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota( 1178 ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota(
1166 storage_partition, 1179 storage_partition,
1167 static_cast<quota::StorageType>(type), 1180 static_cast<quota::StorageType>(type),
1168 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1181 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1169 } 1182 }
1170 1183
1171 } // namespace content 1184 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698