Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: media/cast/test/fake_receiver_time_offset_estimator.h

Issue 236123003: Cast: Provide more meaningful stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cast/test/fake_receiver_time_offset_estimator.h
diff --git a/media/cast/test/fake_receiver_time_offset_estimator.h b/media/cast/test/fake_receiver_time_offset_estimator.h
new file mode 100644
index 0000000000000000000000000000000000000000..c68b618c1d7928b412c8aead8f86633c0a6375d7
--- /dev/null
+++ b/media/cast/test/fake_receiver_time_offset_estimator.h
@@ -0,0 +1,44 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_CAST_TEST_FAKE_RECEIVER_TIME_OFFSET_ESTIMATOR_H_
+#define MEDIA_CAST_TEST_FAKE_RECEIVER_TIME_OFFSET_ESTIMATOR_H_
+
+#include "base/time/time.h"
+#include "base/threading/thread_checker.h"
+#include "media/cast/logging/logging_defines.h"
+#include "media/cast/logging/receiver_time_offset_estimator.h"
+
+namespace media {
+namespace cast {
+namespace test {
+
+// This class is used for testing. It will always return the |offset| value
+// provided during construction as offset bounds.
+class FakeReceiverTimeOffsetEstimator : public ReceiverTimeOffsetEstimator {
+ public:
+ FakeReceiverTimeOffsetEstimator(base::TimeDelta offset);
+
+ virtual ~FakeReceiverTimeOffsetEstimator();
+
+ // RawReventSubscriber implementations.
+ virtual void OnReceiveFrameEvent(const FrameEvent& frame_event) OVERRIDE;
+ virtual void OnReceivePacketEvent(const PacketEvent& packet_event) OVERRIDE;
+ virtual void OnReceiveGenericEvent(const GenericEvent& generic_event)
+ OVERRIDE;
+
+ // ReceiverTimeOffsetEstimator
+ virtual bool GetReceiverOffsetBounds(base::TimeDelta* lower_bound,
+ base::TimeDelta* upper_bound) OVERRIDE;
+
+ private:
+ base::TimeDelta offset_;
miu 2014/04/17 02:14:14 const, since member is never changed.
imcheng 2014/04/17 19:19:06 Done.
+ DISALLOW_COPY_AND_ASSIGN(FakeReceiverTimeOffsetEstimator);
+};
+
+} // namespace test
+} // namespace cast
+} // namespace media
+
+#endif // MEDIA_CAST_TEST_FAKE_RECEIVER_TIME_OFFSET_ESTIMATOR_H_

Powered by Google App Engine
This is Rietveld 408576698