diff options
author | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 21:44:43 +0000 |
---|---|---|
committer | gregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-26 21:44:43 +0000 |
commit | 3213339b064c87a06785145cbe86de65cf42fd6e (patch) | |
tree | 8dd86aa67e1b303c1183068cbf8cf18ed33b9a7a | |
parent | 37ad8892fe9576eef898295e50e7d42b5d7a3e27 (diff) | |
download | chromium_src-3213339b064c87a06785145cbe86de65cf42fd6e.zip chromium_src-3213339b064c87a06785145cbe86de65cf42fd6e.tar.gz chromium_src-3213339b064c87a06785145cbe86de65cf42fd6e.tar.bz2 |
Add --enable-nacl switch that enables both NaCl and GPU plugins.
BUG=38554
TEST=nacl_ui_tests
Review URL: http://codereview.chromium.org/1445001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42829 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 7 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/test/nacl/nacl_test.cc | 2 |
4 files changed, 13 insertions, 1 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index b865817..3f54f04 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -493,6 +493,13 @@ int ChromeMain(int argc, char** argv) { CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR); #endif // OS_POSIX + if (parsed_command_line.HasSwitch(switches::kEnableNaCl)) { + // NaCl currently requires two flags to run + CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); + singleton_command_line->AppendSwitch(switches::kInternalNaCl); + singleton_command_line->AppendSwitch(switches::kEnableGPUPlugin); + } + base::ProcessId browser_pid; if (process_type.empty()) { browser_pid = base::GetCurrentProcId(); diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index a21e06d..2b9b02e 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -270,6 +270,10 @@ const char kEnableLogging[] = "enable-logging"; // assumed to be sRGB. const char kEnableMonitorProfile[] = "enable-monitor-profile"; +// Runs the Native Client inside the renderer process and enables GPU plugin +// (internally adds kInternalNaCl and lEnableGpuPlugin to the command line). +const char kEnableNaCl[] = "enable-nacl"; + // Enable Native Web Worker support. const char kEnableNativeWebWorkers[] = "enable-native-web-workers"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index e6d9180..84cbdff 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -92,6 +92,7 @@ extern const char kEnableInternalFlash[]; extern const char kEnableIPv6[]; extern const char kEnableLogging[]; extern const char kEnableMonitorProfile[]; +extern const char kEnableNaCl[]; extern const char kEnableNativeWebWorkers[]; extern const char kEnablePrivacyBlacklists[]; extern const char kEnableRendererAccessibility[]; diff --git a/chrome/test/nacl/nacl_test.cc b/chrome/test/nacl/nacl_test.cc index 2d2b8f6..4d5d749 100644 --- a/chrome/test/nacl/nacl_test.cc +++ b/chrome/test/nacl/nacl_test.cc @@ -56,7 +56,7 @@ const FilePath::CharType kServerHtmlFileName[] = NaClTest::NaClTest() : UITest() { - launch_arguments_.AppendSwitch(switches::kInternalNaCl); + launch_arguments_.AppendSwitch(switches::kEnableNaCl); #if defined(OS_MACOSX) launch_arguments_.AppendSwitch(switches::kNoSandbox); #endif |