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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" | 42 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" |
43 #include "content/renderer/gamepad_shared_memory_reader.h" | 43 #include "content/renderer/gamepad_shared_memory_reader.h" |
44 #include "content/renderer/media/audio_decoder.h" | 44 #include "content/renderer/media/audio_decoder.h" |
45 #include "content/renderer/media/crypto/key_systems.h" | 45 #include "content/renderer/media/crypto/key_systems.h" |
46 #include "content/renderer/media/media_stream_dependency_factory.h" | 46 #include "content/renderer/media/media_stream_dependency_factory.h" |
47 #include "content/renderer/media/renderer_webaudiodevice_impl.h" | 47 #include "content/renderer/media/renderer_webaudiodevice_impl.h" |
48 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" | 48 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" |
49 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" | 49 #include "content/renderer/media/webcontentdecryptionmodule_impl.h" |
50 #include "content/renderer/render_thread_impl.h" | 50 #include "content/renderer/render_thread_impl.h" |
51 #include "content/renderer/renderer_clipboard_client.h" | 51 #include "content/renderer/renderer_clipboard_client.h" |
| 52 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" |
52 #include "content/renderer/webclipboard_impl.h" | 53 #include "content/renderer/webclipboard_impl.h" |
53 #include "content/renderer/webcrypto/webcrypto_impl.h" | 54 #include "content/renderer/webcrypto/webcrypto_impl.h" |
54 #include "content/renderer/webgraphicscontext3d_provider_impl.h" | 55 #include "content/renderer/webgraphicscontext3d_provider_impl.h" |
55 #include "content/renderer/webpublicsuffixlist_impl.h" | 56 #include "content/renderer/webpublicsuffixlist_impl.h" |
56 #include "gpu/config/gpu_info.h" | 57 #include "gpu/config/gpu_info.h" |
57 #include "ipc/ipc_sync_message_filter.h" | 58 #include "ipc/ipc_sync_message_filter.h" |
58 #include "media/audio/audio_output_device.h" | 59 #include "media/audio/audio_output_device.h" |
59 #include "media/base/audio_hardware_config.h" | 60 #include "media/base/audio_hardware_config.h" |
60 #include "media/filters/stream_parser_factory.h" | 61 #include "media/filters/stream_parser_factory.h" |
61 #include "net/base/mime_util.h" | 62 #include "net/base/mime_util.h" |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 RenderThread::Get()->Send( | 1064 RenderThread::Get()->Send( |
1064 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds))); | 1065 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds))); |
1065 } | 1066 } |
1066 | 1067 |
1067 void RendererWebKitPlatformSupportImpl::cancelVibration() { | 1068 void RendererWebKitPlatformSupportImpl::cancelVibration() { |
1068 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); | 1069 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); |
1069 } | 1070 } |
1070 | 1071 |
1071 //------------------------------------------------------------------------------ | 1072 //------------------------------------------------------------------------------ |
1072 | 1073 |
| 1074 void RendererWebKitPlatformSupportImpl::setScreenOrientationListener( |
| 1075 blink::WebScreenOrientationListener* listener) { |
| 1076 if (!screen_orientation_dispatcher_) { |
| 1077 screen_orientation_dispatcher_.reset( |
| 1078 new ScreenOrientationDispatcher(RenderThread::Get())); |
| 1079 } |
| 1080 |
| 1081 screen_orientation_dispatcher_->setListener(listener); |
| 1082 } |
| 1083 |
| 1084 //------------------------------------------------------------------------------ |
| 1085 |
1073 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( | 1086 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( |
1074 const blink::WebURL& storage_partition, | 1087 const blink::WebURL& storage_partition, |
1075 blink::WebStorageQuotaType type, | 1088 blink::WebStorageQuotaType type, |
1076 blink::WebStorageQuotaCallbacks callbacks) { | 1089 blink::WebStorageQuotaCallbacks callbacks) { |
1077 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) | 1090 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) |
1078 return; | 1091 return; |
1079 QuotaDispatcher::ThreadSpecificInstance( | 1092 QuotaDispatcher::ThreadSpecificInstance( |
1080 thread_safe_sender_.get(), | 1093 thread_safe_sender_.get(), |
1081 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1094 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1082 storage_partition, | 1095 storage_partition, |
1083 static_cast<quota::StorageType>(type), | 1096 static_cast<quota::StorageType>(type), |
1084 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1097 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1085 } | 1098 } |
1086 | 1099 |
1087 } // namespace content | 1100 } // namespace content |
OLD | NEW |