| 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/browser/gpu/gpu_internals_ui.h" | 5 #include "content/browser/gpu/gpu_internals_ui.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 "GPU0", GPUDeviceToString(gpu_info.gpu))); | 118 "GPU0", GPUDeviceToString(gpu_info.gpu))); |
| 119 for (size_t i = 0; i < gpu_info.secondary_gpus.size(); ++i) { | 119 for (size_t i = 0; i < gpu_info.secondary_gpus.size(); ++i) { |
| 120 basic_info->Append(NewDescriptionValuePair( | 120 basic_info->Append(NewDescriptionValuePair( |
| 121 base::StringPrintf("GPU%d", static_cast<int>(i + 1)), | 121 base::StringPrintf("GPU%d", static_cast<int>(i + 1)), |
| 122 GPUDeviceToString(gpu_info.secondary_gpus[i]))); | 122 GPUDeviceToString(gpu_info.secondary_gpus[i]))); |
| 123 } | 123 } |
| 124 basic_info->Append(NewDescriptionValuePair( | 124 basic_info->Append(NewDescriptionValuePair( |
| 125 "Optimus", new base::FundamentalValue(gpu_info.optimus))); | 125 "Optimus", new base::FundamentalValue(gpu_info.optimus))); |
| 126 basic_info->Append(NewDescriptionValuePair( | 126 basic_info->Append(NewDescriptionValuePair( |
| 127 "AMD switchable", new base::FundamentalValue(gpu_info.amd_switchable))); | 127 "AMD switchable", new base::FundamentalValue(gpu_info.amd_switchable))); |
| 128 if (gpu_info.display_link_version.IsValid()) { |
| 129 basic_info->Append(NewDescriptionValuePair( |
| 130 "DisplayLink Version", gpu_info.display_link_version.GetString())); |
| 131 } |
| 128 basic_info->Append(NewDescriptionValuePair("Driver vendor", | 132 basic_info->Append(NewDescriptionValuePair("Driver vendor", |
| 129 gpu_info.driver_vendor)); | 133 gpu_info.driver_vendor)); |
| 130 basic_info->Append(NewDescriptionValuePair("Driver version", | 134 basic_info->Append(NewDescriptionValuePair("Driver version", |
| 131 gpu_info.driver_version)); | 135 gpu_info.driver_version)); |
| 132 basic_info->Append(NewDescriptionValuePair("Driver date", | 136 basic_info->Append(NewDescriptionValuePair("Driver date", |
| 133 gpu_info.driver_date)); | 137 gpu_info.driver_date)); |
| 134 basic_info->Append(NewDescriptionValuePair("Pixel shader version", | 138 basic_info->Append(NewDescriptionValuePair("Pixel shader version", |
| 135 gpu_info.pixel_shader_version)); | 139 gpu_info.pixel_shader_version)); |
| 136 basic_info->Append(NewDescriptionValuePair("Vertex shader version", | 140 basic_info->Append(NewDescriptionValuePair("Vertex shader version", |
| 137 gpu_info.vertex_shader_version)); | 141 gpu_info.vertex_shader_version)); |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 : WebUIController(web_ui) { | 617 : WebUIController(web_ui) { |
| 614 web_ui->AddMessageHandler(new GpuMessageHandler()); | 618 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 615 | 619 |
| 616 // Set up the chrome://gpu/ source. | 620 // Set up the chrome://gpu/ source. |
| 617 BrowserContext* browser_context = | 621 BrowserContext* browser_context = |
| 618 web_ui->GetWebContents()->GetBrowserContext(); | 622 web_ui->GetWebContents()->GetBrowserContext(); |
| 619 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 623 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 620 } | 624 } |
| 621 | 625 |
| 622 } // namespace content | 626 } // namespace content |
| OLD | NEW |