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

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

Issue 177793003: Chromium plumbing for Screen Orientation API lock/unlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromium_plumbing_screen_orientation
Patch Set: fix compilation issue 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
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15 matching lines...) Expand all
26 #include "content/child/web_database_observer_impl.h" 26 #include "content/child/web_database_observer_impl.h"
27 #include "content/child/webblobregistry_impl.h" 27 #include "content/child/webblobregistry_impl.h"
28 #include "content/child/webfileutilities_impl.h" 28 #include "content/child/webfileutilities_impl.h"
29 #include "content/child/webmessageportchannel_impl.h" 29 #include "content/child/webmessageportchannel_impl.h"
30 #include "content/common/file_utilities_messages.h" 30 #include "content/common/file_utilities_messages.h"
31 #include "content/common/gpu/client/context_provider_command_buffer.h" 31 #include "content/common/gpu/client/context_provider_command_buffer.h"
32 #include "content/common/gpu/client/gpu_channel_host.h" 32 #include "content/common/gpu/client/gpu_channel_host.h"
33 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 33 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
34 #include "content/common/gpu/gpu_process_launch_causes.h" 34 #include "content/common/gpu/gpu_process_launch_causes.h"
35 #include "content/common/mime_registry_messages.h" 35 #include "content/common/mime_registry_messages.h"
36 #include "content/common/screen_orientation_messages.h"
36 #include "content/common/view_messages.h" 37 #include "content/common/view_messages.h"
37 #include "content/public/common/content_switches.h" 38 #include "content/public/common/content_switches.h"
38 #include "content/public/common/webplugininfo.h" 39 #include "content/public/common/webplugininfo.h"
39 #include "content/public/renderer/content_renderer_client.h" 40 #include "content/public/renderer/content_renderer_client.h"
40 #include "content/renderer/device_orientation/device_motion_event_pump.h" 41 #include "content/renderer/device_orientation/device_motion_event_pump.h"
41 #include "content/renderer/device_orientation/device_orientation_event_pump.h" 42 #include "content/renderer/device_orientation/device_orientation_event_pump.h"
42 #include "content/renderer/dom_storage/webstoragenamespace_impl.h" 43 #include "content/renderer/dom_storage/webstoragenamespace_impl.h"
43 #include "content/renderer/gamepad_shared_memory_reader.h" 44 #include "content/renderer/gamepad_shared_memory_reader.h"
44 #include "content/renderer/media/audio_decoder.h" 45 #include "content/renderer/media/audio_decoder.h"
45 #include "content/renderer/media/crypto/key_systems.h" 46 #include "content/renderer/media/crypto/key_systems.h"
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
1113 void RendererWebKitPlatformSupportImpl::setScreenOrientationListener( 1114 void RendererWebKitPlatformSupportImpl::setScreenOrientationListener(
1114 blink::WebScreenOrientationListener* listener) { 1115 blink::WebScreenOrientationListener* listener) {
1115 if (!screen_orientation_dispatcher_) { 1116 if (!screen_orientation_dispatcher_) {
1116 screen_orientation_dispatcher_.reset( 1117 screen_orientation_dispatcher_.reset(
1117 new ScreenOrientationDispatcher(RenderThread::Get())); 1118 new ScreenOrientationDispatcher(RenderThread::Get()));
1118 } 1119 }
1119 1120
1120 screen_orientation_dispatcher_->setListener(listener); 1121 screen_orientation_dispatcher_->setListener(listener);
1121 } 1122 }
1122 1123
1124 void RendererWebKitPlatformSupportImpl::lockOrientation(
1125 blink::WebScreenOrientations orientations) {
1126 RenderThread::Get()->Send(new ScreenOrientationHostMsg_Lock(orientations));
1127 }
1128
1129 void RendererWebKitPlatformSupportImpl::unlockOrientation() {
1130 RenderThread::Get()->Send(new ScreenOrientationHostMsg_Unlock);
1131 }
1132
1123 //------------------------------------------------------------------------------ 1133 //------------------------------------------------------------------------------
1124 1134
1125 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 1135 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
1126 const blink::WebURL& storage_partition, 1136 const blink::WebURL& storage_partition,
1127 blink::WebStorageQuotaType type, 1137 blink::WebStorageQuotaType type,
1128 blink::WebStorageQuotaCallbacks callbacks) { 1138 blink::WebStorageQuotaCallbacks callbacks) {
1129 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) 1139 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
1130 return; 1140 return;
1131 QuotaDispatcher::ThreadSpecificInstance( 1141 QuotaDispatcher::ThreadSpecificInstance(
1132 thread_safe_sender_.get(), 1142 thread_safe_sender_.get(),
1133 quota_message_filter_.get())->QueryStorageUsageAndQuota( 1143 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1134 storage_partition, 1144 storage_partition,
1135 static_cast<quota::StorageType>(type), 1145 static_cast<quota::StorageType>(type),
1136 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1146 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1137 } 1147 }
1138 1148
1139 } // namespace content 1149 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698