Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: content/browser/browser_child_process_host_impl.cc

Issue 1875023002: Remove ChildProcessMsg_SetMojoParentPipeHandle message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/common/child_process_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 notify_child_disconnected_ = false; 400 notify_child_disconnected_ = false;
401 delete delegate_; // Will delete us 401 delete delegate_; // Will delete us
402 } 402 }
403 403
404 void BrowserChildProcessHostImpl::OnProcessLaunched() { 404 void BrowserChildProcessHostImpl::OnProcessLaunched() {
405 DCHECK_CURRENTLY_ON(BrowserThread::IO); 405 DCHECK_CURRENTLY_ON(BrowserThread::IO);
406 406
407 const base::Process& process = child_process_->GetProcess(); 407 const base::Process& process = child_process_->GetProcess();
408 DCHECK(process.IsValid()); 408 DCHECK(process.IsValid());
409 409
410 mojo::edk::ScopedPlatformHandle client_pipe =
411 mojo::edk::ChildProcessLaunched(process.Handle());
412 Send(new ChildProcessMsg_SetMojoParentPipeHandle(
413 IPC::GetPlatformFileForTransit(client_pipe.release().handle, true)));
414
415 #if defined(OS_WIN) 410 #if defined(OS_WIN)
416 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the 411 // Start a WaitableEventWatcher that will invoke OnProcessExitedEarly if the
417 // child process exits. This watcher is stopped once the IPC channel is 412 // child process exits. This watcher is stopped once the IPC channel is
418 // connected and the exit of the child process is detecter by an error on the 413 // connected and the exit of the child process is detecter by an error on the
419 // IPC channel thereafter. 414 // IPC channel thereafter.
420 DCHECK(!early_exit_watcher_.GetWatchedObject()); 415 DCHECK(!early_exit_watcher_.GetWatchedObject());
421 early_exit_watcher_.StartWatchingOnce(process.Handle(), this); 416 early_exit_watcher_.StartWatchingOnce(process.Handle(), this);
422 #endif 417 #endif
423 418
424 // TODO(rvargas) crbug.com/417532: Don't store a handle. 419 // TODO(rvargas) crbug.com/417532: Don't store a handle.
(...skipping 15 matching lines...) Expand all
440 435
441 #if defined(OS_WIN) 436 #if defined(OS_WIN)
442 437
443 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) { 438 void BrowserChildProcessHostImpl::OnObjectSignaled(HANDLE object) {
444 OnChildDisconnected(); 439 OnChildDisconnected();
445 } 440 }
446 441
447 #endif 442 #endif
448 443
449 } // namespace content 444 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/child_process_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698