Index: remoting/test/cyclic_frame_generator.h |
diff --git a/remoting/test/cyclic_frame_generator.h b/remoting/test/cyclic_frame_generator.h |
index d03118a718921b4c705322c33e8d83faf5d0b4e0..66950ea914f18dcb9f4761cff36b2bc74dd650fd 100644 |
--- a/remoting/test/cyclic_frame_generator.h |
+++ b/remoting/test/cyclic_frame_generator.h |
@@ -9,8 +9,10 @@ |
#include <memory> |
#include <vector> |
+#include "base/callback.h" |
#include "base/memory/ref_counted.h" |
#include "base/time/default_tick_clock.h" |
+#include "remoting/protocol/input_event_timestamps.h" |
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" |
namespace remoting { |
@@ -21,8 +23,7 @@ namespace test { |
// loads a sequence of reference frames and switches between them with the |
// specified frequency (every 2 seconds by default). Between reference frames it |
// also generate frames with small changes which simulate a blinking cursor. |
-class CyclicFrameGenerator |
- : public base::RefCountedThreadSafe<CyclicFrameGenerator> { |
+class CyclicFrameGenerator : public protocol::InputEventTimestampsSource { |
public: |
enum class ChangeType { |
// No changes. |
@@ -60,11 +61,6 @@ class CyclicFrameGenerator |
void SetTickClock(base::TickClock* tick_clock); |
- // When |draw_barcode| is set to true a barcode is drawn on each generated |
- // frame. This makes it possible to call GetChangeList() to identify the frame |
- // by its content. |
- void set_draw_barcode(bool draw_barcode) { draw_barcode_ = draw_barcode; } |
- |
std::unique_ptr<webrtc::DesktopFrame> GenerateFrame( |
webrtc::SharedMemoryFactory* shared_memory_factory); |
@@ -75,10 +71,13 @@ class CyclicFrameGenerator |
// this one. GetChangeList() must be called for the frames in the order in |
// which they were received, which is expected to match the order in which |
// they are generated. |
Jamie
2016/10/14 23:26:07
Please update this comment.
Sergey Ulanov
2016/10/17 22:40:26
Done.
|
- ChangeInfoList GetChangeList(webrtc::DesktopFrame* frame); |
+ ChangeInfoList GetChangeList(base::TimeTicks timestamp); |
+ |
+ // InputEventTimestampsSource interface. |
+ protocol::InputEventTimestamps TakeLastEventTimestamps() override; |
private: |
- ~CyclicFrameGenerator(); |
+ ~CyclicFrameGenerator() override; |
friend class base::RefCountedThreadSafe<CyclicFrameGenerator>; |
std::vector<std::unique_ptr<webrtc::DesktopFrame>> reference_frames_; |
@@ -103,8 +102,6 @@ class CyclicFrameGenerator |
ChangeType last_frame_type_ = ChangeType::NO_CHANGES; |
- bool draw_barcode_ = false; |
- |
base::TimeTicks started_time_; |
// frame_id of the frame passed to the last GetChangeList() call. |