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

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

Issue 164913004: Chromium plumbing for Screen Orientation API orientationchange events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 RenderThread::Get()->Send( 1072 RenderThread::Get()->Send(
1072 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds))); 1073 new ViewHostMsg_Vibrate(base::checked_cast<int64>(milliseconds)));
1073 } 1074 }
1074 1075
1075 void RendererWebKitPlatformSupportImpl::cancelVibration() { 1076 void RendererWebKitPlatformSupportImpl::cancelVibration() {
1076 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); 1077 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration());
1077 } 1078 }
1078 1079
1079 //------------------------------------------------------------------------------ 1080 //------------------------------------------------------------------------------
1080 1081
1082 void RendererWebKitPlatformSupportImpl::setScreenOrientationListener(
1083 blink::WebScreenOrientationListener* listener) {
1084 if (!screen_orientation_dispatcher_) {
1085 screen_orientation_dispatcher_.reset(
1086 new ScreenOrientationDispatcher(RenderThread::Get()));
1087 }
1088
1089 screen_orientation_dispatcher_->setListener(listener);
1090 }
1091
1092 //------------------------------------------------------------------------------
1093
1081 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 1094 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
1082 const blink::WebURL& storage_partition, 1095 const blink::WebURL& storage_partition,
1083 blink::WebStorageQuotaType type, 1096 blink::WebStorageQuotaType type,
1084 blink::WebStorageQuotaCallbacks callbacks) { 1097 blink::WebStorageQuotaCallbacks callbacks) {
1085 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) 1098 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
1086 return; 1099 return;
1087 QuotaDispatcher::ThreadSpecificInstance( 1100 QuotaDispatcher::ThreadSpecificInstance(
1088 thread_safe_sender_.get(), 1101 thread_safe_sender_.get(),
1089 quota_message_filter_.get())->QueryStorageUsageAndQuota( 1102 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1090 storage_partition, 1103 storage_partition,
1091 static_cast<quota::StorageType>(type), 1104 static_cast<quota::StorageType>(type),
1092 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1105 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1093 } 1106 }
1094 1107
1095 } // namespace content 1108 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698