| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 base::DictionaryValue* GpuInfoAsDictionaryValue() { | 122 base::DictionaryValue* GpuInfoAsDictionaryValue() { |
| 123 gpu::GPUInfo gpu_info = GpuDataManagerImpl::GetInstance()->GetGPUInfo(); | 123 gpu::GPUInfo gpu_info = GpuDataManagerImpl::GetInstance()->GetGPUInfo(); |
| 124 base::ListValue* basic_info = new base::ListValue(); | 124 base::ListValue* basic_info = new base::ListValue(); |
| 125 basic_info->Append(NewDescriptionValuePair( | 125 basic_info->Append(NewDescriptionValuePair( |
| 126 "Initialization time", | 126 "Initialization time", |
| 127 base::Int64ToString(gpu_info.initialization_time.InMilliseconds()))); | 127 base::Int64ToString(gpu_info.initialization_time.InMilliseconds()))); |
| 128 basic_info->Append(NewDescriptionValuePair( | 128 basic_info->Append(NewDescriptionValuePair( |
| 129 "In-process GPU", new base::FundamentalValue(gpu_info.in_process_gpu))); | 129 "In-process GPU", new base::FundamentalValue(gpu_info.in_process_gpu))); |
| 130 basic_info->Append(NewDescriptionValuePair( | 130 basic_info->Append(NewDescriptionValuePair( |
| 131 "Passthrough Command Decoder", |
| 132 new base::FundamentalValue(gpu_info.passthrough_cmd_decoder))); |
| 133 basic_info->Append(NewDescriptionValuePair( |
| 131 "Sandboxed", new base::FundamentalValue(gpu_info.sandboxed))); | 134 "Sandboxed", new base::FundamentalValue(gpu_info.sandboxed))); |
| 132 basic_info->Append(NewDescriptionValuePair( | 135 basic_info->Append(NewDescriptionValuePair( |
| 133 "GPU0", GPUDeviceToString(gpu_info.gpu))); | 136 "GPU0", GPUDeviceToString(gpu_info.gpu))); |
| 134 for (size_t i = 0; i < gpu_info.secondary_gpus.size(); ++i) { | 137 for (size_t i = 0; i < gpu_info.secondary_gpus.size(); ++i) { |
| 135 basic_info->Append(NewDescriptionValuePair( | 138 basic_info->Append(NewDescriptionValuePair( |
| 136 base::StringPrintf("GPU%d", static_cast<int>(i + 1)), | 139 base::StringPrintf("GPU%d", static_cast<int>(i + 1)), |
| 137 GPUDeviceToString(gpu_info.secondary_gpus[i]))); | 140 GPUDeviceToString(gpu_info.secondary_gpus[i]))); |
| 138 } | 141 } |
| 139 basic_info->Append(NewDescriptionValuePair( | 142 basic_info->Append(NewDescriptionValuePair( |
| 140 "Optimus", new base::FundamentalValue(gpu_info.optimus))); | 143 "Optimus", new base::FundamentalValue(gpu_info.optimus))); |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 : WebUIController(web_ui) { | 559 : WebUIController(web_ui) { |
| 557 web_ui->AddMessageHandler(new GpuMessageHandler()); | 560 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 558 | 561 |
| 559 // Set up the chrome://gpu/ source. | 562 // Set up the chrome://gpu/ source. |
| 560 BrowserContext* browser_context = | 563 BrowserContext* browser_context = |
| 561 web_ui->GetWebContents()->GetBrowserContext(); | 564 web_ui->GetWebContents()->GetBrowserContext(); |
| 562 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 565 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 563 } | 566 } |
| 564 | 567 |
| 565 } // namespace content | 568 } // namespace content |
| OLD | NEW |