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 "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 #if defined(OS_CHROMEOS) | 9 #if defined(OS_CHROMEOS) |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
311 "panel_fitting", | 311 "panel_fitting", |
312 flags & content::GPU_FEATURE_TYPE_PANEL_FITTING, | 312 flags & content::GPU_FEATURE_TYPE_PANEL_FITTING, |
313 #if defined(OS_CHROMEOS) | 313 #if defined(OS_CHROMEOS) |
314 command_line.HasSwitch(ash::switches::kAshDisablePanelFitting), | 314 command_line.HasSwitch(ash::switches::kAshDisablePanelFitting), |
315 #else | 315 #else |
316 true, | 316 true, |
317 #endif | 317 #endif |
318 "Panel fitting is unavailable, either disabled at the command" | 318 "Panel fitting is unavailable, either disabled at the command" |
319 " line or not supported by the current system.", | 319 " line or not supported by the current system.", |
320 false | 320 false |
321 }, | |
322 { | |
323 "force_compositing_mode", | |
324 flags & content::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE, | |
325 !content::IsForceCompositingModeEnabled() && | |
326 (flags & content::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE) == 0, | |
vangelis
2013/01/16 18:04:09
I think it would be more clear if the second part
Zhenyao Mo
2013/01/16 20:53:36
Done.
| |
327 "Force compositing mode is off, either disabled at the command" | |
328 " line or not supported by the current system.", | |
329 false | |
321 } | 330 } |
322 }; | 331 }; |
323 const size_t kNumFeatures = sizeof(kGpuFeatureInfo) / sizeof(GpuFeatureInfo); | 332 const size_t kNumFeatures = sizeof(kGpuFeatureInfo) / sizeof(GpuFeatureInfo); |
324 | 333 |
325 // Build the feature_status field. | 334 // Build the feature_status field. |
326 { | 335 { |
327 ListValue* feature_status_list = new ListValue(); | 336 ListValue* feature_status_list = new ListValue(); |
328 | 337 |
329 for (size_t i = 0; i < kNumFeatures; ++i) { | 338 for (size_t i = 0; i < kNumFeatures; ++i) { |
330 std::string status; | 339 std::string status; |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
669 //////////////////////////////////////////////////////////////////////////////// | 678 //////////////////////////////////////////////////////////////////////////////// |
670 | 679 |
671 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) | 680 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) |
672 : WebUIController(web_ui) { | 681 : WebUIController(web_ui) { |
673 web_ui->AddMessageHandler(new GpuMessageHandler()); | 682 web_ui->AddMessageHandler(new GpuMessageHandler()); |
674 | 683 |
675 // Set up the chrome://gpu-internals/ source. | 684 // Set up the chrome://gpu-internals/ source. |
676 Profile* profile = Profile::FromWebUI(web_ui); | 685 Profile* profile = Profile::FromWebUI(web_ui); |
677 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); | 686 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); |
678 } | 687 } |
OLD | NEW |