| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 gpu_info.gl_ws_extensions)); | 159 gpu_info.gl_ws_extensions)); |
| 160 std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No"; | 160 std::string direct_rendering = gpu_info.direct_rendering ? "Yes" : "No"; |
| 161 basic_info->Append( | 161 basic_info->Append( |
| 162 NewDescriptionValuePair("Direct rendering", direct_rendering)); | 162 NewDescriptionValuePair("Direct rendering", direct_rendering)); |
| 163 | 163 |
| 164 std::string reset_strategy = | 164 std::string reset_strategy = |
| 165 base::StringPrintf("0x%04x", gpu_info.gl_reset_notification_strategy); | 165 base::StringPrintf("0x%04x", gpu_info.gl_reset_notification_strategy); |
| 166 basic_info->Append(NewDescriptionValuePair( | 166 basic_info->Append(NewDescriptionValuePair( |
| 167 "Reset notification strategy", reset_strategy)); | 167 "Reset notification strategy", reset_strategy)); |
| 168 | 168 |
| 169 basic_info->Append(NewDescriptionValuePair( |
| 170 "GPU process crash count", |
| 171 new base::FundamentalValue(gpu_info.process_crash_count))); |
| 172 |
| 169 base::DictionaryValue* info = new base::DictionaryValue(); | 173 base::DictionaryValue* info = new base::DictionaryValue(); |
| 170 info->Set("basic_info", basic_info); | 174 info->Set("basic_info", basic_info); |
| 171 | 175 |
| 172 #if defined(OS_WIN) | 176 #if defined(OS_WIN) |
| 173 base::ListValue* perf_info = new base::ListValue(); | 177 base::ListValue* perf_info = new base::ListValue(); |
| 174 perf_info->Append(NewDescriptionValuePair( | 178 perf_info->Append(NewDescriptionValuePair( |
| 175 "Graphics", | 179 "Graphics", |
| 176 base::StringPrintf("%.1f", gpu_info.performance_stats.graphics))); | 180 base::StringPrintf("%.1f", gpu_info.performance_stats.graphics))); |
| 177 perf_info->Append(NewDescriptionValuePair( | 181 perf_info->Append(NewDescriptionValuePair( |
| 178 "Gaming", | 182 "Gaming", |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 : WebUIController(web_ui) { | 382 : WebUIController(web_ui) { |
| 379 web_ui->AddMessageHandler(new GpuMessageHandler()); | 383 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 380 | 384 |
| 381 // Set up the chrome://gpu/ source. | 385 // Set up the chrome://gpu/ source. |
| 382 BrowserContext* browser_context = | 386 BrowserContext* browser_context = |
| 383 web_ui->GetWebContents()->GetBrowserContext(); | 387 web_ui->GetWebContents()->GetBrowserContext(); |
| 384 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 388 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 385 } | 389 } |
| 386 | 390 |
| 387 } // namespace content | 391 } // namespace content |
| OLD | NEW |