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" | 7 #include "base/command_line.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 | 9 |
10 namespace switches { | 10 namespace switches { |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
948 "disable-win32k-renderer-lockdown"; | 948 "disable-win32k-renderer-lockdown"; |
949 const char kEnableWin32kRendererLockDown[] = | 949 const char kEnableWin32kRendererLockDown[] = |
950 "enable-win32k-renderer-lockdown"; | 950 "enable-win32k-renderer-lockdown"; |
951 | 951 |
952 // DirectWrite FontCache is shared by browser to renderers using shared memory. | 952 // DirectWrite FontCache is shared by browser to renderers using shared memory. |
953 // This switch allows specifying suffix to shared memory section name to avoid | 953 // This switch allows specifying suffix to shared memory section name to avoid |
954 // clashes between different instances of Chrome. | 954 // clashes between different instances of Chrome. |
955 const char kFontCacheSharedMemSuffix[] = "font-cache-shared-mem-suffix"; | 955 const char kFontCacheSharedMemSuffix[] = "font-cache-shared-mem-suffix"; |
956 #endif | 956 #endif |
957 | 957 |
| 958 // Enables the use of NPAPI plugins. |
| 959 const char kEnableNpapi[] = "enable-npapi"; |
| 960 |
958 #if defined(ENABLE_PLUGINS) | 961 #if defined(ENABLE_PLUGINS) |
959 // Enables the plugin power saver feature. | 962 // Enables the plugin power saver feature. |
960 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver"; | 963 const char kEnablePluginPowerSaver[] = "enable-plugin-power-saver"; |
961 #endif | 964 #endif |
962 | 965 |
963 #if defined(OS_WIN) | 966 #if defined(OS_WIN) |
964 bool IsWin32kRendererLockdownEnabled() { | 967 bool IsWin32kRendererLockdownEnabled() { |
965 const std::string group_name = | 968 const std::string group_name = |
966 base::FieldTrialList::FindFullName("Win32kLockdown"); | 969 base::FieldTrialList::FindFullName("Win32kLockdown"); |
967 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 970 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
968 if (cmd_line->HasSwitch(kEnableWin32kRendererLockDown)) | 971 if (cmd_line->HasSwitch(kEnableWin32kRendererLockDown)) |
969 return true; | 972 return true; |
970 if (cmd_line->HasSwitch(kDisableWin32kRendererLockDown)) | 973 if (cmd_line->HasSwitch(kDisableWin32kRendererLockDown)) |
971 return false; | 974 return false; |
972 // Default. | 975 // Default. |
973 return group_name == "Enabled"; | 976 return group_name == "Enabled"; |
974 } | 977 } |
975 #endif | 978 #endif |
976 | 979 |
977 // Don't dump stuff here, follow the same order as the header. | 980 // Don't dump stuff here, follow the same order as the header. |
978 | 981 |
979 } // namespace switches | 982 } // namespace switches |
OLD | NEW |