| 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 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1032 | 1032 |
| 1033 // static | 1033 // static |
| 1034 void RendererWebKitPlatformSupportImpl::SetMockDeviceOrientationDataForTesting( | 1034 void RendererWebKitPlatformSupportImpl::SetMockDeviceOrientationDataForTesting( |
| 1035 const WebKit::WebDeviceOrientationData& data) { | 1035 const WebKit::WebDeviceOrientationData& data) { |
| 1036 g_test_device_orientation_data.Get() = data; | 1036 g_test_device_orientation_data.Get() = data; |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 //------------------------------------------------------------------------------ | 1039 //------------------------------------------------------------------------------ |
| 1040 | 1040 |
| 1041 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { | 1041 WebKit::WebCrypto* RendererWebKitPlatformSupportImpl::crypto() { |
| 1042 // Use a mock implementation for testing in-progress work. | |
| 1043 WebKit::WebCrypto* crypto = | |
| 1044 GetContentClient()->renderer()->OverrideWebCrypto(); | |
| 1045 if (crypto) | |
| 1046 return crypto; | |
| 1047 | |
| 1048 if (!web_crypto_) | 1042 if (!web_crypto_) |
| 1049 web_crypto_.reset(new WebCryptoImpl()); | 1043 web_crypto_.reset(new WebCryptoImpl()); |
| 1050 return web_crypto_.get(); | 1044 return web_crypto_.get(); |
| 1051 | 1045 |
| 1052 } | 1046 } |
| 1053 | 1047 |
| 1054 //------------------------------------------------------------------------------ | 1048 //------------------------------------------------------------------------------ |
| 1055 | 1049 |
| 1056 #if defined(OS_ANDROID) | 1050 #if defined(OS_ANDROID) |
| 1057 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { | 1051 void RendererWebKitPlatformSupportImpl::vibrate(unsigned int milliseconds) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1074 return; | 1068 return; |
| 1075 QuotaDispatcher::ThreadSpecificInstance( | 1069 QuotaDispatcher::ThreadSpecificInstance( |
| 1076 thread_safe_sender_.get(), | 1070 thread_safe_sender_.get(), |
| 1077 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1071 quota_message_filter_.get())->QueryStorageUsageAndQuota( |
| 1078 storage_partition, | 1072 storage_partition, |
| 1079 static_cast<quota::StorageType>(type), | 1073 static_cast<quota::StorageType>(type), |
| 1080 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1074 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
| 1081 } | 1075 } |
| 1082 | 1076 |
| 1083 } // namespace content | 1077 } // namespace content |
| OLD | NEW |