Chromium Code Reviews| Index: remoting/protocol/host_event_dispatcher.h |
| diff --git a/remoting/protocol/host_event_dispatcher.h b/remoting/protocol/host_event_dispatcher.h |
| index 4c9df5e31f0c127ad23a3eeb131694cd399d12d9..4521a5d4d859d3d8e74db2659d1a9322c03e2437 100644 |
| --- a/remoting/protocol/host_event_dispatcher.h |
| +++ b/remoting/protocol/host_event_dispatcher.h |
| @@ -9,6 +9,7 @@ |
| #include "base/macros.h" |
| #include "remoting/protocol/channel_dispatcher_base.h" |
| +#include "remoting/protocol/input_event_timestamps.h" |
| namespace remoting { |
| namespace protocol { |
| @@ -20,8 +21,6 @@ class InputStub; |
| // channel to InputStub. |
| class HostEventDispatcher : public ChannelDispatcherBase { |
| public: |
| - typedef base::Callback<void(int64_t)> OnInputEventCallback; |
| - |
| HostEventDispatcher(); |
| ~HostEventDispatcher() override; |
| @@ -30,17 +29,22 @@ class HostEventDispatcher : public ChannelDispatcherBase { |
| // the dispatcher. |
| void set_input_stub(InputStub* input_stub) { input_stub_ = input_stub; } |
| - // Set callback to notify of each message's sequence number. The |
| - // callback cannot tear down this object. |
| - void set_on_input_event_callback(const OnInputEventCallback& value) { |
| - on_input_event_callback_ = value; |
| + // Returns InputEventTimestampsSource for events received on input channel. |
| + // |
| + // TODO(sergeyu): Here we assume that |input_stub_| injects all events |
| + // instantly, which is not always the case. Consider moving this to |
| + // InputInjector. This would require updating InputStub to get |
| + // timestamps for each event. |
|
Jamie
2016/10/14 20:30:30
I don't understand this comment. The host timestam
Sergey Ulanov
2016/10/14 21:04:20
The current implementation matches the comments fo
|
| + scoped_refptr<InputEventTimestampsSource> event_timestamps_source() { |
| + return event_timestamps_source_; |
| } |
| private: |
| void OnIncomingMessage(std::unique_ptr<CompoundBuffer> buffer) override; |
| + scoped_refptr<InputEventTimestampsSourceImpl> event_timestamps_source_; |
| + |
| InputStub* input_stub_ = nullptr; |
| - OnInputEventCallback on_input_event_callback_; |
| DISALLOW_COPY_AND_ASSIGN(HostEventDispatcher); |
| }; |