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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 base::ListValue* basic_info = new base::ListValue(); | 125 base::ListValue* basic_info = new base::ListValue(); |
126 basic_info->Append(NewDescriptionValuePair( | 126 basic_info->Append(NewDescriptionValuePair( |
127 "Initialization time", | 127 "Initialization time", |
128 base::Int64ToString(gpu_info.initialization_time.InMilliseconds()))); | 128 base::Int64ToString(gpu_info.initialization_time.InMilliseconds()))); |
129 basic_info->Append(NewDescriptionValuePair( | 129 basic_info->Append(NewDescriptionValuePair( |
130 "In-process GPU", new base::Value(gpu_info.in_process_gpu))); | 130 "In-process GPU", new base::Value(gpu_info.in_process_gpu))); |
131 basic_info->Append(NewDescriptionValuePair( | 131 basic_info->Append(NewDescriptionValuePair( |
132 "Passthrough Command Decoder", | 132 "Passthrough Command Decoder", |
133 new base::Value(gpu_info.passthrough_cmd_decoder))); | 133 new base::Value(gpu_info.passthrough_cmd_decoder))); |
134 basic_info->Append(NewDescriptionValuePair( | 134 basic_info->Append(NewDescriptionValuePair( |
| 135 "Supports overlays", new base::Value(gpu_info.supports_overlays))); |
| 136 basic_info->Append(NewDescriptionValuePair( |
135 "Sandboxed", new base::Value(gpu_info.sandboxed))); | 137 "Sandboxed", new base::Value(gpu_info.sandboxed))); |
136 basic_info->Append(NewDescriptionValuePair( | 138 basic_info->Append(NewDescriptionValuePair( |
137 "GPU0", GPUDeviceToString(gpu_info.gpu))); | 139 "GPU0", GPUDeviceToString(gpu_info.gpu))); |
138 for (size_t i = 0; i < gpu_info.secondary_gpus.size(); ++i) { | 140 for (size_t i = 0; i < gpu_info.secondary_gpus.size(); ++i) { |
139 basic_info->Append(NewDescriptionValuePair( | 141 basic_info->Append(NewDescriptionValuePair( |
140 base::StringPrintf("GPU%d", static_cast<int>(i + 1)), | 142 base::StringPrintf("GPU%d", static_cast<int>(i + 1)), |
141 GPUDeviceToString(gpu_info.secondary_gpus[i]))); | 143 GPUDeviceToString(gpu_info.secondary_gpus[i]))); |
142 } | 144 } |
143 basic_info->Append( | 145 basic_info->Append( |
144 NewDescriptionValuePair("Optimus", new base::Value(gpu_info.optimus))); | 146 NewDescriptionValuePair("Optimus", new base::Value(gpu_info.optimus))); |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 : WebUIController(web_ui) { | 558 : WebUIController(web_ui) { |
557 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>()); | 559 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>()); |
558 | 560 |
559 // Set up the chrome://gpu/ source. | 561 // Set up the chrome://gpu/ source. |
560 BrowserContext* browser_context = | 562 BrowserContext* browser_context = |
561 web_ui->GetWebContents()->GetBrowserContext(); | 563 web_ui->GetWebContents()->GetBrowserContext(); |
562 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 564 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
563 } | 565 } |
564 | 566 |
565 } // namespace content | 567 } // namespace content |
OLD | NEW |