OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 MEDIA_CAST_TEST_FAKE_RECEIVER_TIME_OFFSET_ESTIMATOR_H_ |
| 6 #define MEDIA_CAST_TEST_FAKE_RECEIVER_TIME_OFFSET_ESTIMATOR_H_ |
| 7 |
| 8 #include "base/time/time.h" |
| 9 #include "base/threading/thread_checker.h" |
| 10 #include "media/cast/logging/logging_defines.h" |
| 11 #include "media/cast/logging/receiver_time_offset_estimator.h" |
| 12 |
| 13 namespace media { |
| 14 namespace cast { |
| 15 namespace test { |
| 16 |
| 17 // This class is used for testing. It will always return the |offset| value |
| 18 // provided during construction as offset bounds. |
| 19 class FakeReceiverTimeOffsetEstimator : public ReceiverTimeOffsetEstimator { |
| 20 public: |
| 21 FakeReceiverTimeOffsetEstimator(base::TimeDelta offset); |
| 22 |
| 23 virtual ~FakeReceiverTimeOffsetEstimator(); |
| 24 |
| 25 // RawReventSubscriber implementations. |
| 26 virtual void OnReceiveFrameEvent(const FrameEvent& frame_event) OVERRIDE; |
| 27 virtual void OnReceivePacketEvent(const PacketEvent& packet_event) OVERRIDE; |
| 28 virtual void OnReceiveGenericEvent(const GenericEvent& generic_event) |
| 29 OVERRIDE; |
| 30 |
| 31 // ReceiverTimeOffsetEstimator |
| 32 virtual bool GetReceiverOffsetBounds(base::TimeDelta* lower_bound, |
| 33 base::TimeDelta* upper_bound) OVERRIDE; |
| 34 |
| 35 private: |
| 36 const base::TimeDelta offset_; |
| 37 DISALLOW_COPY_AND_ASSIGN(FakeReceiverTimeOffsetEstimator); |
| 38 }; |
| 39 |
| 40 } // namespace test |
| 41 } // namespace cast |
| 42 } // namespace media |
| 43 |
| 44 #endif // MEDIA_CAST_TEST_FAKE_RECEIVER_TIME_OFFSET_ESTIMATOR_H_ |
OLD | NEW |