| 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/browser_child_process_host_impl.h" | 5 #include "content/browser/browser_child_process_host_impl.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/dump_without_crashing.h" | 10 #include "base/debug/dump_without_crashing.h" |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 } | 409 } |
| 410 | 410 |
| 411 void BrowserChildProcessHostImpl::OnProcessLaunched() { | 411 void BrowserChildProcessHostImpl::OnProcessLaunched() { |
| 412 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 412 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 413 | 413 |
| 414 const base::Process& process = child_process_->GetProcess(); | 414 const base::Process& process = child_process_->GetProcess(); |
| 415 DCHECK(process.IsValid()); | 415 DCHECK(process.IsValid()); |
| 416 | 416 |
| 417 mojo::edk::ScopedPlatformHandle client_pipe = | 417 mojo::edk::ScopedPlatformHandle client_pipe = |
| 418 mojo::edk::ChildProcessLaunched(process.Handle()); | 418 mojo::edk::ChildProcessLaunched(process.Handle()); |
| 419 Send(new ChildProcessMsg_SetMojoParentPipeHandle(IPC::GetFileHandleForProcess( | 419 Send(new ChildProcessMsg_SetMojoParentPipeHandle( |
| 420 client_pipe.release().handle, process.Handle(), true))); | 420 IPC::GetPlatformFileForTransit(client_pipe.release().handle, true))); |
| 421 | 421 |
| 422 #if defined(OS_WIN) | 422 #if defined(OS_WIN) |
| 423 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the | 423 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the |
| 424 // child process exits. This watcher is stopped once the IPC channel is | 424 // child process exits. This watcher is stopped once the IPC channel is |
| 425 // connected and the exit of the child process is detecter by an error on the | 425 // connected and the exit of the child process is detecter by an error on the |
| 426 // IPC channel thereafter. | 426 // IPC channel thereafter. |
| 427 DCHECK(!early_exit_watcher_.GetWatchedObject()); | 427 DCHECK(!early_exit_watcher_.GetWatchedObject()); |
| 428 early_exit_watcher_.StartWatchingOnce(process.Handle(), this); | 428 early_exit_watcher_.StartWatchingOnce(process.Handle(), this); |
| 429 #endif | 429 #endif |
| 430 | 430 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 447 | 447 |
| 448 #if defined(OS_WIN) | 448 #if defined(OS_WIN) |
| 449 | 449 |
| 450 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { | 450 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { |
| 451 OnChildDisconnected(); | 451 OnChildDisconnected(); |
| 452 } | 452 } |
| 453 | 453 |
| 454 #endif | 454 #endif |
| 455 | 455 |
| 456 } // namespace content | 456 } // namespace content |
| OLD | NEW |