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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 base::Value* GpuMessageHandler::OnRequestLogMessages(const base::ListValue*) { | 390 base::Value* GpuMessageHandler::OnRequestLogMessages(const base::ListValue*) { |
391 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 391 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
392 | 392 |
393 return GpuDataManagerImpl::GetInstance()->GetLogMessages(); | 393 return GpuDataManagerImpl::GetInstance()->GetLogMessages(); |
394 } | 394 } |
395 | 395 |
396 void GpuMessageHandler::OnGpuInfoUpdate() { | 396 void GpuMessageHandler::OnGpuInfoUpdate() { |
397 // Get GPU Info. | 397 // Get GPU Info. |
398 scoped_ptr<base::DictionaryValue> gpu_info_val(GpuInfoAsDictionaryValue()); | 398 scoped_ptr<base::DictionaryValue> gpu_info_val(GpuInfoAsDictionaryValue()); |
399 | 399 |
400 | |
401 // Add in blacklisting features | 400 // Add in blacklisting features |
402 base::DictionaryValue* feature_status = new base::DictionaryValue; | 401 base::DictionaryValue* feature_status = new base::DictionaryValue; |
403 feature_status->Set("featureStatus", GetFeatureStatus()); | 402 feature_status->Set("featureStatus", GetFeatureStatus()); |
404 feature_status->Set("problems", GetProblems()); | 403 feature_status->Set("problems", GetProblems()); |
405 base::ListValue* workarounds = new base::ListValue(); | 404 base::ListValue* workarounds = new base::ListValue(); |
406 for (const std::string& workaround : GetDriverBugWorkarounds()) | 405 for (const std::string& workaround : GetDriverBugWorkarounds()) |
407 workarounds->AppendString(workaround); | 406 workarounds->AppendString(workaround); |
408 feature_status->Set("workarounds", workarounds); | 407 feature_status->Set("workarounds", workarounds); |
409 gpu_info_val->Set("featureStatus", feature_status); | 408 gpu_info_val->Set("featureStatus", feature_status); |
410 | 409 |
(...skipping 19 matching lines...) Expand all Loading... |
430 : WebUIController(web_ui) { | 429 : WebUIController(web_ui) { |
431 web_ui->AddMessageHandler(new GpuMessageHandler()); | 430 web_ui->AddMessageHandler(new GpuMessageHandler()); |
432 | 431 |
433 // Set up the chrome://gpu/ source. | 432 // Set up the chrome://gpu/ source. |
434 BrowserContext* browser_context = | 433 BrowserContext* browser_context = |
435 web_ui->GetWebContents()->GetBrowserContext(); | 434 web_ui->GetWebContents()->GetBrowserContext(); |
436 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); | 435 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); |
437 } | 436 } |
438 | 437 |
439 } // namespace content | 438 } // namespace content |
OLD | NEW |