Chromium Code Reviews| 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 // 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 "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 632 g_in_process_thread = in_process_renderer_->message_loop(); | 632 g_in_process_thread = in_process_renderer_->message_loop(); |
| 633 | 633 |
| 634 OnProcessLaunched(); // Fake a callback that the process is ready. | 634 OnProcessLaunched(); // Fake a callback that the process is ready. |
| 635 } else { | 635 } else { |
| 636 // Build command line for renderer. We call AppendRendererCommandLine() | 636 // Build command line for renderer. We call AppendRendererCommandLine() |
| 637 // first so the process type argument will appear first. | 637 // first so the process type argument will appear first. |
| 638 base::CommandLine* cmd_line = new base::CommandLine(renderer_path); | 638 base::CommandLine* cmd_line = new base::CommandLine(renderer_path); |
| 639 if (!renderer_prefix.empty()) | 639 if (!renderer_prefix.empty()) |
| 640 cmd_line->PrependWrapper(renderer_prefix); | 640 cmd_line->PrependWrapper(renderer_prefix); |
| 641 AppendRendererCommandLine(cmd_line); | 641 AppendRendererCommandLine(cmd_line); |
| 642 | |
| 643 if (browser_command_line.HasSwitch(switches::kRendererWaitForDebugger)) | |
| 644 cmd_line->AppendSwitch(switches::kWaitForDebugger); | |
|
Charlie Reis
2014/08/29 00:04:24
This belongs in PropagateBrowserCommandLineToRende
Jaekyun Seok (inactive)
2014/08/29 01:05:07
Done.
| |
| 645 | |
| 642 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); | 646 cmd_line->AppendSwitchASCII(switches::kProcessChannelID, channel_id); |
| 643 | 647 |
| 644 // Spawn the child process asynchronously to avoid blocking the UI thread. | 648 // Spawn the child process asynchronously to avoid blocking the UI thread. |
| 645 // As long as there's no renderer prefix, we can use the zygote process | 649 // As long as there's no renderer prefix, we can use the zygote process |
| 646 // at this stage. | 650 // at this stage. |
| 647 child_process_launcher_.reset(new ChildProcessLauncher( | 651 child_process_launcher_.reset(new ChildProcessLauncher( |
| 648 new RendererSandboxedProcessLauncherDelegate(channel_.get()), | 652 new RendererSandboxedProcessLauncherDelegate(channel_.get()), |
| 649 cmd_line, | 653 cmd_line, |
| 650 GetID(), | 654 GetID(), |
| 651 this)); | 655 this)); |
| (...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2353 } | 2357 } |
| 2354 | 2358 |
| 2355 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( | 2359 void RenderProcessHostImpl::OnDeletedGpuMemoryBuffer( |
| 2356 gfx::GpuMemoryBufferType type, | 2360 gfx::GpuMemoryBufferType type, |
| 2357 const gfx::GpuMemoryBufferId& id) { | 2361 const gfx::GpuMemoryBufferId& id) { |
| 2358 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2362 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2359 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); | 2363 GpuMemoryBufferImpl::DeletedByChildProcess(type, id, GetHandle()); |
| 2360 } | 2364 } |
| 2361 | 2365 |
| 2362 } // namespace content | 2366 } // namespace content |
| OLD | NEW |