| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ipc/mojo/ipc_channel_mojo.h" | 5 #include "ipc/mojo/ipc_channel_mojo.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "ipc/ipc_listener.h" | 10 #include "ipc/ipc_listener.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 } | 320 } |
| 321 | 321 |
| 322 return message_reader_->Send(make_scoped_ptr(message)); | 322 return message_reader_->Send(make_scoped_ptr(message)); |
| 323 } | 323 } |
| 324 | 324 |
| 325 base::ProcessId ChannelMojo::GetPeerPID() const { | 325 base::ProcessId ChannelMojo::GetPeerPID() const { |
| 326 return peer_pid_; | 326 return peer_pid_; |
| 327 } | 327 } |
| 328 | 328 |
| 329 base::ProcessId ChannelMojo::GetSelfPID() const { | 329 base::ProcessId ChannelMojo::GetSelfPID() const { |
| 330 return base::GetCurrentProcId(); | 330 return bootstrap_->GetSelfPID(); |
| 331 } | 331 } |
| 332 | 332 |
| 333 void ChannelMojo::OnClientLaunched(base::ProcessHandle handle) { | 333 void ChannelMojo::OnClientLaunched(base::ProcessHandle handle) { |
| 334 bootstrap_->OnClientLaunched(handle); | 334 bootstrap_->OnClientLaunched(handle); |
| 335 } | 335 } |
| 336 | 336 |
| 337 void ChannelMojo::OnMessageReceived(Message& message) { | 337 void ChannelMojo::OnMessageReceived(Message& message) { |
| 338 TRACE_EVENT2("ipc,toplevel", "ChannelMojo::OnMessageReceived", | 338 TRACE_EVENT2("ipc,toplevel", "ChannelMojo::OnMessageReceived", |
| 339 "class", IPC_MESSAGE_ID_CLASS(message.type()), | 339 "class", IPC_MESSAGE_ID_CLASS(message.type()), |
| 340 "line", IPC_MESSAGE_ID_LINE(message.type())); | 340 "line", IPC_MESSAGE_ID_LINE(message.type())); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 if (!ok) { | 422 if (!ok) { |
| 423 DLOG(ERROR) << "Failed to add new Mojo handle."; | 423 DLOG(ERROR) << "Failed to add new Mojo handle."; |
| 424 return MOJO_RESULT_UNKNOWN; | 424 return MOJO_RESULT_UNKNOWN; |
| 425 } | 425 } |
| 426 } | 426 } |
| 427 | 427 |
| 428 return MOJO_RESULT_OK; | 428 return MOJO_RESULT_OK; |
| 429 } | 429 } |
| 430 | 430 |
| 431 } // namespace IPC | 431 } // namespace IPC |
| OLD | NEW |