| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 } | 392 } |
| 393 | 393 |
| 394 void GpuMessageHandler::OnGpuInfoUpdate() { | 394 void GpuMessageHandler::OnGpuInfoUpdate() { |
| 395 // Get GPU Info. | 395 // Get GPU Info. |
| 396 scoped_ptr<base::DictionaryValue> gpu_info_val(GpuInfoAsDictionaryValue()); | 396 scoped_ptr<base::DictionaryValue> gpu_info_val(GpuInfoAsDictionaryValue()); |
| 397 | 397 |
| 398 | 398 |
| 399 // Add in blacklisting features | 399 // Add in blacklisting features |
| 400 base::DictionaryValue* feature_status = new base::DictionaryValue; | 400 base::DictionaryValue* feature_status = new base::DictionaryValue; |
| 401 feature_status->Set("featureStatus", GetFeatureStatus()); | 401 feature_status->Set("featureStatus", GetFeatureStatus()); |
| 402 feature_status->Set("gmbStatus", GetGmbStatus()); |
| 402 feature_status->Set("problems", GetProblems()); | 403 feature_status->Set("problems", GetProblems()); |
| 403 base::ListValue* workarounds = new base::ListValue(); | 404 base::ListValue* workarounds = new base::ListValue(); |
| 404 for (const std::string& workaround : GetDriverBugWorkarounds()) | 405 for (const std::string& workaround : GetDriverBugWorkarounds()) |
| 405 workarounds->AppendString(workaround); | 406 workarounds->AppendString(workaround); |
| 406 feature_status->Set("workarounds", workarounds); | 407 feature_status->Set("workarounds", workarounds); |
| 407 gpu_info_val->Set("featureStatus", feature_status); | 408 gpu_info_val->Set("featureStatus", feature_status); |
| 408 | 409 |
| 409 // Send GPU Info to javascript. | 410 // Send GPU Info to javascript. |
| 410 web_ui()->CallJavascriptFunction("browserBridge.onGpuInfoUpdate", | 411 web_ui()->CallJavascriptFunction("browserBridge.onGpuInfoUpdate", |
| 411 *(gpu_info_val.get())); | 412 *(gpu_info_val.get())); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 428 : WebUIController(web_ui) { | 429 : WebUIController(web_ui) { |
| 429 web_ui->AddMessageHandler(new GpuMessageHandler()); | 430 web_ui->AddMessageHandler(new GpuMessageHandler()); |
| 430 | 431 |
| 431 // Set up the chrome://gpu/ source. | 432 // Set up the chrome://gpu/ source. |
| 432 BrowserContext* browser_context = | 433 BrowserContext* browser_context = |
| 433 web_ui->GetWebContents()->GetBrowserContext(); | 434 web_ui->GetWebContents()->GetBrowserContext(); |
| 434 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 435 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
| 435 } | 436 } |
| 436 | 437 |
| 437 } // namespace content | 438 } // namespace content |
| OLD | NEW |