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_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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "remoting/protocol/session.h" | 22 #include "remoting/protocol/session.h" |
23 #include "remoting/protocol/session_config.h" | 23 #include "remoting/protocol/session_config.h" |
24 #include "remoting/protocol/session_manager.h" | 24 #include "remoting/protocol/session_manager.h" |
25 #include "remoting/signaling/signal_strategy.h" | 25 #include "remoting/signaling/signal_strategy.h" |
26 | 26 |
27 namespace remoting { | 27 namespace remoting { |
28 | 28 |
29 class XmppProxy; | 29 class XmppProxy; |
30 class VideoPacket; | 30 class VideoPacket; |
31 | 31 |
| 32 namespace test { |
| 33 class FakeConnectionToHost; |
| 34 } |
| 35 |
32 namespace protocol { | 36 namespace protocol { |
33 | 37 |
34 class AudioReader; | 38 class AudioReader; |
35 class AudioStub; | 39 class AudioStub; |
36 class Authenticator; | 40 class Authenticator; |
37 class ClientControlDispatcher; | 41 class ClientControlDispatcher; |
38 class ClientEventDispatcher; | 42 class ClientEventDispatcher; |
39 class ClientStub; | 43 class ClientStub; |
40 class ClipboardStub; | 44 class ClipboardStub; |
41 class HostStub; | 45 class HostStub; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 void OnChannelError(ChannelDispatcherBase* channel_dispatcher, | 144 void OnChannelError(ChannelDispatcherBase* channel_dispatcher, |
141 ErrorCode error) override; | 145 ErrorCode error) override; |
142 | 146 |
143 // MonitoredVideoStub::EventHandler interface. | 147 // MonitoredVideoStub::EventHandler interface. |
144 virtual void OnVideoChannelStatus(bool active); | 148 virtual void OnVideoChannelStatus(bool active); |
145 | 149 |
146 // Return the current state of ConnectionToHost. | 150 // Return the current state of ConnectionToHost. |
147 State state() const; | 151 State state() const; |
148 | 152 |
149 private: | 153 private: |
| 154 friend remoting::test::FakeConnectionToHost; |
| 155 |
150 void NotifyIfChannelsReady(); | 156 void NotifyIfChannelsReady(); |
151 | 157 |
152 void CloseOnError(ErrorCode error); | 158 void CloseOnError(ErrorCode error); |
153 | 159 |
154 // Stops writing in the channels. | 160 // Stops writing in the channels. |
155 void CloseChannels(); | 161 void CloseChannels(); |
156 | 162 |
157 void SetState(State state, ErrorCode error); | 163 void SetState(State state, ErrorCode error); |
158 | 164 |
159 std::string host_jid_; | 165 std::string host_jid_; |
(...skipping 26 matching lines...) Expand all Loading... |
186 ErrorCode error_; | 192 ErrorCode error_; |
187 | 193 |
188 private: | 194 private: |
189 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); | 195 DISALLOW_COPY_AND_ASSIGN(ConnectionToHost); |
190 }; | 196 }; |
191 | 197 |
192 } // namespace protocol | 198 } // namespace protocol |
193 } // namespace remoting | 199 } // namespace remoting |
194 | 200 |
195 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ | 201 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ |
OLD | NEW |