| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 "Reset notification strategy", reset_strategy)); | 240 "Reset notification strategy", reset_strategy)); |
| 241 | 241 |
| 242 basic_info->Append( | 242 basic_info->Append( |
| 243 NewDescriptionValuePair("GPU process crash count", | 243 NewDescriptionValuePair("GPU process crash count", |
| 244 new base::Value(gpu_info.process_crash_count))); | 244 new base::Value(gpu_info.process_crash_count))); |
| 245 | 245 |
| 246 base::DictionaryValue* info = new base::DictionaryValue(); | 246 base::DictionaryValue* info = new base::DictionaryValue(); |
| 247 info->Set("basic_info", basic_info); | 247 info->Set("basic_info", basic_info); |
| 248 | 248 |
| 249 #if defined(OS_WIN) | 249 #if defined(OS_WIN) |
| 250 std::unique_ptr<base::Value> dx_info = base::Value::CreateNullValue(); | 250 auto dx_info = base::MakeUnique<base::Value>(); |
| 251 if (gpu_info.dx_diagnostics.children.size()) | 251 if (gpu_info.dx_diagnostics.children.size()) |
| 252 dx_info.reset(DxDiagNodeToList(gpu_info.dx_diagnostics)); | 252 dx_info.reset(DxDiagNodeToList(gpu_info.dx_diagnostics)); |
| 253 info->Set("diagnostics", std::move(dx_info)); | 253 info->Set("diagnostics", std::move(dx_info)); |
| 254 #endif | 254 #endif |
| 255 | 255 |
| 256 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 256 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 257 basic_info->Append(NewDescriptionValuePair( | 257 basic_info->Append(NewDescriptionValuePair( |
| 258 "System visual ID", base::Uint64ToString(gpu_info.system_visual))); | 258 "System visual ID", base::Uint64ToString(gpu_info.system_visual))); |
| 259 basic_info->Append(NewDescriptionValuePair( | 259 basic_info->Append(NewDescriptionValuePair( |
| 260 "RGBA visual ID", base::Uint64ToString(gpu_info.rgba_visual))); | 260 "RGBA visual ID", base::Uint64ToString(gpu_info.rgba_visual))); |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 : WebUIController(web_ui) { | 558 : WebUIController(web_ui) { |
| 559 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>()); | 559 web_ui->AddMessageHandler(base::MakeUnique<GpuMessageHandler>()); |
| 560 | 560 |
| 561 // Set up the chrome://gpu/ source. | 561 // Set up the chrome://gpu/ source. |
| 562 BrowserContext* browser_context = | 562 BrowserContext* browser_context = |
| 563 web_ui->GetWebContents()->GetBrowserContext(); | 563 web_ui->GetWebContents()->GetBrowserContext(); |
| 564 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 564 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 565 } | 565 } |
| 566 | 566 |
| 567 } // namespace content | 567 } // namespace content |
| OLD | NEW |