| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 } | 1154 } |
| 1155 | 1155 |
| 1156 //------------------------------------------------------------------------------ | 1156 //------------------------------------------------------------------------------ |
| 1157 | 1157 |
| 1158 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( | 1158 void RendererWebKitPlatformSupportImpl::queryStorageUsageAndQuota( |
| 1159 const blink::WebURL& storage_partition, | 1159 const blink::WebURL& storage_partition, |
| 1160 blink::WebStorageQuotaType type, | 1160 blink::WebStorageQuotaType type, |
| 1161 blink::WebStorageQuotaCallbacks callbacks) { | 1161 blink::WebStorageQuotaCallbacks callbacks) { |
| 1162 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) | 1162 if (!thread_safe_sender_.get() || !quota_message_filter_.get()) |
| 1163 return; | 1163 return; |
| 1164 QuotaDispatcher::ThreadSpecificInstance( | 1164 QuotaDispatcher::ThreadSpecificInstance(thread_safe_sender_.get(), |
| 1165 thread_safe_sender_.get(), | 1165 quota_message_filter_.get()) |
| 1166 quota_message_filter_.get())->QueryStorageUsageAndQuota( | 1166 ->QueryStorageUsageAndQuota( |
| 1167 storage_partition, | 1167 storage_partition, |
| 1168 static_cast<quota::StorageType>(type), | 1168 static_cast<storage::StorageType>(type), |
| 1169 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 1169 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
| 1170 } | 1170 } |
| 1171 | 1171 |
| 1172 //------------------------------------------------------------------------------ | 1172 //------------------------------------------------------------------------------ |
| 1173 | 1173 |
| 1174 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( | 1174 void RendererWebKitPlatformSupportImpl::MockBatteryStatusChangedForTesting( |
| 1175 const blink::WebBatteryStatus& status) { | 1175 const blink::WebBatteryStatus& status) { |
| 1176 PlatformEventObserverBase* observer = | 1176 PlatformEventObserverBase* observer = |
| 1177 platform_event_observers_.Lookup(blink::WebPlatformEventBattery); | 1177 platform_event_observers_.Lookup(blink::WebPlatformEventBattery); |
| 1178 if (!observer) | 1178 if (!observer) |
| 1179 return; | 1179 return; |
| 1180 observer->SendFakeDataForTesting((void*)&status); | 1180 observer->SendFakeDataForTesting((void*)&status); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 } // namespace content | 1183 } // namespace content |
| OLD | NEW |