| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 State state() const; | 110 State state() const; |
| 111 | 111 |
| 112 private: | 112 private: |
| 113 // Called on the jingle thread after we've successfully to XMPP server. Starts | 113 // Called on the jingle thread after we've successfully to XMPP server. Starts |
| 114 // P2P connection to the host. | 114 // P2P connection to the host. |
| 115 void InitSession(); | 115 void InitSession(); |
| 116 | 116 |
| 117 // Callback for |session_|. | 117 // Callback for |session_|. |
| 118 void OnSessionStateChange(Session::State state); | 118 void OnSessionStateChange(Session::State state); |
| 119 | 119 |
| 120 // Callback for VideoReader::Init(). | 120 // Callbacks for channel initialization |
| 121 void OnVideoChannelInitialized(bool successful); | 121 void OnChannelInitialized(bool successful); |
| 122 | 122 |
| 123 void NotifyIfChannelsReady(); | 123 void NotifyIfChannelsReady(); |
| 124 | 124 |
| 125 // Callback for |video_reader_|. | 125 // Callback for |video_reader_|. |
| 126 void OnVideoPacket(VideoPacket* packet); | 126 void OnVideoPacket(VideoPacket* packet); |
| 127 | 127 |
| 128 void CloseOnError(Error error); | 128 void CloseOnError(Error error); |
| 129 | 129 |
| 130 // Stops writing in the channels. | 130 // Stops writing in the channels. |
| 131 void CloseChannels(); | 131 void CloseChannels(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 146 ClientStub* client_stub_; | 146 ClientStub* client_stub_; |
| 147 VideoStub* video_stub_; | 147 VideoStub* video_stub_; |
| 148 | 148 |
| 149 scoped_ptr<SignalStrategy> signal_strategy_; | 149 scoped_ptr<SignalStrategy> signal_strategy_; |
| 150 std::string local_jid_; | 150 std::string local_jid_; |
| 151 scoped_ptr<SessionManager> session_manager_; | 151 scoped_ptr<SessionManager> session_manager_; |
| 152 scoped_ptr<Session> session_; | 152 scoped_ptr<Session> session_; |
| 153 | 153 |
| 154 scoped_ptr<VideoReader> video_reader_; | 154 scoped_ptr<VideoReader> video_reader_; |
| 155 scoped_ptr<ClientControlDispatcher> control_dispatcher_; | 155 scoped_ptr<ClientControlDispatcher> control_dispatcher_; |
| 156 scoped_ptr<ClientEventDispatcher> input_dispatcher_; | 156 scoped_ptr<ClientEventDispatcher> event_dispatcher_; |
| 157 | 157 |
| 158 // Internal state of the connection. | 158 // Internal state of the connection. |
| 159 State state_; | 159 State state_; |
| 160 Error error_; | 160 Error error_; |
| 161 | 161 |
| 162 // State of the channels. | |
| 163 bool control_connected_; | |
| 164 bool input_connected_; | |
| 165 bool video_connected_; | |
| 166 | |
| 167 private: | 162 private: |
| 168 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); | 163 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |
| 169 }; | 164 }; |
| 170 | 165 |
| 171 } // namespace protocol | 166 } // namespace protocol |
| 172 } // namespace remoting | 167 } // namespace remoting |
| 173 | 168 |
| 174 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 169 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
| OLD | NEW |