| 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 "mojo/edk/system/channel_manager.h" | 5 #include "mojo/edk/system/channel_manager.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "mojo/edk/system/channel.h" | 11 #include "mojo/edk/system/channel.h" |
| 12 #include "mojo/edk/system/channel_endpoint.h" | 12 #include "mojo/edk/system/channel_endpoint.h" |
| 13 #include "mojo/edk/system/message_pipe_dispatcher.h" | 13 #include "mojo/edk/system/message_pipe_dispatcher.h" |
| 14 | 14 |
| 15 using mojo::util::MakeRefCounted; |
| 16 using mojo::util::RefPtr; |
| 17 |
| 15 namespace mojo { | 18 namespace mojo { |
| 16 namespace system { | 19 namespace system { |
| 17 | 20 |
| 18 namespace { | 21 namespace { |
| 19 | 22 |
| 20 // TODO(vtl): |channel| should be an rvalue reference, but that currently | 23 // TODO(vtl): |channel| should be an rvalue reference, but that currently |
| 21 // doesn't work with base::Bind. | 24 // doesn't work with base::Bind. |
| 22 void ShutdownChannelHelper( | 25 void ShutdownChannelHelper( |
| 23 RefPtr<Channel> channel, | 26 RefPtr<Channel> channel, |
| 24 const base::Closure& callback, | 27 const base::Closure& callback, |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 CreateChannelOnIOThreadHelper(channel_id, platform_handle.Pass(), | 199 CreateChannelOnIOThreadHelper(channel_id, platform_handle.Pass(), |
| 197 std::move(bootstrap_channel_endpoint)); | 200 std::move(bootstrap_channel_endpoint)); |
| 198 if (callback_thread_task_runner) | 201 if (callback_thread_task_runner) |
| 199 embedder::PlatformPostTask(callback_thread_task_runner.get(), callback); | 202 embedder::PlatformPostTask(callback_thread_task_runner.get(), callback); |
| 200 else | 203 else |
| 201 callback.Run(); | 204 callback.Run(); |
| 202 } | 205 } |
| 203 | 206 |
| 204 } // namespace system | 207 } // namespace system |
| 205 } // namespace mojo | 208 } // namespace mojo |
| OLD | NEW |