OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ | |
6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "remoting/protocol/connection_to_host.h" | |
11 #include "remoting/protocol/protocol_mock_objects.h" | |
12 | |
13 namespace remoting { | |
14 namespace test { | |
15 | |
16 class FakeConnectionToHost : public remoting::protocol::ConnectionToHost { | |
Sergey Ulanov
2015/03/11 00:09:51
don't need remoting::
joedow
2015/03/11 19:06:39
Done.
| |
17 public: | |
18 FakeConnectionToHost(); | |
19 ~FakeConnectionToHost() override; | |
20 | |
21 // ConnectionToHost interface. | |
Sergey Ulanov
2015/03/11 00:09:51
s/interface/overrides/.
ConnectionToHost is not an
joedow
2015/03/11 19:06:39
Left this as interface since now ConnectionToHost
| |
22 void Connect(SignalStrategy* signal_strategy, | |
23 scoped_ptr<protocol::TransportFactory> transport_factory, | |
24 scoped_ptr<protocol::Authenticator> authenticator, | |
25 const std::string& host_jid, | |
26 HostEventCallback* event_callback) override; | |
27 void OnSessionStateChange(protocol::Session::State state) override; | |
28 void OnVideoChannelStatus(bool active) override; | |
29 const protocol::SessionConfig& config() override; | |
30 protocol::HostStub* host_stub() override; | |
31 | |
32 void set_session_state_change_error_code(protocol::ErrorCode error) { | |
33 session_state_change_error_code_ = error; | |
34 } | |
35 | |
36 private: | |
37 // ErrorCode set when OnSessionStateChange() is called with a FAILED state. | |
38 protocol::ErrorCode session_state_change_error_code_; | |
39 | |
40 testing::NiceMock<protocol::MockHostStub> mock_host_stub_; | |
41 protocol::SessionConfig session_config_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost); | |
44 }; | |
45 | |
46 } // namespace test | |
47 } // namespace remoting | |
48 | |
49 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ | |
OLD | NEW |