OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_FAKE_CONNECTION_TO_HOST_H_ | 5 #ifndef REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ |
6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ | 6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "remoting/protocol/connection_to_host.h" | 10 #include "remoting/protocol/connection_to_host.h" |
11 #include "remoting/protocol/protocol_mock_objects.h" | 11 #include "remoting/protocol/protocol_mock_objects.h" |
12 | 12 |
13 namespace remoting { | 13 namespace remoting { |
14 namespace test { | 14 namespace test { |
15 | 15 |
16 class FakeConnectionToHost : public protocol::ConnectionToHost { | 16 class FakeConnectionToHost : public protocol::ConnectionToHost { |
17 public: | 17 public: |
18 FakeConnectionToHost(); | 18 FakeConnectionToHost(); |
19 ~FakeConnectionToHost() override; | 19 ~FakeConnectionToHost() override; |
20 | 20 |
21 // ConnectionToHost interface. | 21 // ConnectionToHost interface. |
22 void set_client_stub(protocol::ClientStub* client_stub) override; | 22 void set_client_stub(protocol::ClientStub* client_stub) override; |
23 void set_clipboard_stub(protocol::ClipboardStub* clipboard_stub) override; | 23 void set_clipboard_stub(protocol::ClipboardStub* clipboard_stub) override; |
24 void set_video_stub(protocol::VideoStub* video_stub) override; | 24 void set_video_stub(protocol::VideoStub* video_stub) override; |
25 void set_audio_stub(protocol::AudioStub* audio_stub) override; | 25 void set_audio_stub(protocol::AudioStub* audio_stub) override; |
26 void Connect(scoped_ptr<protocol::Session> session, | 26 void Connect(scoped_ptr<protocol::Session> session, |
| 27 scoped_refptr<protocol::TransportContext> transport_context, |
27 HostEventCallback* event_callback) override; | 28 HostEventCallback* event_callback) override; |
28 const protocol::SessionConfig& config() override; | 29 const protocol::SessionConfig& config() override; |
29 protocol::ClipboardStub* clipboard_forwarder() override; | 30 protocol::ClipboardStub* clipboard_forwarder() override; |
30 protocol::HostStub* host_stub() override; | 31 protocol::HostStub* host_stub() override; |
31 protocol::InputStub* input_stub() override; | 32 protocol::InputStub* input_stub() override; |
32 State state() const override; | 33 State state() const override; |
33 | 34 |
34 // Calls OnConnectionState on the |event_callback_| with the supplied state | 35 // Calls OnConnectionState on the |event_callback_| with the supplied state |
35 // and error. | 36 // and error. |
36 void SignalStateChange(protocol::Session::State state, | 37 void SignalStateChange(protocol::Session::State state, |
(...skipping 14 matching lines...) Expand all Loading... |
51 testing::NiceMock<protocol::MockInputStub> mock_input_stub_; | 52 testing::NiceMock<protocol::MockInputStub> mock_input_stub_; |
52 scoped_ptr<protocol::SessionConfig> session_config_; | 53 scoped_ptr<protocol::SessionConfig> session_config_; |
53 | 54 |
54 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost); | 55 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost); |
55 }; | 56 }; |
56 | 57 |
57 } // namespace test | 58 } // namespace test |
58 } // namespace remoting | 59 } // namespace remoting |
59 | 60 |
60 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ | 61 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ |
OLD | NEW |