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/browser/zygote_host/zygote_host_impl_linux.h" | 5 #include "content/browser/zygote_host/zygote_host_impl_linux.h" |
6 | 6 |
7 #include <sys/socket.h> | 7 #include <sys/socket.h> |
8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 #include <unistd.h> | 10 #include <unistd.h> |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 static const char* kForwardSwitches[] = { | 95 static const char* kForwardSwitches[] = { |
96 switches::kAllowSandboxDebugging, | 96 switches::kAllowSandboxDebugging, |
97 switches::kLoggingLevel, | 97 switches::kLoggingLevel, |
98 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. | 98 switches::kEnableLogging, // Support, e.g., --enable-logging=stderr. |
99 switches::kV, | 99 switches::kV, |
100 switches::kVModule, | 100 switches::kVModule, |
101 switches::kRegisterPepperPlugins, | 101 switches::kRegisterPepperPlugins, |
102 switches::kDisableSeccompSandbox, | 102 switches::kDisableSeccompSandbox, |
103 switches::kDisableSeccompFilterSandbox, | 103 switches::kDisableSeccompFilterSandbox, |
104 switches::kEnableSeccompSandbox, | 104 switches::kEnableSeccompSandbox, |
| 105 |
105 // Zygote process needs to know what resources to have loaded when it | 106 // Zygote process needs to know what resources to have loaded when it |
106 // becomes a renderer process. | 107 // becomes a renderer process. |
| 108 switches::kEnableTouchEvents, |
107 switches::kForceDeviceScaleFactor, | 109 switches::kForceDeviceScaleFactor, |
| 110 switches::kTouchOptimizedUI, |
| 111 |
108 switches::kNoSandbox, | 112 switches::kNoSandbox, |
109 }; | 113 }; |
110 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, | 114 cmd_line.CopySwitchesFrom(browser_command_line, kForwardSwitches, |
111 arraysize(kForwardSwitches)); | 115 arraysize(kForwardSwitches)); |
112 | 116 |
113 content::GetContentClient()->browser()->AppendExtraCommandLineSwitches( | 117 content::GetContentClient()->browser()->AppendExtraCommandLineSwitches( |
114 &cmd_line, -1); | 118 &cmd_line, -1); |
115 | 119 |
116 sandbox_binary_ = sandbox_cmd.c_str(); | 120 sandbox_binary_ = sandbox_cmd.c_str(); |
117 | 121 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 481 |
478 pid_t ZygoteHostImpl::GetSandboxHelperPid() const { | 482 pid_t ZygoteHostImpl::GetSandboxHelperPid() const { |
479 return RenderSandboxHostLinux::GetInstance()->pid(); | 483 return RenderSandboxHostLinux::GetInstance()->pid(); |
480 } | 484 } |
481 | 485 |
482 int ZygoteHostImpl::GetSandboxStatus() const { | 486 int ZygoteHostImpl::GetSandboxStatus() const { |
483 if (have_read_sandbox_status_word_) | 487 if (have_read_sandbox_status_word_) |
484 return sandbox_status_; | 488 return sandbox_status_; |
485 return 0; | 489 return 0; |
486 } | 490 } |
OLD | NEW |