| Index: content/renderer/input/scoped_web_input_event_with_latency_info.h
|
| diff --git a/content/renderer/input/scoped_web_input_event_with_latency_info.h b/content/renderer/input/scoped_web_input_event_with_latency_info.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..cd0933165156a504ab96462a5848769ed2dafd92
|
| --- /dev/null
|
| +++ b/content/renderer/input/scoped_web_input_event_with_latency_info.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2017 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 CONTENT_RENDERER_SCOPED_WEB_INPUT_EVENT_WITH_LATENCY_INFO_H_
|
| +#define CONTENT_RENDERER_SCOPED_WEB_INPUT_EVENT_WITH_LATENCY_INFO_H_
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "base/logging.h"
|
| +#include "content/common/content_export.h"
|
| +#include "third_party/WebKit/public/platform/WebCoalescedInputEvent.h"
|
| +#include "third_party/WebKit/public/platform/WebGestureEvent.h"
|
| +#include "third_party/WebKit/public/platform/WebMouseWheelEvent.h"
|
| +#include "third_party/WebKit/public/platform/WebTouchEvent.h"
|
| +#include "ui/events/blink/blink_event_util.h"
|
| +#include "ui/events/blink/web_input_event_traits.h"
|
| +#include "ui/events/latency_info.h"
|
| +
|
| +namespace content {
|
| +
|
| +class ScopedWebInputEventWithLatencyInfo {
|
| + public:
|
| + ScopedWebInputEventWithLatencyInfo(ui::WebScopedInputEvent,
|
| + const ui::LatencyInfo&);
|
| +
|
| + ~ScopedWebInputEventWithLatencyInfo();
|
| +
|
| + bool CanCoalesceWith(const ScopedWebInputEventWithLatencyInfo& other) const
|
| + WARN_UNUSED_RESULT;
|
| +
|
| + const blink::WebInputEvent& event() const;
|
| + const blink::WebCoalescedInputEvent& coalesced_event() const;
|
| + blink::WebInputEvent& event();
|
| + const ui::LatencyInfo latencyInfo() const { return latency_; }
|
| +
|
| + void CoalesceWith(const ScopedWebInputEventWithLatencyInfo& other);
|
| +
|
| + private:
|
| + blink::WebScopedCoalescedInputEvent event_;
|
| + mutable ui::LatencyInfo latency_;
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_SCOPED_WEB_INPUT_EVENT_WITH_LATENCY_INFO_H_
|
|
|