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_blink_platform_impl.h" | 5 #include "content/renderer/renderer_blink_platform_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 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 //------------------------------------------------------------------------------ | 1014 //------------------------------------------------------------------------------ |
1015 | 1015 |
1016 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode( | 1016 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode( |
1017 const blink::WebString& host, | 1017 const blink::WebString& host, |
1018 const blink::WebString& languages) { | 1018 const blink::WebString& languages) { |
1019 return net::IDNToUnicode(host.utf8(), languages.utf8()); | 1019 return net::IDNToUnicode(host.utf8(), languages.utf8()); |
1020 } | 1020 } |
1021 | 1021 |
1022 //------------------------------------------------------------------------------ | 1022 //------------------------------------------------------------------------------ |
1023 | 1023 |
| 1024 void RendererBlinkPlatformImpl::recordRappor( |
| 1025 const char* metric, const blink::WebString& sample) { |
| 1026 content::GetContentClient()->renderer()->RecordRappor(metric, sample.utf8()); |
| 1027 } |
| 1028 |
| 1029 //------------------------------------------------------------------------------ |
| 1030 |
1024 // static | 1031 // static |
1025 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) { | 1032 void RendererBlinkPlatformImpl::SetMockDeviceLightDataForTesting(double data) { |
1026 g_test_device_light_data = data; | 1033 g_test_device_light_data = data; |
1027 } | 1034 } |
1028 | 1035 |
1029 //------------------------------------------------------------------------------ | 1036 //------------------------------------------------------------------------------ |
1030 | 1037 |
1031 // static | 1038 // static |
1032 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting( | 1039 void RendererBlinkPlatformImpl::SetMockDeviceMotionDataForTesting( |
1033 const blink::WebDeviceMotionData& data) { | 1040 const blink::WebDeviceMotionData& data) { |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 //------------------------------------------------------------------------------ | 1220 //------------------------------------------------------------------------------ |
1214 | 1221 |
1215 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1222 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
1216 const blink::WebBatteryStatus& status) { | 1223 const blink::WebBatteryStatus& status) { |
1217 if (!g_test_battery_status_listener) | 1224 if (!g_test_battery_status_listener) |
1218 return; | 1225 return; |
1219 g_test_battery_status_listener->updateBatteryStatus(status); | 1226 g_test_battery_status_listener->updateBatteryStatus(status); |
1220 } | 1227 } |
1221 | 1228 |
1222 } // namespace content | 1229 } // namespace content |
OLD | NEW |