Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: mojo/edk/embedder/embedder.cc

Issue 1420533012: EDK: Make mojo::embedder::AsyncWait (etc.) take an std::function instead of a base::Callback. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/edk/embedder/embedder.h ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « mojo/edk/embedder/embedder.h ('k') | mojo/edk/embedder/embedder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698