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

Side by Side Diff: chrome/browser/ui/webui/gpu_internals_ui.cc

Issue 6712048: Implement easy GPU feature status summary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor tweak. Created 9 years, 8 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/webui/gpu_internals_ui.h" 5 #include "chrome/browser/ui/webui/gpu_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 return gpu_data_manager_->log_messages().DeepCopy(); 376 return gpu_data_manager_->log_messages().DeepCopy();
377 } 377 }
378 378
379 void GpuMessageHandler::OnGpuInfoUpdate() { 379 void GpuMessageHandler::OnGpuInfoUpdate() {
380 const GPUInfo& gpu_info = gpu_data_manager_->gpu_info(); 380 const GPUInfo& gpu_info = gpu_data_manager_->gpu_info();
381 381
382 // Get GPU Info. 382 // Get GPU Info.
383 DictionaryValue* gpu_info_val = GpuInfoToDict(gpu_info); 383 DictionaryValue* gpu_info_val = GpuInfoToDict(gpu_info);
384 384
385 // Add in blacklisting reasons 385 // Add in blacklisting features
386 Value* blacklisting_reasons = gpu_data_manager_->GetBlacklistingReasons(); 386 Value* feature_status = gpu_data_manager_->GetFeatureStatus();
387 if (blacklisting_reasons) 387 if (feature_status)
388 gpu_info_val->Set("blacklistingReasons", blacklisting_reasons); 388 gpu_info_val->Set("featureStatus", feature_status);
389 389
390 // Send GPU Info to javascript. 390 // Send GPU Info to javascript.
391 web_ui_->CallJavascriptFunction("browserBridge.onGpuInfoUpdate", 391 web_ui_->CallJavascriptFunction("browserBridge.onGpuInfoUpdate",
392 *gpu_info_val); 392 *gpu_info_val);
393 393
394 delete gpu_info_val; 394 delete gpu_info_val;
395 } 395 }
396 396
397 void GpuMessageHandler::OnBeginTracing(const ListValue* args) { 397 void GpuMessageHandler::OnBeginTracing(const ListValue* args) {
398 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 398 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 //////////////////////////////////////////////////////////////////////////////// 445 ////////////////////////////////////////////////////////////////////////////////
446 446
447 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : WebUI(contents) { 447 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : WebUI(contents) {
448 AddMessageHandler((new GpuMessageHandler())->Attach(this)); 448 AddMessageHandler((new GpuMessageHandler())->Attach(this));
449 449
450 GpuHTMLSource* html_source = new GpuHTMLSource(); 450 GpuHTMLSource* html_source = new GpuHTMLSource();
451 451
452 // Set up the chrome://gpu/ source. 452 // Set up the chrome://gpu/ source.
453 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 453 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
454 } 454 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698