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

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

Issue 10909242: Add "panel_fitting" GPU feature type and use it for mirror mode. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reorganized code per oshima's suggestion. Created 8 years, 3 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
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 "chrome/browser/ui/webui/gpu_internals_ui.h" 5 #include "chrome/browser/ui/webui/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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 " about:flags or command line.", 276 " about:flags or command line.",
277 false 277 false
278 }, 278 },
279 { 279 {
280 "video_decode", 280 "video_decode",
281 flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE, 281 flags & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE,
282 command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode), 282 command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
283 "Accelerated video decode has been disabled, either via about:flags" 283 "Accelerated video decode has been disabled, either via about:flags"
284 " or command line.", 284 " or command line.",
285 true 285 true
286 },
287 {
288 "panel_fitting",
289 flags & content::GPU_FEATURE_TYPE_PANEL_FITTING,
290 command_line.HasSwitch(switches::kDisablePanelFitting),
291 "Panel fitting is unavailable, either disabled at the command"
292 " line or not supported by the current system.",
293 false
286 } 294 }
287 }; 295 };
288 const size_t kNumFeatures = sizeof(kGpuFeatureInfo) / sizeof(GpuFeatureInfo); 296 const size_t kNumFeatures = sizeof(kGpuFeatureInfo) / sizeof(GpuFeatureInfo);
289 297
290 // Build the feature_status field. 298 // Build the feature_status field.
291 { 299 {
292 ListValue* feature_status_list = new ListValue(); 300 ListValue* feature_status_list = new ListValue();
293 301
294 for (size_t i = 0; i < kNumFeatures; ++i) { 302 for (size_t i = 0; i < kNumFeatures; ++i) {
295 std::string status; 303 std::string status;
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 //////////////////////////////////////////////////////////////////////////////// 628 ////////////////////////////////////////////////////////////////////////////////
621 629
622 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) 630 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui)
623 : WebUIController(web_ui) { 631 : WebUIController(web_ui) {
624 web_ui->AddMessageHandler(new GpuMessageHandler()); 632 web_ui->AddMessageHandler(new GpuMessageHandler());
625 633
626 // Set up the chrome://gpu-internals/ source. 634 // Set up the chrome://gpu-internals/ source.
627 Profile* profile = Profile::FromWebUI(web_ui); 635 Profile* profile = Profile::FromWebUI(web_ui);
628 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); 636 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource());
629 } 637 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698