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/base/buffered_socket_writer.h" | 9 #include "remoting/base/buffered_socket_writer.h" |
10 #include "remoting/proto/mux.pb.h" | 10 #include "remoting/proto/mux.pb.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 // Propagates base channel error to channel |name|, queued asynchronously by | 50 // Propagates base channel error to channel |name|, queued asynchronously by |
51 // OnBaseChannelError(). | 51 // OnBaseChannelError(). |
52 void NotifyBaseChannelError(const std::string& name, int error); | 52 void NotifyBaseChannelError(const std::string& name, int error); |
53 | 53 |
54 // Callback for |reader_; | 54 // Callback for |reader_; |
55 void OnIncomingPacket(scoped_ptr<MultiplexPacket> packet, | 55 void OnIncomingPacket(scoped_ptr<MultiplexPacket> packet, |
56 const base::Closure& done_task); | 56 const base::Closure& done_task); |
57 | 57 |
58 // Called by MuxChannel. | 58 // Called by MuxChannel. |
59 bool DoWrite(scoped_ptr<MultiplexPacket> packet, | 59 void DoWrite(scoped_ptr<MultiplexPacket> packet, |
60 const base::Closure& done_task); | 60 const base::Closure& done_task); |
61 | 61 |
62 // Factory used to create |base_channel_|. Set to nullptr once creation is | 62 // Factory used to create |base_channel_|. Set to nullptr once creation is |
63 // finished or failed. | 63 // finished or failed. |
64 StreamChannelFactory* base_channel_factory_; | 64 StreamChannelFactory* base_channel_factory_; |
65 | 65 |
66 // Name of the underlying channel. | 66 // Name of the underlying channel. |
67 std::string base_channel_name_; | 67 std::string base_channel_name_; |
68 | 68 |
69 // The channel over which to multiplex. | 69 // The channel over which to multiplex. |
(...skipping 16 matching lines...) Expand all Loading... |
86 base::WeakPtrFactory<ChannelMultiplexer> weak_factory_; | 86 base::WeakPtrFactory<ChannelMultiplexer> weak_factory_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(ChannelMultiplexer); | 88 DISALLOW_COPY_AND_ASSIGN(ChannelMultiplexer); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace protocol | 91 } // namespace protocol |
92 } // namespace remoting | 92 } // namespace remoting |
93 | 93 |
94 | 94 |
95 #endif // REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ | 95 #endif // REMOTING_PROTOCOL_CHANNEL_MULTIPLEXER_H_ |
OLD | NEW |