| 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 #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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |