Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(710)

Side by Side Diff: content/browser/gpu/gpu_internals_ui.cc

Issue 723623003: Revert of [DevTools] Move SystemInfo domain to generated handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@browserProtocol
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 feature_status->Set("workarounds", GetDriverBugWorkarounds());
406 for (const std::string& workaround : GetDriverBugWorkarounds()) 405 if (feature_status)
407 workarounds->AppendString(workaround); 406 gpu_info_val->Set("featureStatus", feature_status);
408 feature_status->Set("workarounds", workarounds);
409 gpu_info_val->Set("featureStatus", feature_status);
410 407
411 // Send GPU Info to javascript. 408 // Send GPU Info to javascript.
412 web_ui()->CallJavascriptFunction("browserBridge.onGpuInfoUpdate", 409 web_ui()->CallJavascriptFunction("browserBridge.onGpuInfoUpdate",
413 *(gpu_info_val.get())); 410 *(gpu_info_val.get()));
414 } 411 }
415 412
416 void GpuMessageHandler::OnGpuSwitched() { 413 void GpuMessageHandler::OnGpuSwitched() {
417 GpuDataManagerImpl::GetInstance()->RequestCompleteGpuInfoIfNeeded(); 414 GpuDataManagerImpl::GetInstance()->RequestCompleteGpuInfoIfNeeded();
418 } 415 }
419 416
(...skipping 10 matching lines...) Expand all
430 : WebUIController(web_ui) { 427 : WebUIController(web_ui) {
431 web_ui->AddMessageHandler(new GpuMessageHandler()); 428 web_ui->AddMessageHandler(new GpuMessageHandler());
432 429
433 // Set up the chrome://gpu/ source. 430 // Set up the chrome://gpu/ source.
434 BrowserContext* browser_context = 431 BrowserContext* browser_context =
435 web_ui->GetWebContents()->GetBrowserContext(); 432 web_ui->GetWebContents()->GetBrowserContext();
436 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource()); 433 WebUIDataSource::Add(browser_context, CreateGpuHTMLSource());
437 } 434 }
438 435
439 } // namespace content 436 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698