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 "base/macros.h" | 10 #include "base/macros.h" |
11 #include "remoting/protocol/connection_to_host.h" | 11 #include "remoting/protocol/connection_to_host.h" |
12 #include "remoting/protocol/protocol_mock_objects.h" | 12 #include "remoting/protocol/protocol_mock_objects.h" |
13 | 13 |
14 namespace remoting { | 14 namespace remoting { |
15 namespace test { | 15 namespace test { |
16 | 16 |
17 class FakeConnectionToHost : public protocol::ConnectionToHost { | 17 class FakeConnectionToHost : public protocol::ConnectionToHost { |
18 public: | 18 public: |
19 FakeConnectionToHost(); | 19 FakeConnectionToHost(); |
20 ~FakeConnectionToHost() override; | 20 ~FakeConnectionToHost() override; |
21 | 21 |
22 // ConnectionToHost interface. | 22 // ConnectionToHost interface. |
23 void set_client_stub(protocol::ClientStub* client_stub) override; | 23 void set_client_stub(protocol::ClientStub* client_stub) override; |
24 void set_clipboard_stub(protocol::ClipboardStub* clipboard_stub) override; | 24 void set_clipboard_stub(protocol::ClipboardStub* clipboard_stub) override; |
25 void set_video_renderer(protocol::VideoRenderer* video_renderer) override; | 25 void set_video_renderer(protocol::VideoRenderer* video_renderer) override; |
26 void set_audio_stub(protocol::AudioStub* audio_stub) override; | 26 virtual void InitializeAudio( |
| 27 scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, |
| 28 base::WeakPtr<protocol::AudioStub> audio_stub) override; |
27 void Connect(std::unique_ptr<protocol::Session> session, | 29 void Connect(std::unique_ptr<protocol::Session> session, |
28 scoped_refptr<protocol::TransportContext> transport_context, | 30 scoped_refptr<protocol::TransportContext> transport_context, |
29 HostEventCallback* event_callback) override; | 31 HostEventCallback* event_callback) override; |
30 const protocol::SessionConfig& config() override; | 32 const protocol::SessionConfig& config() override; |
31 protocol::ClipboardStub* clipboard_forwarder() override; | 33 protocol::ClipboardStub* clipboard_forwarder() override; |
32 protocol::HostStub* host_stub() override; | 34 protocol::HostStub* host_stub() override; |
33 protocol::InputStub* input_stub() override; | 35 protocol::InputStub* input_stub() override; |
34 State state() const override; | 36 State state() const override; |
35 | 37 |
36 // Calls OnConnectionState on the |event_callback_| with the supplied state | 38 // Calls OnConnectionState on the |event_callback_| with the supplied state |
(...skipping 16 matching lines...) Expand all Loading... |
53 testing::NiceMock<protocol::MockInputStub> mock_input_stub_; | 55 testing::NiceMock<protocol::MockInputStub> mock_input_stub_; |
54 std::unique_ptr<protocol::SessionConfig> session_config_; | 56 std::unique_ptr<protocol::SessionConfig> session_config_; |
55 | 57 |
56 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost); | 58 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost); |
57 }; | 59 }; |
58 | 60 |
59 } // namespace test | 61 } // namespace test |
60 } // namespace remoting | 62 } // namespace remoting |
61 | 63 |
62 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ | 64 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_ |
OLD | NEW |