| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } | 184 } |
| 185 | 185 |
| 186 base::ProcessId ChannelMojo::GetPeerPID() const { | 186 base::ProcessId ChannelMojo::GetPeerPID() const { |
| 187 return peer_pid_; | 187 return peer_pid_; |
| 188 } | 188 } |
| 189 | 189 |
| 190 base::ProcessId ChannelMojo::GetSelfPID() const { | 190 base::ProcessId ChannelMojo::GetSelfPID() const { |
| 191 return base::GetCurrentProcId(); | 191 return base::GetCurrentProcId(); |
| 192 } | 192 } |
| 193 | 193 |
| 194 ChannelHandle ChannelMojo::TakePipeHandle() { | |
| 195 NOTREACHED(); | |
| 196 return ChannelHandle(); | |
| 197 } | |
| 198 | |
| 199 void ChannelMojo::OnClientLaunched(base::ProcessHandle handle) { | 194 void ChannelMojo::OnClientLaunched(base::ProcessHandle handle) { |
| 200 bootstrap_->OnClientLaunched(handle); | 195 bootstrap_->OnClientLaunched(handle); |
| 201 } | 196 } |
| 202 | 197 |
| 203 void ChannelMojo::OnMessageReceived(Message& message) { | 198 void ChannelMojo::OnMessageReceived(Message& message) { |
| 204 listener_->OnMessageReceived(message); | 199 listener_->OnMessageReceived(message); |
| 205 if (message.dispatch_error()) | 200 if (message.dispatch_error()) |
| 206 listener_->OnBadMessageReceived(message); | 201 listener_->OnBadMessageReceived(message); |
| 207 } | 202 } |
| 208 | 203 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 handles->push_back(wrapped_handle); | 261 handles->push_back(wrapped_handle); |
| 267 } | 262 } |
| 268 } | 263 } |
| 269 | 264 |
| 270 return MOJO_RESULT_OK; | 265 return MOJO_RESULT_OK; |
| 271 } | 266 } |
| 272 | 267 |
| 273 #endif // defined(OS_POSIX) && !defined(OS_NACL) | 268 #endif // defined(OS_POSIX) && !defined(OS_NACL) |
| 274 | 269 |
| 275 } // namespace IPC | 270 } // namespace IPC |
| OLD | NEW |