OLD | NEW |
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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 | 1014 |
1015 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { | 1015 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { |
1016 if (!web_crypto_) | 1016 if (!web_crypto_) |
1017 web_crypto_.reset(new WebCryptoImpl()); | 1017 web_crypto_.reset(new WebCryptoImpl()); |
1018 return web_crypto_.get(); | 1018 return web_crypto_.get(); |
1019 | 1019 |
1020 } | 1020 } |
1021 | 1021 |
1022 //------------------------------------------------------------------------------ | 1022 //------------------------------------------------------------------------------ |
1023 | 1023 |
1024 #if defined(OS_ANDROID) | |
1025 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { | 1024 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { |
1026 RenderThread::Get()->Send( | 1025 RenderThread::Get()->Send( |
1027 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds))); | 1026 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds))); |
1028 } | 1027 } |
1029 | 1028 |
1030 void RendererWebKitPlatformSupportImpl::cancelVibration() { | 1029 void RendererWebKitPlatformSupportImpl::cancelVibration() { |
1031 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); | 1030 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); |
1032 } | 1031 } |
1033 #endif // defined(OS_ANDROID) | |
1034 | 1032 |
1035 //------------------------------------------------------------------------------ | 1033 //------------------------------------------------------------------------------ |
1036 | 1034 |
1037 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( | 1035 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( |
1038 const WebKit::WebURL& storage_partition, | 1036 const WebKit::WebURL& storage_partition, |
1039 WebKit::WebStorageQuotaType type, | 1037 WebKit::WebStorageQuotaType type, |
1040 WebKit::WebStorageQuotaCallbacks* callbacks) { | 1038 WebKit::WebStorageQuotaCallbacks* callbacks) { |
1041 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) | 1039 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) |
1042 return; | 1040 return; |
1043 QuotaDispatcher::ThreadSpecificInstance( | 1041 QuotaDispatcher::ThreadSpecificInstance( |
1044 thread_safe_sender_.get(), | 1042 thread_safe_sender_.get(), |
1045 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1043 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
1046 storage_partition, | 1044 storage_partition, |
1047 static_cast<quota::StorageType>(type), | 1045 static_cast<quota::StorageType>(type), |
1048 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1046 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1049 } | 1047 } |
1050 | 1048 |
1051 } // namespace content | 1049 } // namespace content |
OLD | NEW |