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_SYSTEM_CHANNEL_MANAGER_H_ | 5 #ifndef MOJO_EDK_SYSTEM_CHANNEL_MANAGER_H_ |
6 #define MOJO_EDK_SYSTEM_CHANNEL_MANAGER_H_ | 6 #define MOJO_EDK_SYSTEM_CHANNEL_MANAGER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <unordered_map> | 10 #include <unordered_map> |
(...skipping 18 matching lines...) Expand all Loading... |
29 namespace system { | 29 namespace system { |
30 | 30 |
31 class Channel; | 31 class Channel; |
32 class ChannelEndpoint; | 32 class ChannelEndpoint; |
33 class ConnectionManager; | 33 class ConnectionManager; |
34 class MessagePipeDispatcher; | 34 class MessagePipeDispatcher; |
35 | 35 |
36 // This class manages and "owns" |Channel|s (which typically connect to other | 36 // This class manages and "owns" |Channel|s (which typically connect to other |
37 // processes) for a given process. This class is thread-safe, except as | 37 // processes) for a given process. This class is thread-safe, except as |
38 // specifically noted. | 38 // specifically noted. |
39 class MOJO_SYSTEM_IMPL_EXPORT ChannelManager { | 39 class ChannelManager { |
40 public: | 40 public: |
41 // |io_thread_task_runner| should be the |TaskRunner| for the I/O thread, on | 41 // |io_thread_task_runner| should be the |TaskRunner| for the I/O thread, on |
42 // which this channel manager will create all channels. Connection manager is | 42 // which this channel manager will create all channels. Connection manager is |
43 // optional and may be null. All arguments (if non-null) must remain alive at | 43 // optional and may be null. All arguments (if non-null) must remain alive at |
44 // least until after shutdown completion. | 44 // least until after shutdown completion. |
45 ChannelManager(embedder::PlatformSupport* platform_support, | 45 ChannelManager(embedder::PlatformSupport* platform_support, |
46 scoped_refptr<base::TaskRunner> io_thread_task_runner, | 46 scoped_refptr<base::TaskRunner> io_thread_task_runner, |
47 ConnectionManager* connection_manager); | 47 ConnectionManager* connection_manager); |
48 ~ChannelManager(); | 48 ~ChannelManager(); |
49 | 49 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 std::unordered_map<ChannelId, scoped_refptr<Channel>>; | 155 std::unordered_map<ChannelId, scoped_refptr<Channel>>; |
156 ChannelIdToChannelMap channels_ MOJO_GUARDED_BY(mutex_); | 156 ChannelIdToChannelMap channels_ MOJO_GUARDED_BY(mutex_); |
157 | 157 |
158 MOJO_DISALLOW_COPY_AND_ASSIGN(ChannelManager); | 158 MOJO_DISALLOW_COPY_AND_ASSIGN(ChannelManager); |
159 }; | 159 }; |
160 | 160 |
161 } // namespace system | 161 } // namespace system |
162 } // namespace mojo | 162 } // namespace mojo |
163 | 163 |
164 #endif // MOJO_EDK_SYSTEM_CHANNEL_MANAGER_H_ | 164 #endif // MOJO_EDK_SYSTEM_CHANNEL_MANAGER_H_ |
OLD | NEW |