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

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: Updated patch by review comments. Created 7 years, 3 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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 return crypto; 1046 return crypto;
1047 1047
1048 if (!web_crypto_) 1048 if (!web_crypto_)
1049 web_crypto_.reset(new WebCryptoImpl()); 1049 web_crypto_.reset(new WebCryptoImpl());
1050 return web_crypto_.get(); 1050 return web_crypto_.get();
1051 1051
1052 } 1052 }
1053 1053
1054 //------------------------------------------------------------------------------ 1054 //------------------------------------------------------------------------------
1055 1055
1056 #if defined(OS_ANDROID)
1057 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { 1056 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) {
1058 RenderThread::Get()->Send( 1057 RenderThread::Get()->Send(
1059 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds))); 1058 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds)));
1060 } 1059 }
1061 1060
1062 void RendererWebKitPlatformSupportImpl::cancelVibration() { 1061 void RendererWebKitPlatformSupportImpl::cancelVibration() {
1063 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); 1062 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration());
1064 } 1063 }
1065 #endif // defined(OS_ANDROID)
1066 1064
1067 //------------------------------------------------------------------------------ 1065 //------------------------------------------------------------------------------
1068 1066
1069 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( 1067 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota(
1070 const WebKit::WebURL& storage_partition, 1068 const WebKit::WebURL& storage_partition,
1071 WebKit::WebStorageQuotaType type, 1069 WebKit::WebStorageQuotaType type,
1072 WebKit::WebStorageQuotaCallbacks* callbacks) { 1070 WebKit::WebStorageQuotaCallbacks* callbacks) {
1073 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) 1071 if (!thread_safe_sender_.get() || !quota_message_filter_.get())
1074 return; 1072 return;
1075 QuotaDispatcher::ThreadSpecificInstance( 1073 QuotaDispatcher::ThreadSpecificInstance(
1076 thread_safe_sender_.get(), 1074 thread_safe_sender_.get(),
1077 quota_message_filter_.get())->QueryStorageUsageAndQuota( 1075 quota_message_filter_.get())->QueryStorageUsageAndQuota(
1078 storage_partition, 1076 storage_partition,
1079 static_cast<quota::StorageType>(type), 1077 static_cast<quota::StorageType>(type),
1080 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 1078 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
1081 } 1079 }
1082 1080
1083 } // namespace content 1081 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698