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

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

Issue 176963016: Chromium plumbing for Screen Orientation API orientationchange events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 9 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 RenderThread::Get()->Send( 1103 RenderThread::Get()->Send(
1103 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds))); 1104 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds)));
1104 } 1105 }
1105 1106
1106 void RendererWebKitPlatformSupportImpl::cancelVibration() { 1107 void RendererWebKitPlatformSupportImpl::cancelVibration() {
1107 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); 1108 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration());
1108 } 1109 }
1109 1110
1110 //------------------------------------------------------------------------------ 1111 //------------------------------------------------------------------------------
1111 1112
1113 void RendererWebKitPlatformSupportImpl::setScreenOrientationListener(
1114 blink::WebScreenOrientationListener* listener) {
1115 if (!screen_orientation_dispatcher_) {
1116 screen_orientation_dispatcher_.reset(
1117 new ScreenOrientationDispatcher(RenderThread::Get()));
1118 }
1119
1120 screen_orientation_dispatcher_->setListener(listener);
1121 }
1122
1123 //------------------------------------------------------------------------------
1124
1112 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 1125 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
1113 const blink::WebURL& storage_partition, 1126 const blink::WebURL& storage_partition,
1114 blink::WebStorageQuotaType type, 1127 blink::WebStorageQuotaType type,
1115 blink::WebStorageQuotaCallbacks callbacks) { 1128 blink::WebStorageQuotaCallbacks callbacks) {
1116 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) 1129 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
1117 return; 1130 return;
1118 QuotaDispatcher::ThreadSpecificInstance( 1131 QuotaDispatcher::ThreadSpecificInstance(
1119 thread_safe_sender_.get(), 1132 thread_safe_sender_.get(),
1120 quota_message_filter_.get())->QueryStorageUsageAndQuota( 1133 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1121 storage_partition, 1134 storage_partition,
1122 static_cast<quota::StorageType>(type), 1135 static_cast<quota::StorageType>(type),
1123 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1136 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1124 } 1137 }
1125 1138
1126 } // namespace content 1139 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698