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 #if defined(OS_LINUX) && defined(USE_X11) | 7 #if defined(OS_LINUX) && defined(USE_X11) |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 vendor.c_str(), device.c_str(), gpu.active ? " *ACTIVE*" : ""); | 106 vendor.c_str(), device.c_str(), gpu.active ? " *ACTIVE*" : ""); |
107 } | 107 } |
108 | 108 |
109 base::DictionaryValue* GpuInfoAsDictionaryValue() { | 109 base::DictionaryValue* GpuInfoAsDictionaryValue() { |
110 gpu::GPUInfo gpu_info = GpuDataManagerImpl::GetInstance()->GetGPUInfo(); | 110 gpu::GPUInfo gpu_info = GpuDataManagerImpl::GetInstance()->GetGPUInfo(); |
111 base::ListValue* basic_info = new base::ListValue(); | 111 base::ListValue* basic_info = new base::ListValue(); |
112 basic_info->Append(NewDescriptionValuePair( | 112 basic_info->Append(NewDescriptionValuePair( |
113 "Initialization time", | 113 "Initialization time", |
114 base::Int64ToString(gpu_info.initialization_time.InMilliseconds()))); | 114 base::Int64ToString(gpu_info.initialization_time.InMilliseconds()))); |
115 basic_info->Append(NewDescriptionValuePair( | 115 basic_info->Append(NewDescriptionValuePair( |
| 116 "In-process GPU", new base::FundamentalValue(gpu_info.in_process_gpu))); |
| 117 basic_info->Append(NewDescriptionValuePair( |
116 "Sandboxed", new base::FundamentalValue(gpu_info.sandboxed))); | 118 "Sandboxed", new base::FundamentalValue(gpu_info.sandboxed))); |
117 basic_info->Append(NewDescriptionValuePair( | 119 basic_info->Append(NewDescriptionValuePair( |
118 "GPU0", GPUDeviceToString(gpu_info.gpu))); | 120 "GPU0", GPUDeviceToString(gpu_info.gpu))); |
119 for (size_t i = 0; i < gpu_info.secondary_gpus.size(); ++i) { | 121 for (size_t i = 0; i < gpu_info.secondary_gpus.size(); ++i) { |
120 basic_info->Append(NewDescriptionValuePair( | 122 basic_info->Append(NewDescriptionValuePair( |
121 base::StringPrintf("GPU%d", static_cast<int>(i + 1)), | 123 base::StringPrintf("GPU%d", static_cast<int>(i + 1)), |
122 GPUDeviceToString(gpu_info.secondary_gpus[i]))); | 124 GPUDeviceToString(gpu_info.secondary_gpus[i]))); |
123 } | 125 } |
124 basic_info->Append(NewDescriptionValuePair( | 126 basic_info->Append(NewDescriptionValuePair( |
125 "Optimus", new base::FundamentalValue(gpu_info.optimus))); | 127 "Optimus", new base::FundamentalValue(gpu_info.optimus))); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 : WebUIController(web_ui) { | 428 : WebUIController(web_ui) { |
427 web_ui->AddMessageHandler(new GpuMessageHandler()); | 429 web_ui->AddMessageHandler(new GpuMessageHandler()); |
428 | 430 |
429 // Set up the chrome://gpu/ source. | 431 // Set up the chrome://gpu/ source. |
430 BrowserContext* browser_context = | 432 BrowserContext* browser_context = |
431 web_ui->GetWebContents()->GetBrowserContext(); | 433 web_ui->GetWebContents()->GetBrowserContext(); |
432 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 434 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
433 } | 435 } |
434 | 436 |
435 } // namespace content | 437 } // namespace content |
OLD | NEW |