summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/app/chrome_dll_main.cc7
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--chrome/test/nacl/nacl_test.cc2
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