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/location.h" | 10 #include "base/location.h" |
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 const gpu::GPUInfo& gpu_info = gpu_channel_host->gpu_info(); | 977 const gpu::GPUInfo& gpu_info = gpu_channel_host->gpu_info(); |
978 switch (gpu_info.context_info_state) { | 978 switch (gpu_info.context_info_state) { |
979 case gpu::kCollectInfoSuccess: | 979 case gpu::kCollectInfoSuccess: |
980 case gpu::kCollectInfoNonFatalFailure: | 980 case gpu::kCollectInfoNonFatalFailure: |
981 gl_info->vendorInfo.assign( | 981 gl_info->vendorInfo.assign( |
982 blink::WebString::fromUTF8(gpu_info.gl_vendor)); | 982 blink::WebString::fromUTF8(gpu_info.gl_vendor)); |
983 gl_info->rendererInfo.assign( | 983 gl_info->rendererInfo.assign( |
984 blink::WebString::fromUTF8(gpu_info.gl_renderer)); | 984 blink::WebString::fromUTF8(gpu_info.gl_renderer)); |
985 gl_info->driverVersion.assign( | 985 gl_info->driverVersion.assign( |
986 blink::WebString::fromUTF8(gpu_info.driver_version)); | 986 blink::WebString::fromUTF8(gpu_info.driver_version)); |
987 gl_info->vendorId = gpu_info.gpu.vendor_id; | 987 gl_info->vendorId.assign(blink::WebString::fromUTF8( |
988 gl_info->deviceId = gpu_info.gpu.device_id; | 988 base::StringPrintf("0x%04x", gpu_info.gpu.vendor_id))); |
| 989 gl_info->deviceId.assign(blink::WebString::fromUTF8( |
| 990 base::StringPrintf("0x%04x", gpu_info.gpu.device_id))); |
989 break; | 991 break; |
990 case gpu::kCollectInfoFatalFailure: | 992 case gpu::kCollectInfoFatalFailure: |
991 case gpu::kCollectInfoNone: | 993 case gpu::kCollectInfoNone: |
992 gl_info->contextInfoCollectionFailure.assign(blink::WebString::fromUTF8( | 994 gl_info->contextInfoCollectionFailure.assign(blink::WebString::fromUTF8( |
993 "GPUInfoCollectionFailure: GPU initialization Failed. GPU " | 995 "GPUInfoCollectionFailure: GPU initialization Failed. GPU " |
994 "Info not Collected.")); | 996 "Info not Collected.")); |
995 break; | 997 break; |
996 default: | 998 default: |
997 NOTREACHED(); | 999 NOTREACHED(); |
998 } | 1000 } |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 //------------------------------------------------------------------------------ | 1248 //------------------------------------------------------------------------------ |
1247 | 1249 |
1248 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( | 1250 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( |
1249 const blink::WebBatteryStatus& status) { | 1251 const blink::WebBatteryStatus& status) { |
1250 if (!g_test_battery_status_listener) | 1252 if (!g_test_battery_status_listener) |
1251 return; | 1253 return; |
1252 g_test_battery_status_listener->updateBatteryStatus(status); | 1254 g_test_battery_status_listener->updateBatteryStatus(status); |
1253 } | 1255 } |
1254 | 1256 |
1255 } // namespace content | 1257 } // namespace content |
OLD | NEW |