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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 RenderThread::Get()->Send( | 1057 RenderThread::Get()->Send( |
1057 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds))); | 1058 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds))); |
1058 } | 1059 } |
1059 | 1060 |
1060 void RendererWebKitPlatformSupportImpl::cancelVibration() { | 1061 void RendererWebKitPlatformSupportImpl::cancelVibration() { |
1061 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); | 1062 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); |
1062 } | 1063 } |
1063 | 1064 |
1064 //------------------------------------------------------------------------------ | 1065 //------------------------------------------------------------------------------ |
1065 | 1066 |
| 1067 void RendererWebKitPlatformSupportImpl::setScreenOrientationListener( |
| 1068 blink::WebScreenOrientationListener* listener) { |
| 1069 if (!screen_orientation_dispatcher_) { |
| 1070 screen_orientation_dispatcher_.reset( |
| 1071 new ScreenOrientationDispatcher(RenderThreadImpl::current())); |
| 1072 } |
| 1073 |
| 1074 screen_orientation_dispatcher_->setListener(listener); |
| 1075 } |
| 1076 |
| 1077 //------------------------------------------------------------------------------ |
| 1078 |
1066 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( | 1079 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( |
1067 const blink::WebURL& storage_partition, | 1080 const blink::WebURL& storage_partition, |
1068 blink::WebStorageQuotaType type, | 1081 blink::WebStorageQuotaType type, |
1069 blink::WebStorageQuotaCallbacks callbacks) { | 1082 blink::WebStorageQuotaCallbacks callbacks) { |
1070 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) | 1083 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) |
1071 return; | 1084 return; |
1072 QuotaDispatcher::ThreadSpecificInstance( | 1085 QuotaDispatcher::ThreadSpecificInstance( |
1073 thread_safe_sender_.get(), | 1086 thread_safe_sender_.get(), |
1074 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1087 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1075 storage_partition, | 1088 storage_partition, |
1076 static_cast<quota::StorageType>(type), | 1089 static_cast<quota::StorageType>(type), |
1077 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1090 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1078 } | 1091 } |
1079 | 1092 |
1080 } // namespace content | 1093 } // namespace content |
OLD | NEW |