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

Side by Side Diff: content/public/common/content_switches.cc

Issue 872673002: Do not use win32k renderer lockdown if DirectWrite is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move IsWin32kRendererLockdownEnabled to content/common Created 5 years, 10 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 "content/public/common/content_switches.h" 5 #include "content/public/common/content_switches.h"
6 6
7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h"
9
10 namespace switches { 7 namespace switches {
11 8
12 // The number of MSAA samples for canvas2D. Requires MSAA support by GPU to 9 // The number of MSAA samples for canvas2D. Requires MSAA support by GPU to
13 // have an effect. 0 disables MSAA. 10 // have an effect. 0 disables MSAA.
14 const char kAcceleratedCanvas2dMSAASampleCount[] = "canvas-msaa-sample-count"; 11 const char kAcceleratedCanvas2dMSAASampleCount[] = "canvas-msaa-sample-count";
15 12
16 // By default, file:// URIs cannot read other file:// URIs. This is an 13 // By default, file:// URIs cannot read other file:// URIs. This is an
17 // override for developers who need the old behavior for testing. 14 // override for developers who need the old behavior for testing.
18 const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files"; 15 const char kAllowFileAccessFromFiles[] = "allow-file-access-from-files";
19 16
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 #endif 948 #endif
952 949
953 // Enables the use of NPAPI plugins. 950 // Enables the use of NPAPI plugins.
954 const char kEnableNpapi[] = "enable-npapi"; 951 const char kEnableNpapi[] = "enable-npapi";
955 952
956 #if defined(ENABLE_PLUGINS) 953 #if defined(ENABLE_PLUGINS)
957 // Enables the plugin power saver feature. 954 // Enables the plugin power saver feature.
958 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver"; 955 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver";
959 #endif 956 #endif
960 957
961 #if defined(OS_WIN)
962 bool IsWin32kRendererLockdownEnabled() {
963 const std::string group_name =
964 base::FieldTrialList::FindFullName("Win32kLockdown");
965 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
966 if (cmd_line->HasSwitch(kEnableWin32kRendererLockDown))
967 return true;
968 if (cmd_line->HasSwitch(kDisableWin32kRendererLockDown))
969 return false;
970 // Default.
971 return group_name == "Enabled";
972 }
973 #endif
974
975 // Don't dump stuff here, follow the same order as the header. 958 // Don't dump stuff here, follow the same order as the header.
976 959
977 } // namespace switches 960 } // namespace switches
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698