| 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 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 | 1034 |
| 1035 blink::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { | 1035 blink::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { |
| 1036 if (!web_crypto_) | 1036 if (!web_crypto_) |
| 1037 web_crypto_.reset(new WebCryptoImpl()); | 1037 web_crypto_.reset(new WebCryptoImpl()); |
| 1038 return web_crypto_.get(); | 1038 return web_crypto_.get(); |
| 1039 | 1039 |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 //------------------------------------------------------------------------------ | 1042 //------------------------------------------------------------------------------ |
| 1043 | 1043 |
| 1044 #if defined(OS_ANDROID) | |
| 1045 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { | 1044 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { |
| 1046 RenderThread::Get()->Send( | 1045 RenderThread::Get()->Send( |
| 1047 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds))); | 1046 new ViewHostMsg_Vibrate(base::checked_numeric_cast<int64>(milliseconds))); |
| 1048 } | 1047 } |
| 1049 | 1048 |
| 1050 void RendererWebKitPlatformSupportImpl::cancelVibration() { | 1049 void RendererWebKitPlatformSupportImpl::cancelVibration() { |
| 1051 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); | 1050 RenderThread::Get()->Send(new ViewHostMsg_CancelVibration()); |
| 1052 } | 1051 } |
| 1053 #endif // defined(OS_ANDROID) | |
| 1054 | 1052 |
| 1055 //------------------------------------------------------------------------------ | 1053 //------------------------------------------------------------------------------ |
| 1056 | 1054 |
| 1057 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( | 1055 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( |
| 1058 const blink::WebURL& storage_partition, | 1056 const blink::WebURL& storage_partition, |
| 1059 blink::WebStorageQuotaType type, | 1057 blink::WebStorageQuotaType type, |
| 1060 blink::WebStorageQuotaCallbacks* callbacks) { | 1058 blink::WebStorageQuotaCallbacks* callbacks) { |
| 1061 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) | 1059 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) |
| 1062 return; | 1060 return; |
| 1063 QuotaDispatcher::ThreadSpecificInstance( | 1061 QuotaDispatcher::ThreadSpecificInstance( |
| 1064 thread_safe_sender_.get(), | 1062 thread_safe_sender_.get(), |
| 1065 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1063 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
| 1066 storage_partition, | 1064 storage_partition, |
| 1067 static_cast<quota::StorageType>(type), | 1065 static_cast<quota::StorageType>(type), |
| 1068 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1066 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
| 1069 } | 1067 } |
| 1070 | 1068 |
| 1071 } // namespace content | 1069 } // namespace content |
| OLD | NEW |