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

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

Issue 23496051: Make VibrationMessageFilter available to other platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and added contact info for override APIs. Created 7 years 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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 1042
1043 blink::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { 1043 blink::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() {
1044 if (!web_crypto_) 1044 if (!web_crypto_)
1045 web_crypto_.reset(new WebCryptoImpl()); 1045 web_crypto_.reset(new WebCryptoImpl());
1046 return web_crypto_.get(); 1046 return web_crypto_.get();
1047 1047
1048 } 1048 }
1049 1049
1050 //------------------------------------------------------------------------------ 1050 //------------------------------------------------------------------------------
1051 1051
1052 #if defined(OS_ANDROID)
1053 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { 1052 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) {
1054 RenderThread::Get()->Send( 1053 RenderThread::Get()->Send(
1055 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds))); 1054 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds)));
1056 } 1055 }
1057 1056
1058 void RendererWebKitPlatformSupportImpl::cancelVibration() { 1057 void RendererWebKitPlatformSupportImpl::cancelVibration() {
1059 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); 1058 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration());
1060 } 1059 }
1061 #endif // defined(OS_ANDROID)
1062 1060
1063 //------------------------------------------------------------------------------ 1061 //------------------------------------------------------------------------------
1064 1062
1065 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 1063 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
1066 const blink::WebURL& storage_partition, 1064 const blink::WebURL& storage_partition,
1067 blink::WebStorageQuotaType type, 1065 blink::WebStorageQuotaType type,
1068 blink::WebStorageQuotaCallbacks* callbacks) { 1066 blink::WebStorageQuotaCallbacks* callbacks) {
1069 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) 1067 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
1070 return; 1068 return;
1071 QuotaDispatcher::ThreadSpecificInstance( 1069 QuotaDispatcher::ThreadSpecificInstance(
1072 thread_safe_sender_.get(), 1070 thread_safe_sender_.get(),
1073 quota_message_filter_.get())->QueryStorageUsageAndQuota( 1071 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1074 storage_partition, 1072 storage_partition,
1075 static_cast<quota::StorageType>(type), 1073 static_cast<quota::StorageType>(type),
1076 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1074 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1077 } 1075 }
1078 1076
1079 } // namespace content 1077 } // 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