OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 cmd_line.AppendSwitch(switches::kNoErrorDialogs); | 253 cmd_line.AppendSwitch(switches::kNoErrorDialogs); |
254 | 254 |
255 // propagate the following switches to the renderer command line | 255 // propagate the following switches to the renderer command line |
256 // (along with any associated values) if present in the browser command line | 256 // (along with any associated values) if present in the browser command line |
257 static const wchar_t* const switch_names[] = { | 257 static const wchar_t* const switch_names[] = { |
258 switches::kRendererAssertTest, | 258 switches::kRendererAssertTest, |
259 switches::kRendererCrashTest, | 259 switches::kRendererCrashTest, |
260 switches::kRendererStartupDialog, | 260 switches::kRendererStartupDialog, |
261 switches::kNoSandbox, | 261 switches::kNoSandbox, |
262 switches::kTestSandbox, | 262 switches::kTestSandbox, |
| 263 #if !defined (GOOGLE_CHROME_BUILD) |
263 switches::kInProcessPlugins, | 264 switches::kInProcessPlugins, |
| 265 #endif |
264 switches::kDomAutomationController, | 266 switches::kDomAutomationController, |
265 switches::kUserAgent, | 267 switches::kUserAgent, |
266 switches::kJavaScriptFlags, | 268 switches::kJavaScriptFlags, |
267 switches::kRecordMode, | 269 switches::kRecordMode, |
268 switches::kPlaybackMode, | 270 switches::kPlaybackMode, |
269 switches::kDisableBreakpad, | 271 switches::kDisableBreakpad, |
270 switches::kFullMemoryCrashReport, | 272 switches::kFullMemoryCrashReport, |
271 switches::kEnableLogging, | 273 switches::kEnableLogging, |
272 switches::kDumpHistogramsOnExit, | 274 switches::kDumpHistogramsOnExit, |
273 switches::kDisableLogging, | 275 switches::kDisableLogging, |
(...skipping 16 matching lines...) Expand all Loading... |
290 cmd_line.AppendSwitchWithValue(switch_names[i], | 292 cmd_line.AppendSwitchWithValue(switch_names[i], |
291 browser_command_line.GetSwitchValue(switch_names[i])); | 293 browser_command_line.GetSwitchValue(switch_names[i])); |
292 } | 294 } |
293 } | 295 } |
294 | 296 |
295 // Pass on the browser locale. | 297 // Pass on the browser locale. |
296 const std::wstring locale = g_browser_process->GetApplicationLocale(); | 298 const std::wstring locale = g_browser_process->GetApplicationLocale(); |
297 cmd_line.AppendSwitchWithValue(switches::kLang, locale); | 299 cmd_line.AppendSwitchWithValue(switches::kLang, locale); |
298 | 300 |
299 bool in_sandbox = !browser_command_line.HasSwitch(switches::kNoSandbox); | 301 bool in_sandbox = !browser_command_line.HasSwitch(switches::kNoSandbox); |
| 302 #if !defined (GOOGLE_CHROME_BUILD) |
300 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { | 303 if (browser_command_line.HasSwitch(switches::kInProcessPlugins)) { |
301 // In process plugins won't work if the sandbox is enabled. | 304 // In process plugins won't work if the sandbox is enabled. |
302 in_sandbox = false; | 305 in_sandbox = false; |
303 } | 306 } |
| 307 #endif |
304 | 308 |
305 #if defined(OS_WIN) | 309 #if defined(OS_WIN) |
306 bool child_needs_help = | 310 bool child_needs_help = |
307 DebugFlags::ProcessDebugFlags(&cmd_line, | 311 DebugFlags::ProcessDebugFlags(&cmd_line, |
308 ChildProcessInfo::RENDER_PROCESS, | 312 ChildProcessInfo::RENDER_PROCESS, |
309 in_sandbox); | 313 in_sandbox); |
310 #elif defined(OS_POSIX) | 314 #elif defined(OS_POSIX) |
311 if (browser_command_line.HasSwitch(switches::kRendererCmdPrefix)) { | 315 if (browser_command_line.HasSwitch(switches::kRendererCmdPrefix)) { |
312 // launch the renderer child with some prefix (usually "gdb --args") | 316 // launch the renderer child with some prefix (usually "gdb --args") |
313 const std::wstring prefix = | 317 const std::wstring prefix = |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 SendUserScriptsUpdate(shared_memory); | 901 SendUserScriptsUpdate(shared_memory); |
898 } | 902 } |
899 break; | 903 break; |
900 } | 904 } |
901 default: { | 905 default: { |
902 NOTREACHED(); | 906 NOTREACHED(); |
903 break; | 907 break; |
904 } | 908 } |
905 } | 909 } |
906 } | 910 } |
OLD | NEW |