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