OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <algorithm> | 10 #include <algorithm> |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 CommandLine* cmd_line = new CommandLine(renderer_path); | 329 CommandLine* cmd_line = new CommandLine(renderer_path); |
330 if (!renderer_prefix.empty()) | 330 if (!renderer_prefix.empty()) |
331 cmd_line->PrependWrapper(renderer_prefix); | 331 cmd_line->PrependWrapper(renderer_prefix); |
332 AppendRendererCommandLine(cmd_line); | 332 AppendRendererCommandLine(cmd_line); |
333 cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, | 333 cmd_line->AppendSwitchWithValue(switches::kProcessChannelID, |
334 ASCIIToWide(channel_id)); | 334 ASCIIToWide(channel_id)); |
335 | 335 |
336 // Spawn the child process asynchronously to avoid blocking the UI thread. | 336 // Spawn the child process asynchronously to avoid blocking the UI thread. |
337 // As long as there's no renderer prefix, we can use the zygote process | 337 // As long as there's no renderer prefix, we can use the zygote process |
338 // at this stage. | 338 // at this stage. |
339 child_process_.reset(new ChildProcessLauncher( | 339 child_process_.reset(new base::MpChildProcessLauncher( |
340 #if defined(OS_WIN) | 340 #if defined(OS_WIN) |
341 FilePath(), | 341 FilePath(), |
342 #elif defined(POSIX) | 342 #elif defined(POSIX) |
343 renderer_prefix.empty(), | 343 renderer_prefix.empty(), |
344 base::environment_vector(), | 344 base::environment_vector(), |
345 channel_->GetClientFileDescriptor(), | 345 channel_->GetClientFileDescriptor(), |
346 #endif | 346 #endif |
347 cmd_line, | 347 cmd_line, |
| 348 &context_, |
348 this)); | 349 this)); |
349 | 350 |
350 fast_shutdown_started_ = false; | 351 fast_shutdown_started_ = false; |
351 } | 352 } |
352 | 353 |
353 return true; | 354 return true; |
354 } | 355 } |
355 | 356 |
356 int BrowserRenderProcessHost::GetNextRoutingID() { | 357 int BrowserRenderProcessHost::GetNextRoutingID() { |
357 return widget_helper_->GetNextRoutingID(); | 358 return widget_helper_->GetNextRoutingID(); |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 IPC::InvalidPlatformFileForTransit(), | 1025 IPC::InvalidPlatformFileForTransit(), |
1025 std::vector<std::string>(), | 1026 std::vector<std::string>(), |
1026 std::string(), | 1027 std::string(), |
1027 false)); | 1028 false)); |
1028 } | 1029 } |
1029 } | 1030 } |
1030 | 1031 |
1031 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { | 1032 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { |
1032 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); | 1033 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); |
1033 } | 1034 } |
OLD | NEW |