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 "base/atomicops.h" | 7 #include "base/atomicops.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 MojoResult PassWrappedPlatformHandle(MojoHandle platform_handle_wrapper_handle, | 141 MojoResult PassWrappedPlatformHandle(MojoHandle platform_handle_wrapper_handle, |
142 ScopedPlatformHandle* platform_handle) { | 142 ScopedPlatformHandle* platform_handle) { |
143 DCHECK(platform_handle); | 143 DCHECK(platform_handle); |
144 | 144 |
145 DCHECK(internal::g_core); | 145 DCHECK(internal::g_core); |
146 scoped_refptr<system::Dispatcher> dispatcher( | 146 scoped_refptr<system::Dispatcher> dispatcher( |
147 internal::g_core->GetDispatcher(platform_handle_wrapper_handle)); | 147 internal::g_core->GetDispatcher(platform_handle_wrapper_handle)); |
148 if (!dispatcher) | 148 if (!dispatcher) |
149 return MOJO_RESULT_INVALID_ARGUMENT; | 149 return MOJO_RESULT_INVALID_ARGUMENT; |
150 | 150 |
151 if (dispatcher->GetType() != system::Dispatcher::kTypePlatformHandle) | 151 if (dispatcher->GetType() != system::Dispatcher::Type::PLATFORM_HANDLE) |
152 return MOJO_RESULT_INVALID_ARGUMENT; | 152 return MOJO_RESULT_INVALID_ARGUMENT; |
153 | 153 |
154 *platform_handle = | 154 *platform_handle = |
155 static_cast<system::PlatformHandleDispatcher*>(dispatcher.get()) | 155 static_cast<system::PlatformHandleDispatcher*>(dispatcher.get()) |
156 ->PassPlatformHandle() | 156 ->PassPlatformHandle() |
157 .Pass(); | 157 .Pass(); |
158 return MOJO_RESULT_OK; | 158 return MOJO_RESULT_OK; |
159 } | 159 } |
160 | 160 |
161 void InitIPCSupport(ProcessType process_type, | 161 void InitIPCSupport(ProcessType process_type, |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } | 362 } |
363 | 363 |
364 void WillDestroyChannelSoon(ChannelInfo* channel_info) { | 364 void WillDestroyChannelSoon(ChannelInfo* channel_info) { |
365 DCHECK(channel_info); | 365 DCHECK(channel_info); |
366 DCHECK(g_channel_manager); | 366 DCHECK(g_channel_manager); |
367 g_channel_manager->WillShutdownChannel(channel_info->channel_id); | 367 g_channel_manager->WillShutdownChannel(channel_info->channel_id); |
368 } | 368 } |
369 | 369 |
370 } // namespace embedder | 370 } // namespace embedder |
371 } // namespace mojo | 371 } // namespace mojo |
OLD | NEW |