OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_CONNECTION_TO_HOST_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 State state() const; | 115 State state() const; |
116 | 116 |
117 private: | 117 private: |
118 // Called on the jingle thread after we've successfully to XMPP server. Starts | 118 // Called on the jingle thread after we've successfully to XMPP server. Starts |
119 // P2P connection to the host. | 119 // P2P connection to the host. |
120 void InitSession(); | 120 void InitSession(); |
121 | 121 |
122 // Callback for |session_|. | 122 // Callback for |session_|. |
123 void OnSessionStateChange(Session::State state); | 123 void OnSessionStateChange(Session::State state); |
124 | 124 |
| 125 // Callback for VideoReader::Init(). |
| 126 void OnVideoChannelInitialized(bool successful); |
| 127 |
125 // Callback for |video_reader_|. | 128 // Callback for |video_reader_|. |
126 void OnVideoPacket(VideoPacket* packet); | 129 void OnVideoPacket(VideoPacket* packet); |
127 | 130 |
| 131 void CloseOnError(); |
| 132 |
128 // Stops writing in the channels. | 133 // Stops writing in the channels. |
129 void CloseChannels(); | 134 void CloseChannels(); |
130 | 135 |
131 MessageLoop* message_loop_; | 136 MessageLoop* message_loop_; |
132 scoped_ptr<talk_base::NetworkManager> network_manager_; | 137 scoped_ptr<talk_base::NetworkManager> network_manager_; |
133 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; | 138 scoped_ptr<talk_base::PacketSocketFactory> socket_factory_; |
134 scoped_ptr<PortAllocatorSessionFactory> port_allocator_session_factory_; | 139 scoped_ptr<PortAllocatorSessionFactory> port_allocator_session_factory_; |
135 bool allow_nat_traversal_; | 140 bool allow_nat_traversal_; |
136 | 141 |
137 // Internal state of the connection. | 142 // Internal state of the connection. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 private: | 181 private: |
177 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); | 182 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |
178 }; | 183 }; |
179 | 184 |
180 } // namespace protocol | 185 } // namespace protocol |
181 } // namespace remoting | 186 } // namespace remoting |
182 | 187 |
183 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::protocol::ConnectionToHost); | 188 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::protocol::ConnectionToHost); |
184 | 189 |
185 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 190 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
OLD | NEW |