| 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_CHANNEL_INIT_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_CHANNEL_INIT_H_ |
| 6 #define MOJO_EDK_EMBEDDER_CHANNEL_INIT_H_ | 6 #define MOJO_EDK_EMBEDDER_CHANNEL_INIT_H_ |
| 7 | 7 |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "mojo/edk/embedder/channel_info_forward.h" |
| 11 #include "mojo/edk/system/system_impl_export.h" | 12 #include "mojo/edk/system/system_impl_export.h" |
| 12 #include "mojo/public/cpp/system/core.h" | 13 #include "mojo/public/cpp/system/core.h" |
| 13 | 14 |
| 14 namespace base { | 15 namespace base { |
| 15 class MessageLoopProxy; | 16 class MessageLoopProxy; |
| 16 class TaskRunner; | 17 class TaskRunner; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace mojo { | 20 namespace mojo { |
| 20 namespace embedder { | 21 namespace embedder { |
| 21 struct ChannelInfo; | |
| 22 } | |
| 23 | |
| 24 namespace embedder { | |
| 25 | 22 |
| 26 // |ChannelInit| handles creation (and destruction) of the Mojo channel. It is | 23 // |ChannelInit| handles creation (and destruction) of the Mojo channel. It is |
| 27 // not thread-safe, but may be used on any single thread (with a |MessageLoop|). | 24 // not thread-safe, but may be used on any single thread (with a |MessageLoop|). |
| 28 class MOJO_SYSTEM_IMPL_EXPORT ChannelInit { | 25 class MOJO_SYSTEM_IMPL_EXPORT ChannelInit { |
| 29 public: | 26 public: |
| 30 ChannelInit(); | 27 ChannelInit(); |
| 31 ~ChannelInit(); | 28 ~ChannelInit(); |
| 32 | 29 |
| 33 // Initializes the channel. This takes ownership of |file|. Returns the | 30 // Initializes the channel. This takes ownership of |file|. Returns the |
| 34 // primordial MessagePipe for the channel. | 31 // primordial MessagePipe for the channel. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 54 | 51 |
| 55 base::WeakPtrFactory<ChannelInit> weak_factory_; | 52 base::WeakPtrFactory<ChannelInit> weak_factory_; |
| 56 | 53 |
| 57 DISALLOW_COPY_AND_ASSIGN(ChannelInit); | 54 DISALLOW_COPY_AND_ASSIGN(ChannelInit); |
| 58 }; | 55 }; |
| 59 | 56 |
| 60 } // namespace embedder | 57 } // namespace embedder |
| 61 } // namespace mojo | 58 } // namespace mojo |
| 62 | 59 |
| 63 #endif // MOJO_EDK_EMBEDDER_CHANNEL_INIT_H_ | 60 #endif // MOJO_EDK_EMBEDDER_CHANNEL_INIT_H_ |
| OLD | NEW |