| 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/common/chrome_switches.h" | 5 #include "chrome/common/chrome_switches.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 "enable-extension-activity-log-testing"; | 419 "enable-extension-activity-log-testing"; |
| 420 | 420 |
| 421 // Enable the fast unload controller, which speeds up tab/window close by | 421 // Enable the fast unload controller, which speeds up tab/window close by |
| 422 // running a tab's onunload js handler independently of the GUI - | 422 // running a tab's onunload js handler independently of the GUI - |
| 423 // crbug.com/142458 . | 423 // crbug.com/142458 . |
| 424 const char kEnableFastUnload[] = "enable-fast-unload"; | 424 const char kEnableFastUnload[] = "enable-fast-unload"; |
| 425 | 425 |
| 426 // Enables the Material Design version of chrome://extensions. | 426 // Enables the Material Design version of chrome://extensions. |
| 427 const char kEnableMaterialDesignExtensions[] = "enable-md-extensions"; | 427 const char kEnableMaterialDesignExtensions[] = "enable-md-extensions"; |
| 428 | 428 |
| 429 // Enables the Material Design version of chrome://history. | |
| 430 const char kEnableMaterialDesignHistory[] = "enable-md-history"; | |
| 431 | |
| 432 // Enables the Material Design policy page at chrome://md-policy. | 429 // Enables the Material Design policy page at chrome://md-policy. |
| 433 const char kEnableMaterialDesignPolicyPage[] = "enable-md-policy-page"; | 430 const char kEnableMaterialDesignPolicyPage[] = "enable-md-policy-page"; |
| 434 | 431 |
| 435 // Runs the Native Client inside the renderer process and enables GPU plugin | 432 // Runs the Native Client inside the renderer process and enables GPU plugin |
| 436 // (internally adds lEnableGpuPlugin to the command line). | 433 // (internally adds lEnableGpuPlugin to the command line). |
| 437 const char kEnableNaCl[] = "enable-nacl"; | 434 const char kEnableNaCl[] = "enable-nacl"; |
| 438 | 435 |
| 439 // Enables the use of native notifications instead of using the Chrome based | 436 // Enables the use of native notifications instead of using the Chrome based |
| 440 // ones. | 437 // ones. |
| 441 const char kEnableNativeNotifications[] = "enable-native-notifications"; | 438 const char kEnableNativeNotifications[] = "enable-native-notifications"; |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1339 return SettingsWindowEnabled() && | 1336 return SettingsWindowEnabled() && |
| 1340 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 1337 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1341 ::switches::kDisableAboutInSettings); | 1338 ::switches::kDisableAboutInSettings); |
| 1342 } | 1339 } |
| 1343 | 1340 |
| 1344 bool MdExtensionsEnabled() { | 1341 bool MdExtensionsEnabled() { |
| 1345 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1342 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1346 ::switches::kEnableMaterialDesignExtensions); | 1343 ::switches::kEnableMaterialDesignExtensions); |
| 1347 } | 1344 } |
| 1348 | 1345 |
| 1349 bool MdHistoryEnabled() { | |
| 1350 return base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 1351 ::switches::kEnableMaterialDesignHistory); | |
| 1352 } | |
| 1353 | |
| 1354 bool MdPolicyPageEnabled() { | 1346 bool MdPolicyPageEnabled() { |
| 1355 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 1347 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1356 ::switches::kEnableMaterialDesignPolicyPage); | 1348 ::switches::kEnableMaterialDesignPolicyPage); |
| 1357 } | 1349 } |
| 1358 | 1350 |
| 1359 bool SettingsWindowEnabled() { | 1351 bool SettingsWindowEnabled() { |
| 1360 #if defined(OS_CHROMEOS) | 1352 #if defined(OS_CHROMEOS) |
| 1361 return !base::CommandLine::ForCurrentProcess()->HasSwitch( | 1353 return !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1362 ::switches::kDisableSettingsWindow); | 1354 ::switches::kDisableSettingsWindow); |
| 1363 #else | 1355 #else |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1386 | 1378 |
| 1387 // ----------------------------------------------------------------------------- | 1379 // ----------------------------------------------------------------------------- |
| 1388 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. | 1380 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. |
| 1389 // | 1381 // |
| 1390 // You were going to just dump your switches here, weren't you? Instead, please | 1382 // You were going to just dump your switches here, weren't you? Instead, please |
| 1391 // put them in alphabetical order above, or in order inside the appropriate | 1383 // put them in alphabetical order above, or in order inside the appropriate |
| 1392 // ifdef at the bottom. The order should match the header. | 1384 // ifdef at the bottom. The order should match the header. |
| 1393 // ----------------------------------------------------------------------------- | 1385 // ----------------------------------------------------------------------------- |
| 1394 | 1386 |
| 1395 } // namespace switches | 1387 } // namespace switches |
| OLD | NEW |