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