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_CLIENT_H_ |
| 6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "remoting/protocol/connection_to_client.h" |
| 10 |
| 11 namespace remoting { |
| 12 namespace protocol { |
| 13 |
| 14 class FakeConnectionToClient : public ConnectionToClient { |
| 15 public: |
| 16 FakeConnectionToClient(scoped_ptr<Session> session); |
| 17 ~FakeConnectionToClient() override; |
| 18 |
| 19 void SetEventHandler(EventHandler* event_handler) override; |
| 20 |
| 21 VideoStub* video_stub() override; |
| 22 AudioStub* audio_stub() override; |
| 23 ClientStub* client_stub() override; |
| 24 void Disconnect(ErrorCode disconnect_error) override; |
| 25 |
| 26 Session* session() override; |
| 27 void OnInputEventReceived(int64_t timestamp) override; |
| 28 |
| 29 void set_clipboard_stub(ClipboardStub* clipboard_stub) override; |
| 30 void set_host_stub(HostStub* host_stub) override; |
| 31 void set_input_stub(InputStub* input_stub) override; |
| 32 |
| 33 void set_video_feedback_stub(VideoFeedbackStub* video_feedback_stub) override; |
| 34 |
| 35 void set_video_stub(VideoStub* video_stub) { video_stub_ = video_stub; } |
| 36 void set_audio_stub(AudioStub* audio_stub) { audio_stub_ = audio_stub; } |
| 37 void set_client_stub(ClientStub* client_stub) { client_stub_ = client_stub; } |
| 38 |
| 39 EventHandler* event_handler() { return event_handler_; } |
| 40 ClipboardStub* clipboard_stub() { return clipboard_stub_; } |
| 41 HostStub* host_stub() { return host_stub_; } |
| 42 InputStub* input_stub() { return input_stub_; } |
| 43 |
| 44 VideoFeedbackStub* video_feedback_stub() { return video_feedback_stub_; } |
| 45 |
| 46 bool is_connected() { return is_connected_; } |
| 47 ErrorCode disconnect_error() { return disconnect_error_; } |
| 48 |
| 49 private: |
| 50 scoped_ptr<Session> session_; |
| 51 EventHandler* event_handler_ = nullptr; |
| 52 |
| 53 VideoStub* video_stub_ = nullptr; |
| 54 AudioStub* audio_stub_ = nullptr; |
| 55 ClientStub* client_stub_ = nullptr; |
| 56 |
| 57 ClipboardStub* clipboard_stub_ = nullptr; |
| 58 HostStub* host_stub_ = nullptr; |
| 59 InputStub* input_stub_ = nullptr; |
| 60 VideoFeedbackStub* video_feedback_stub_ = nullptr; |
| 61 |
| 62 bool is_connected_ = true; |
| 63 ErrorCode disconnect_error_ = OK; |
| 64 |
| 65 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToClient); |
| 66 }; |
| 67 |
| 68 } // namespace protocol |
| 69 } // namespace remoting |
| 70 |
| 71 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_CLIENT_H_ |
OLD | NEW |