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

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: Fixed clang compile issues and updated by review comments. Created 7 years, 1 month 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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1026 1026
1027 blink::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { 1027 blink::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() {
1028 if (!web_crypto_) 1028 if (!web_crypto_)
1029 web_crypto_.reset(new WebCryptoImpl()); 1029 web_crypto_.reset(new WebCryptoImpl());
1030 return web_crypto_.get(); 1030 return web_crypto_.get();
1031 1031
1032 } 1032 }
1033 1033
1034 //------------------------------------------------------------------------------ 1034 //------------------------------------------------------------------------------
1035 1035
1036 #if defined(OS_ANDROID)
1037 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { 1036 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) {
1038 RenderThread::Get()->Send( 1037 RenderThread::Get()->Send(
1039 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds))); 1038 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds)));
1040 } 1039 }
1041 1040
1042 void RendererWebKitPlatformSupportImpl::cancelVibration() { 1041 void RendererWebKitPlatformSupportImpl::cancelVibration() {
1043 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); 1042 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration());
1044 } 1043 }
1045 #endif // defined(OS_ANDROID)
1046 1044
1047 //------------------------------------------------------------------------------ 1045 //------------------------------------------------------------------------------
1048 1046
1049 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 1047 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
1050 const blink::WebURL& storage_partition, 1048 const blink::WebURL& storage_partition,
1051 blink::WebStorageQuotaType type, 1049 blink::WebStorageQuotaType type,
1052 blink::WebStorageQuotaCallbacks* callbacks) { 1050 blink::WebStorageQuotaCallbacks* callbacks) {
1053 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) 1051 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
1054 return; 1052 return;
1055 QuotaDispatcher::ThreadSpecificInstance( 1053 QuotaDispatcher::ThreadSpecificInstance(
1056 thread_safe_sender_.get(), 1054 thread_safe_sender_.get(),
1057 quota_message_filter_.get())->QueryStorageUsageAndQuota( 1055 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1058 storage_partition, 1056 storage_partition,
1059 static_cast<quota::StorageType>(type), 1057 static_cast<quota::StorageType>(type),
1060 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1058 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1061 } 1059 }
1062 1060
1063 } // namespace content 1061 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698