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

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

Issue 11186039: Move CC switches to cc/switches.h. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Switch ui/compositor back to using compositorSupport() Created 8 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | content/DEPS » ('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 "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"
11 #endif 11 #endif
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/bind_helpers.h" 13 #include "base/bind_helpers.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/i18n/time_formatting.h" 15 #include "base/i18n/time_formatting.h"
16 #include "base/string_number_conversions.h" 16 #include "base/string_number_conversions.h"
17 #include "base/stringprintf.h" 17 #include "base/stringprintf.h"
18 #include "base/sys_info.h" 18 #include "base/sys_info.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "cc/switches.h"
20 #include "chrome/browser/crash_upload_list.h" 21 #include "chrome/browser/crash_upload_list.h"
21 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 23 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
23 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" 24 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
24 #include "chrome/browser/ui/webui/crashes_ui.h" 25 #include "chrome/browser/ui/webui/crashes_ui.h"
25 #include "chrome/common/chrome_version_info.h" 26 #include "chrome/common/chrome_version_info.h"
26 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
27 #include "content/public/browser/browser_thread.h" 28 #include "content/public/browser/browser_thread.h"
28 #include "content/public/browser/gpu_data_manager.h" 29 #include "content/public/browser/gpu_data_manager.h"
29 #include "content/public/browser/gpu_data_manager_observer.h" 30 #include "content/public/browser/gpu_data_manager_observer.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 flags & (content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING | 232 flags & (content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING |
232 content::GPU_FEATURE_TYPE_3D_CSS), 233 content::GPU_FEATURE_TYPE_3D_CSS),
233 command_line.HasSwitch(switches::kDisableAcceleratedLayers), 234 command_line.HasSwitch(switches::kDisableAcceleratedLayers),
234 "Accelerated layers have been disabled at the command line.", 235 "Accelerated layers have been disabled at the command line.",
235 false 236 false
236 }, 237 },
237 { 238 {
238 "css_animation", 239 "css_animation",
239 flags & (content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING | 240 flags & (content::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING |
240 content::GPU_FEATURE_TYPE_3D_CSS), 241 content::GPU_FEATURE_TYPE_3D_CSS),
241 command_line.HasSwitch(switches::kDisableThreadedAnimation) || 242 command_line.HasSwitch(cc::switches::kDisableThreadedAnimation) ||
242 command_line.HasSwitch(switches::kDisableAcceleratedCompositing) || 243 command_line.HasSwitch(switches::kDisableAcceleratedCompositing) ||
243 command_line.HasSwitch(switches::kDisableAcceleratedLayers), 244 command_line.HasSwitch(switches::kDisableAcceleratedLayers),
244 "Accelerated CSS animation has been disabled at the command line.", 245 "Accelerated CSS animation has been disabled at the command line.",
245 true 246 true
246 }, 247 },
247 { 248 {
248 "webgl", 249 "webgl",
249 flags & content::GPU_FEATURE_TYPE_WEBGL, 250 flags & content::GPU_FEATURE_TYPE_WEBGL,
250 #if defined(OS_ANDROID) 251 #if defined(OS_ANDROID)
251 !command_line.HasSwitch(switches::kEnableExperimentalWebGL), 252 !command_line.HasSwitch(switches::kEnableExperimentalWebGL),
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 //////////////////////////////////////////////////////////////////////////////// 672 ////////////////////////////////////////////////////////////////////////////////
672 673
673 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui) 674 GpuInternalsUI::GpuInternalsUI(content::WebUI* web_ui)
674 : WebUIController(web_ui) { 675 : WebUIController(web_ui) {
675 web_ui->AddMessageHandler(new GpuMessageHandler()); 676 web_ui->AddMessageHandler(new GpuMessageHandler());
676 677
677 // Set up the chrome://gpu-internals/ source. 678 // Set up the chrome://gpu-internals/ source.
678 Profile* profile = Profile::FromWebUI(web_ui); 679 Profile* profile = Profile::FromWebUI(web_ui);
679 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource()); 680 ChromeURLDataManager::AddDataSource(profile, CreateGpuHTMLSource());
680 } 681 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | content/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698