| 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/embedder/embedder.h" | 5 #include "mojo/edk/embedder/embedder.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/atomicops.h" | 9 #include "base/atomicops.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 DCHECK(!internal::g_platform_support); | 89 DCHECK(!internal::g_platform_support); |
| 90 internal::g_platform_support = platform_support.release(); | 90 internal::g_platform_support = platform_support.release(); |
| 91 | 91 |
| 92 DCHECK(!internal::g_core); | 92 DCHECK(!internal::g_core); |
| 93 internal::g_core = new system::Core(internal::g_platform_support); | 93 internal::g_core = new system::Core(internal::g_platform_support); |
| 94 } | 94 } |
| 95 | 95 |
| 96 MojoResult AsyncWait(MojoHandle handle, | 96 MojoResult AsyncWait(MojoHandle handle, |
| 97 MojoHandleSignals signals, | 97 MojoHandleSignals signals, |
| 98 const base::Callback<void(MojoResult)>& callback) { | 98 const std::function<void(MojoResult)>& callback) { |
| 99 return internal::g_core->AsyncWait(handle, signals, callback); | 99 return internal::g_core->AsyncWait(handle, signals, callback); |
| 100 } | 100 } |
| 101 | 101 |
| 102 MojoResult CreatePlatformHandleWrapper( | 102 MojoResult CreatePlatformHandleWrapper( |
| 103 ScopedPlatformHandle platform_handle, | 103 ScopedPlatformHandle platform_handle, |
| 104 MojoHandle* platform_handle_wrapper_handle) { | 104 MojoHandle* platform_handle_wrapper_handle) { |
| 105 DCHECK(platform_handle_wrapper_handle); | 105 DCHECK(platform_handle_wrapper_handle); |
| 106 | 106 |
| 107 auto dispatcher = | 107 auto dispatcher = |
| 108 system::PlatformHandleDispatcher::Create(platform_handle.Pass()); | 108 system::PlatformHandleDispatcher::Create(platform_handle.Pass()); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 DCHECK(channel_info); | 304 DCHECK(channel_info); |
| 305 DCHECK(internal::g_ipc_support); | 305 DCHECK(internal::g_ipc_support); |
| 306 | 306 |
| 307 system::ChannelManager* channel_manager = | 307 system::ChannelManager* channel_manager = |
| 308 internal::g_ipc_support->channel_manager(); | 308 internal::g_ipc_support->channel_manager(); |
| 309 channel_manager->WillShutdownChannel(channel_info->channel_id); | 309 channel_manager->WillShutdownChannel(channel_info->channel_id); |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace embedder | 312 } // namespace embedder |
| 313 } // namespace mojo | 313 } // namespace mojo |
| OLD | NEW |