1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_CoalescedMouseData_h
8 #define mozilla_dom_CoalescedMouseData_h
10 #include "CoalescedInputData.h"
11 #include "mozilla/MouseEvents.h"
12 #include "nsRefreshObservers.h"
14 class nsRefreshDriver
;
16 namespace mozilla::dom
{
18 class CoalescedMouseData final
: public CoalescedInputData
<WidgetMouseEvent
> {
20 CoalescedMouseData() { MOZ_COUNT_CTOR(mozilla::dom::CoalescedMouseData
); }
22 ~CoalescedMouseData() { MOZ_COUNT_DTOR(mozilla::dom::CoalescedMouseData
); }
24 void Coalesce(const WidgetMouseEvent
& aEvent
,
25 const ScrollableLayerGuid
& aGuid
,
26 const uint64_t& aInputBlockId
);
28 bool CanCoalesce(const WidgetMouseEvent
& aEvent
,
29 const ScrollableLayerGuid
& aGuid
,
30 const uint64_t& aInputBlockId
);
33 class CoalescedMouseMoveFlusher final
: public CoalescedInputFlusher
{
35 explicit CoalescedMouseMoveFlusher(BrowserChild
* aBrowserChild
);
37 void WillRefresh(mozilla::TimeStamp aTime
) override
;
40 ~CoalescedMouseMoveFlusher() override
;
43 } // namespace mozilla::dom
45 #endif // mozilla_dom_CoalescedMouseData_h