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/child/child_thread.h" | 5 #include "content/child/child_thread.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 void ChildThread::OnChannelConnected(int32 peer_pid) { | 347 void ChildThread::OnChannelConnected(int32 peer_pid) { |
348 channel_connected_factory_.InvalidateWeakPtrs(); | 348 channel_connected_factory_.InvalidateWeakPtrs(); |
349 } | 349 } |
350 | 350 |
351 void ChildThread::OnChannelError() { | 351 void ChildThread::OnChannelError() { |
352 set_on_channel_error_called(true); | 352 set_on_channel_error_called(true); |
353 base::MessageLoop::current()->Quit(); | 353 base::MessageLoop::current()->Quit(); |
354 } | 354 } |
355 | 355 |
356 void ChildThread::ConnectToService( | 356 void ChildThread::AcceptConnection( |
357 const mojo::String& service_name, | 357 const mojo::String& service_name, |
358 mojo::ScopedMessagePipeHandle message_pipe) { | 358 mojo::ScopedMessagePipeHandle message_pipe) { |
359 // By default, we don't expect incoming connections. | 359 // By default, we don't expect incoming connections. |
360 NOTREACHED(); | 360 NOTREACHED(); |
361 } | 361 } |
362 | 362 |
363 bool ChildThread::Send(IPC::Message* msg) { | 363 bool ChildThread::Send(IPC::Message* msg) { |
364 DCHECK(base::MessageLoop::current() == message_loop()); | 364 DCHECK(base::MessageLoop::current() == message_loop()); |
365 if (!channel_) { | 365 if (!channel_) { |
366 delete msg; | 366 delete msg; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 // inflight that would addref it. | 542 // inflight that would addref it. |
543 Send(new ChildProcessHostMsg_ShutdownRequest); | 543 Send(new ChildProcessHostMsg_ShutdownRequest); |
544 } | 544 } |
545 | 545 |
546 void ChildThread::EnsureConnected() { | 546 void ChildThread::EnsureConnected() { |
547 VLOG(0) << "ChildThread::EnsureConnected()"; | 547 VLOG(0) << "ChildThread::EnsureConnected()"; |
548 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); | 548 base::KillProcess(base::GetCurrentProcessHandle(), 0, false); |
549 } | 549 } |
550 | 550 |
551 } // namespace content | 551 } // namespace content |
OLD | NEW |