OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ | 5 #ifndef REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ |
6 #define REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ | 6 #define REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "remoting/proto/mux.pb.h" | 9 #include "remoting/proto/mux.pb.h" |
10 #include "remoting/protocol/buffered_socket_writer.h" | 10 #include "remoting/protocol/buffered_socket_writer.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 void NotifyWriteFailed(const std::string& name); | 50 void NotifyWriteFailed(const std::string& name); |
51 | 51 |
52 // Callback for |reader_; | 52 // Callback for |reader_; |
53 void OnIncomingPacket(scoped_ptr<MultiplexPacket> packet, | 53 void OnIncomingPacket(scoped_ptr<MultiplexPacket> packet, |
54 const base::Closure& done_task); | 54 const base::Closure& done_task); |
55 | 55 |
56 // Called by MuxChannel. | 56 // Called by MuxChannel. |
57 bool DoWrite(scoped_ptr<MultiplexPacket> packet, | 57 bool DoWrite(scoped_ptr<MultiplexPacket> packet, |
58 const base::Closure& done_task); | 58 const base::Closure& done_task); |
59 | 59 |
60 // Factory used to create |base_channel_|. Set to NULL once creation is | 60 // Factory used to create |base_channel_|. Set to nullptr once creation is |
61 // finished or failed. | 61 // finished or failed. |
62 StreamChannelFactory* base_channel_factory_; | 62 StreamChannelFactory* base_channel_factory_; |
63 | 63 |
64 // Name of the underlying channel. | 64 // Name of the underlying channel. |
65 std::string base_channel_name_; | 65 std::string base_channel_name_; |
66 | 66 |
67 // The channel over which to multiplex. | 67 // The channel over which to multiplex. |
68 scoped_ptr<net::StreamSocket> base_channel_; | 68 scoped_ptr<net::StreamSocket> base_channel_; |
69 | 69 |
70 // List of requested channels while we are waiting for |base_channel_|. | 70 // List of requested channels while we are waiting for |base_channel_|. |
(...skipping 12 matching lines...) Expand all Loading... |
83 base::WeakPtrFactory<ChannelMultiplexer> weak_factory_; | 83 base::WeakPtrFactory<ChannelMultiplexer> weak_factory_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(ChannelMultiplexer); | 85 DISALLOW_COPY_AND_ASSIGN(ChannelMultiplexer); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace protocol | 88 } // namespace protocol |
89 } // namespace remoting | 89 } // namespace remoting |
90 | 90 |
91 | 91 |
92 #endif // REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ | 92 #endif // REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ |
OLD | NEW |