| 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_SYSTEM_EMBEDDER_H_ | 5 #ifndef MOJO_SYSTEM_EMBEDDER_H_ |
| 6 #define MOJO_SYSTEM_EMBEDDER_H_ | 6 #define MOJO_SYSTEM_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/task_runner.h" | 10 #include "base/task_runner.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // immediately written to the returned handle and the handle closed, all before | 36 // immediately written to the returned handle and the handle closed, all before |
| 37 // the channel has begun operation on the IO thread. In this case, the channel | 37 // the channel has begun operation on the IO thread. In this case, the channel |
| 38 // is expected to connect as usual, send the queued message, and report that the | 38 // is expected to connect as usual, send the queued message, and report that the |
| 39 // handle was closed to the other side. (This message may well contain another | 39 // handle was closed to the other side. (This message may well contain another |
| 40 // handle, so there may well still be message pipes "on" this channel.) | 40 // handle, so there may well still be message pipes "on" this channel.) |
| 41 // | 41 // |
| 42 // TODO(vtl): Figure out channel teardown. | 42 // TODO(vtl): Figure out channel teardown. |
| 43 struct ChannelInfo; | 43 struct ChannelInfo; |
| 44 typedef base::Callback<void(ChannelInfo*)> DidCreateChannelOnIOThreadCallback; | 44 typedef base::Callback<void(ChannelInfo*)> DidCreateChannelOnIOThreadCallback; |
| 45 MOJO_SYSTEM_IMPL_EXPORT MojoHandle CreateChannel( | 45 MOJO_SYSTEM_IMPL_EXPORT MojoHandle CreateChannel( |
| 46 system::ScopedPlatformHandle platform_handle, | 46 ScopedPlatformHandle platform_handle, |
| 47 scoped_refptr<base::TaskRunner> io_thread_task_runner, | 47 scoped_refptr<base::TaskRunner> io_thread_task_runner, |
| 48 DidCreateChannelOnIOThreadCallback callback); | 48 DidCreateChannelOnIOThreadCallback callback); |
| 49 | 49 |
| 50 MOJO_SYSTEM_IMPL_EXPORT void DestroyChannelOnIOThread( | 50 MOJO_SYSTEM_IMPL_EXPORT void DestroyChannelOnIOThread( |
| 51 ChannelInfo* channel_info); | 51 ChannelInfo* channel_info); |
| 52 | 52 |
| 53 } // namespace embedder | 53 } // namespace embedder |
| 54 } // namespace mojo | 54 } // namespace mojo |
| 55 | 55 |
| 56 #endif // MOJO_SYSTEM_EMBEDDER_H_ | 56 #endif // MOJO_SYSTEM_EMBEDDER_H_ |
| OLD | NEW |