OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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_TEST_FAKE_CONNECTION_EVENT_LOGGER_H_ |
| 6 #define REMOTING_TEST_FAKE_CONNECTION_EVENT_LOGGER_H_ |
| 7 |
| 8 #include <memory> |
| 9 #include <ostream> |
| 10 |
| 11 #include "base/macros.h" |
| 12 #include "remoting/protocol/audio_stub.h" |
| 13 #include "remoting/protocol/client_stub.h" |
| 14 #include "remoting/protocol/fake_connection_to_client.h" |
| 15 #include "remoting/protocol/host_stub.h" |
| 16 #include "remoting/protocol/video_stub.h" |
| 17 |
| 18 namespace remoting { |
| 19 namespace test { |
| 20 |
| 21 class FakeConnectionEventLogger { |
| 22 public: |
| 23 explicit FakeConnectionEventLogger( |
| 24 protocol::FakeConnectionToClient* connection = nullptr); |
| 25 virtual ~FakeConnectionEventLogger(); |
| 26 |
| 27 protocol::ClientStub* client_stub(); |
| 28 protocol::HostStub* host_stub(); |
| 29 protocol::AudioStub* audio_stub(); |
| 30 protocol::VideoStub* video_stub(); |
| 31 friend std::ostream& operator<<(std::ostream& os, |
| 32 const FakeConnectionEventLogger& logger); |
| 33 |
| 34 private: |
| 35 class CounterClientStub; |
| 36 class CounterHostStub; |
| 37 class CounterAudioStub; |
| 38 class CounterVideoStub; |
| 39 |
| 40 std::unique_ptr<CounterClientStub> client_stub_; |
| 41 std::unique_ptr<CounterHostStub> host_stub_; |
| 42 std::unique_ptr<CounterAudioStub> audio_stub_; |
| 43 std::unique_ptr<CounterVideoStub> video_stub_; |
| 44 |
| 45 // Counter*Stub are not copyable and assignable. |
| 46 DISALLOW_COPY_AND_ASSIGN(FakeConnectionEventLogger); |
| 47 }; |
| 48 |
| 49 } // namespace test |
| 50 } // namespace remoting |
| 51 |
| 52 #endif // REMOTING_TEST_FAKE_CONNECTION_EVENT_LOGGER_H_ |
OLD | NEW |