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 #ifndef MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
6 #define MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 6 #define MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 MOJO_SYSTEM_IMPL_EXPORT MojoResult | 110 MOJO_SYSTEM_IMPL_EXPORT MojoResult |
111 CreatePlatformHandleWrapper(ScopedPlatformHandle platform_handle, | 111 CreatePlatformHandleWrapper(ScopedPlatformHandle platform_handle, |
112 MojoHandle* platform_handle_wrapper_handle); | 112 MojoHandle* platform_handle_wrapper_handle); |
113 // Retrieves the |PlatformHandle| that was wrapped into a |MojoHandle| (using | 113 // Retrieves the |PlatformHandle| that was wrapped into a |MojoHandle| (using |
114 // |CreatePlatformHandleWrapper()| above). Note that the |MojoHandle| must still | 114 // |CreatePlatformHandleWrapper()| above). Note that the |MojoHandle| must still |
115 // be closed separately. | 115 // be closed separately. |
116 MOJO_SYSTEM_IMPL_EXPORT MojoResult | 116 MOJO_SYSTEM_IMPL_EXPORT MojoResult |
117 PassWrappedPlatformHandle(MojoHandle platform_handle_wrapper_handle, | 117 PassWrappedPlatformHandle(MojoHandle platform_handle_wrapper_handle, |
118 ScopedPlatformHandle* platform_handle); | 118 ScopedPlatformHandle* platform_handle); |
119 | 119 |
| 120 // Start waiting the handle asynchronously. On success, |callback| will be |
| 121 // called exactly once, when |handle| satisfies a signal in |signals| or it |
| 122 // becomes known that it will never do so. |callback| will be executed on an |
| 123 // arbitrary thread. It must not call any Mojo system or embedder functions. |
| 124 MOJO_SYSTEM_IMPL_EXPORT MojoResult |
| 125 AsyncWait(MojoHandle handle, |
| 126 MojoHandleSignals signals, |
| 127 base::Callback<void(MojoResult)> callback); |
| 128 |
120 } // namespace embedder | 129 } // namespace embedder |
121 } // namespace mojo | 130 } // namespace mojo |
122 | 131 |
123 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ | 132 #endif // MOJO_EDK_EMBEDDER_EMBEDDER_H_ |
OLD | NEW |