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 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1130 | 1130 |
1131 // static | 1131 // static |
1132 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( | 1132 void RendererWebKitPlatformSupportImpl::SetMockDeviceMotionDataForTesting( |
1133 const WebKit::WebDeviceMotionData& data) { | 1133 const WebKit::WebDeviceMotionData& data) { |
1134 g_test_device_motion_data.Get() = data; | 1134 g_test_device_motion_data.Get() = data; |
1135 } | 1135 } |
1136 | 1136 |
1137 //------------------------------------------------------------------------------ | 1137 //------------------------------------------------------------------------------ |
1138 | 1138 |
1139 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { | 1139 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { |
| 1140 // Use a mock implementation for testing in-progress work. |
| 1141 WebKit::WebCrypto* crypto = |
| 1142 GetContentClient()->renderer()->OverrideWebCrypto(); |
| 1143 if (crypto) |
| 1144 return crypto; |
| 1145 |
1140 if (!web_crypto_) | 1146 if (!web_crypto_) |
1141 web_crypto_.reset(new WebCryptoImpl()); | 1147 web_crypto_.reset(new WebCryptoImpl()); |
1142 return web_crypto_.get(); | 1148 return web_crypto_.get(); |
1143 | 1149 |
1144 } | 1150 } |
1145 | 1151 |
1146 //------------------------------------------------------------------------------ | 1152 //------------------------------------------------------------------------------ |
1147 | 1153 |
1148 #if defined(OS_ANDROID) | 1154 #if defined(OS_ANDROID) |
1149 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { | 1155 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { |
(...skipping 12 matching lines...) Expand all Loading... |
1162 const WebKit::WebURL& storage_partition, | 1168 const WebKit::WebURL& storage_partition, |
1163 WebKit::WebStorageQuotaType type, | 1169 WebKit::WebStorageQuotaType type, |
1164 WebKit::WebStorageQuotaCallbacks* callbacks) { | 1170 WebKit::WebStorageQuotaCallbacks* callbacks) { |
1165 ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota( | 1171 ChildThread::current()->quota_dispatcher()->QueryStorageUsageAndQuota( |
1166 storage_partition, | 1172 storage_partition, |
1167 static_cast<quota::StorageType>(type), | 1173 static_cast<quota::StorageType>(type), |
1168 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1174 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
1169 } | 1175 } |
1170 | 1176 |
1171 } // namespace content | 1177 } // namespace content |
OLD | NEW |