Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=99: */
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_layers_APZCTreeManagerParent_h
8 : #define mozilla_layers_APZCTreeManagerParent_h
9 :
10 : #include "mozilla/layers/PAPZCTreeManagerParent.h"
11 :
12 : namespace mozilla {
13 : namespace layers {
14 :
15 : class APZCTreeManager;
16 :
17 : class APZCTreeManagerParent
18 : : public PAPZCTreeManagerParent
19 : {
20 : public:
21 :
22 : explicit APZCTreeManagerParent(uint64_t aLayersId, RefPtr<APZCTreeManager> aAPZCTreeManager);
23 : virtual ~APZCTreeManagerParent();
24 :
25 0 : uint64_t LayersId() const { return mLayersId; }
26 :
27 : /**
28 : * Called when the layer tree that this protocol is connected to
29 : * is adopted by another compositor, and we need to switch APZCTreeManagers.
30 : */
31 : void ChildAdopted(RefPtr<APZCTreeManager> aAPZCTreeManager);
32 :
33 : mozilla::ipc::IPCResult
34 : RecvReceiveMultiTouchInputEvent(
35 : const MultiTouchInput& aEvent,
36 : nsEventStatus* aOutStatus,
37 : MultiTouchInput* aOutEvent,
38 : ScrollableLayerGuid* aOutTargetGuid,
39 : uint64_t* aOutInputBlockId) override;
40 :
41 : mozilla::ipc::IPCResult
42 : RecvReceiveMouseInputEvent(
43 : const MouseInput& aEvent,
44 : nsEventStatus* aOutStatus,
45 : MouseInput* aOutEvent,
46 : ScrollableLayerGuid* aOutTargetGuid,
47 : uint64_t* aOutInputBlockId) override;
48 :
49 : mozilla::ipc::IPCResult
50 : RecvReceivePanGestureInputEvent(
51 : const PanGestureInput& aEvent,
52 : nsEventStatus* aOutStatus,
53 : PanGestureInput* aOutEvent,
54 : ScrollableLayerGuid* aOutTargetGuid,
55 : uint64_t* aOutInputBlockId) override;
56 :
57 : mozilla::ipc::IPCResult
58 : RecvReceivePinchGestureInputEvent(
59 : const PinchGestureInput& aEvent,
60 : nsEventStatus* aOutStatus,
61 : PinchGestureInput* aOutEvent,
62 : ScrollableLayerGuid* aOutTargetGuid,
63 : uint64_t* aOutInputBlockId) override;
64 :
65 : mozilla::ipc::IPCResult
66 : RecvReceiveTapGestureInputEvent(
67 : const TapGestureInput& aEvent,
68 : nsEventStatus* aOutStatus,
69 : TapGestureInput* aOutEvent,
70 : ScrollableLayerGuid* aOutTargetGuid,
71 : uint64_t* aOutInputBlockId) override;
72 :
73 : mozilla::ipc::IPCResult
74 : RecvReceiveScrollWheelInputEvent(
75 : const ScrollWheelInput& aEvent,
76 : nsEventStatus* aOutStatus,
77 : ScrollWheelInput* aOutEvent,
78 : ScrollableLayerGuid* aOutTargetGuid,
79 : uint64_t* aOutInputBlockId) override;
80 :
81 : mozilla::ipc::IPCResult
82 : RecvReceiveKeyboardInputEvent(
83 : const KeyboardInput& aEvent,
84 : nsEventStatus* aOutStatus,
85 : KeyboardInput* aOutEvent,
86 : ScrollableLayerGuid* aOutTargetGuid,
87 : uint64_t* aOutInputBlockId) override;
88 :
89 : mozilla::ipc::IPCResult
90 : RecvSetKeyboardMap(const KeyboardMap& aKeyboardMap) override;
91 :
92 : mozilla::ipc::IPCResult
93 : RecvZoomToRect(
94 : const ScrollableLayerGuid& aGuid,
95 : const CSSRect& aRect,
96 : const uint32_t& aFlags) override;
97 :
98 : mozilla::ipc::IPCResult
99 : RecvContentReceivedInputBlock(
100 : const uint64_t& aInputBlockId,
101 : const bool& aPreventDefault) override;
102 :
103 : mozilla::ipc::IPCResult
104 : RecvSetTargetAPZC(
105 : const uint64_t& aInputBlockId,
106 : nsTArray<ScrollableLayerGuid>&& aTargets) override;
107 :
108 : mozilla::ipc::IPCResult
109 : RecvUpdateZoomConstraints(
110 : const ScrollableLayerGuid& aGuid,
111 : const MaybeZoomConstraints& aConstraints) override;
112 :
113 : mozilla::ipc::IPCResult
114 : RecvCancelAnimation(const ScrollableLayerGuid& aGuid) override;
115 :
116 : mozilla::ipc::IPCResult
117 : RecvSetDPI(const float& aDpiValue) override;
118 :
119 : mozilla::ipc::IPCResult
120 : RecvSetAllowedTouchBehavior(
121 : const uint64_t& aInputBlockId,
122 : nsTArray<TouchBehaviorFlags>&& aValues) override;
123 :
124 : mozilla::ipc::IPCResult
125 : RecvStartScrollbarDrag(
126 : const ScrollableLayerGuid& aGuid,
127 : const AsyncDragMetrics& aDragMetrics) override;
128 :
129 : mozilla::ipc::IPCResult
130 : RecvSetLongTapEnabled(const bool& aTapGestureEnabled) override;
131 :
132 : mozilla::ipc::IPCResult
133 : RecvProcessTouchVelocity(
134 : const uint32_t& aTimestampMs,
135 : const float& aSpeedY) override;
136 :
137 : mozilla::ipc::IPCResult
138 : RecvUpdateWheelTransaction(
139 : const LayoutDeviceIntPoint& aRefPoint,
140 : const EventMessage& aEventMessage) override;
141 :
142 : mozilla::ipc::IPCResult
143 : RecvProcessUnhandledEvent(
144 : const LayoutDeviceIntPoint& aRefPoint,
145 : LayoutDeviceIntPoint* aOutRefPoint,
146 : ScrollableLayerGuid* aOutTargetGuid,
147 : uint64_t* aOutFocusSequenceNumber) override;
148 :
149 : void
150 0 : ActorDestroy(ActorDestroyReason aWhy) override { }
151 :
152 : private:
153 : uint64_t mLayersId;
154 : RefPtr<APZCTreeManager> mTreeManager;
155 : };
156 :
157 : } // namespace layers
158 : } // namespace mozilla
159 :
160 : #endif // mozilla_layers_APZCTreeManagerParent_h
|