Chromium Code Reviews| Index: content/common/input/event_with_latency_info.h |
| diff --git a/content/common/input/event_with_latency_info.h b/content/common/input/event_with_latency_info.h |
| index cdfdb6ea1995309b9ee4140d9621a3772853712f..8c83e3e8ee96a0005f250150da2f0f42a6e64ca2 100644 |
| --- a/content/common/input/event_with_latency_info.h |
| +++ b/content/common/input/event_with_latency_info.h |
| @@ -8,6 +8,7 @@ |
| #include "base/compiler_specific.h" |
| #include "base/logging.h" |
| #include "content/common/content_export.h" |
| +#include "content/common/input/scoped_web_input_event.h" |
| #include "third_party/WebKit/public/web/WebInputEvent.h" |
| #include "ui/events/latency_info.h" |
| @@ -34,6 +35,27 @@ void CONTENT_EXPORT Coalesce(const blink::WebGestureEvent& event_to_coalesce, |
| } // namespace internal |
| +class ScopedWebInputEventWithLatencyInfo { |
| + public: |
| + ScopedWebInputEventWithLatencyInfo(const blink::WebInputEvent& e, |
| + const ui::LatencyInfo& l); |
| + |
| + ~ScopedWebInputEventWithLatencyInfo(); |
| + |
| + bool CanCoalesceWith(const ScopedWebInputEventWithLatencyInfo& other) const |
| + WARN_UNUSED_RESULT; |
| + |
| + const blink::WebInputEvent& event() const; |
| + blink::WebInputEvent& event(); |
| + const ui::LatencyInfo latencyInfo() const { return latency_; } |
| + |
| + void CoalesceWith(const ScopedWebInputEventWithLatencyInfo& other); |
| + |
| + private: |
| + ScopedWebInputEvent event_; |
| + mutable ui::LatencyInfo latency_; |
|
tdresser
2016/07/20 20:52:27
I don't feel great about this being mutable. It's
|
| +}; |
| + |
| template <typename T> |
| class EventWithLatencyInfo { |
| public: |