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

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

Powered by Google App Engine
This is Rietveld 408576698