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_APZCTreeManagerChild_h
8 : #define mozilla_layers_APZCTreeManagerChild_h
9 :
10 : #include "mozilla/layers/IAPZCTreeManager.h"
11 : #include "mozilla/layers/PAPZCTreeManagerChild.h"
12 :
13 : namespace mozilla {
14 : namespace layers {
15 :
16 : class RemoteCompositorSession;
17 :
18 : class APZCTreeManagerChild
19 : : public IAPZCTreeManager
20 : , public PAPZCTreeManagerChild
21 : {
22 : public:
23 : APZCTreeManagerChild();
24 :
25 : void SetCompositorSession(RemoteCompositorSession* aSession);
26 :
27 : nsEventStatus
28 : ReceiveInputEvent(
29 : InputData& aEvent,
30 : ScrollableLayerGuid* aOutTargetGuid,
31 : uint64_t* aOutInputBlockId) override;
32 :
33 : void
34 : SetKeyboardMap(const KeyboardMap& aKeyboardMap) override;
35 :
36 : void
37 : ZoomToRect(
38 : const ScrollableLayerGuid& aGuid,
39 : const CSSRect& aRect,
40 : const uint32_t aFlags = DEFAULT_BEHAVIOR) override;
41 :
42 : void
43 : ContentReceivedInputBlock(
44 : uint64_t aInputBlockId,
45 : bool aPreventDefault) override;
46 :
47 : void
48 : SetTargetAPZC(
49 : uint64_t aInputBlockId,
50 : const nsTArray<ScrollableLayerGuid>& aTargets) override;
51 :
52 : void
53 : UpdateZoomConstraints(
54 : const ScrollableLayerGuid& aGuid,
55 : const Maybe<ZoomConstraints>& aConstraints) override;
56 :
57 : void
58 : CancelAnimation(const ScrollableLayerGuid &aGuid) override;
59 :
60 : void
61 : SetDPI(float aDpiValue) override;
62 :
63 : void
64 : SetAllowedTouchBehavior(
65 : uint64_t aInputBlockId,
66 : const nsTArray<TouchBehaviorFlags>& aValues) override;
67 :
68 : void
69 : StartScrollbarDrag(
70 : const ScrollableLayerGuid& aGuid,
71 : const AsyncDragMetrics& aDragMetrics) override;
72 :
73 : void
74 : SetLongTapEnabled(bool aTapGestureEnabled) override;
75 :
76 : void
77 : ProcessTouchVelocity(uint32_t aTimestampMs, float aSpeedY) override;
78 :
79 : void
80 : ProcessUnhandledEvent(
81 : LayoutDeviceIntPoint* aRefPoint,
82 : ScrollableLayerGuid* aOutTargetGuid,
83 : uint64_t* aOutFocusSequenceNumber) override;
84 :
85 : void
86 : UpdateWheelTransaction(
87 : LayoutDeviceIntPoint aRefPoint,
88 : EventMessage aEventMessage) override;
89 :
90 : protected:
91 : mozilla::ipc::IPCResult RecvHandleTap(const TapType& aType,
92 : const LayoutDevicePoint& aPoint,
93 : const Modifiers& aModifiers,
94 : const ScrollableLayerGuid& aGuid,
95 : const uint64_t& aInputBlockId) override;
96 :
97 : mozilla::ipc::IPCResult RecvNotifyPinchGesture(const PinchGestureType& aType,
98 : const ScrollableLayerGuid& aGuid,
99 : const LayoutDeviceCoord& aSpanChange,
100 : const Modifiers& aModifiers) override;
101 :
102 : virtual
103 0 : ~APZCTreeManagerChild() { }
104 :
105 : private:
106 : MOZ_NON_OWNING_REF RemoteCompositorSession* mCompositorSession;
107 : };
108 :
109 : } // namespace layers
110 : } // namespace mozilla
111 :
112 : #endif // mozilla_layers_APZCTreeManagerChild_h
|