/work/obj-fuzz/dist/include/mozilla/dom/CoalescedInputData.h
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #ifndef mozilla_dom_CoalescedInputData_h |
8 | | #define mozilla_dom_CoalescedInputData_h |
9 | | |
10 | | #include "mozilla/UniquePtr.h" |
11 | | #include "FrameMetrics.h" |
12 | | |
13 | | namespace mozilla { |
14 | | namespace dom { |
15 | | |
16 | | template<class InputEventType> |
17 | | class CoalescedInputData |
18 | | { |
19 | | protected: |
20 | | typedef mozilla::layers::ScrollableLayerGuid ScrollableLayerGuid; |
21 | | |
22 | | UniquePtr<InputEventType> mCoalescedInputEvent; |
23 | | ScrollableLayerGuid mGuid; |
24 | | uint64_t mInputBlockId; |
25 | | |
26 | | public: |
27 | | CoalescedInputData() |
28 | | : mInputBlockId(0) |
29 | 0 | { |
30 | 0 | } Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetWheelEvent>::CoalescedInputData() Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetMouseEvent>::CoalescedInputData() |
31 | | |
32 | | void RetrieveDataFrom(CoalescedInputData& aSource) |
33 | 0 | { |
34 | 0 | mCoalescedInputEvent = std::move(aSource.mCoalescedInputEvent); |
35 | 0 | mGuid = aSource.mGuid; |
36 | 0 | mInputBlockId = aSource.mInputBlockId; |
37 | 0 | } |
38 | | |
39 | | bool IsEmpty() |
40 | 0 | { |
41 | 0 | return !mCoalescedInputEvent; |
42 | 0 | } Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetMouseEvent>::IsEmpty() Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetWheelEvent>::IsEmpty() |
43 | | |
44 | | bool CanCoalesce(const InputEventType& aEvent, |
45 | | const ScrollableLayerGuid& aGuid, |
46 | | const uint64_t& aInputBlockId); |
47 | | |
48 | | UniquePtr<InputEventType> TakeCoalescedEvent() |
49 | 0 | { |
50 | 0 | return std::move(mCoalescedInputEvent); |
51 | 0 | } Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetMouseEvent>::TakeCoalescedEvent() Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetWheelEvent>::TakeCoalescedEvent() |
52 | | |
53 | | ScrollableLayerGuid GetScrollableLayerGuid() |
54 | 0 | { |
55 | 0 | return mGuid; |
56 | 0 | } Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetMouseEvent>::GetScrollableLayerGuid() Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetWheelEvent>::GetScrollableLayerGuid() |
57 | | |
58 | | uint64_t GetInputBlockId() |
59 | 0 | { |
60 | 0 | return mInputBlockId; |
61 | 0 | } Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetMouseEvent>::GetInputBlockId() Unexecuted instantiation: mozilla::dom::CoalescedInputData<mozilla::WidgetWheelEvent>::GetInputBlockId() |
62 | | }; |
63 | | |
64 | | } // namespace dom |
65 | | } // namespace mozilla |
66 | | |
67 | | #endif // mozilla_dom_CoalescedInputData_h |