Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set sw=2 ts=8 et 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_layers_DragMetrics_h
8 : #define mozilla_layers_DragMetrics_h
9 :
10 : #include "FrameMetrics.h"
11 : #include "LayersTypes.h"
12 :
13 : namespace IPC {
14 : template <typename T> struct ParamTraits;
15 : } // namespace IPC
16 :
17 : namespace mozilla {
18 :
19 : namespace layers {
20 :
21 : class AsyncDragMetrics {
22 : friend struct IPC::ParamTraits<mozilla::layers::AsyncDragMetrics>;
23 :
24 : public:
25 : // IPC constructor
26 0 : AsyncDragMetrics()
27 0 : : mViewId(0)
28 : , mPresShellId(0)
29 : , mDragStartSequenceNumber(0)
30 : , mScrollbarDragOffset(0)
31 0 : , mDirection(ScrollDirection::NONE)
32 0 : {}
33 :
34 0 : AsyncDragMetrics(const FrameMetrics::ViewID& aViewId,
35 : uint32_t aPresShellId,
36 : uint64_t aDragStartSequenceNumber,
37 : CSSCoord aScrollbarDragOffset,
38 : ScrollDirection aDirection)
39 0 : : mViewId(aViewId)
40 : , mPresShellId(aPresShellId)
41 : , mDragStartSequenceNumber(aDragStartSequenceNumber)
42 : , mScrollbarDragOffset(aScrollbarDragOffset)
43 0 : , mDirection(aDirection)
44 0 : {}
45 :
46 : FrameMetrics::ViewID mViewId;
47 : uint32_t mPresShellId;
48 : uint64_t mDragStartSequenceNumber;
49 : CSSCoord mScrollbarDragOffset; // relative to the thumb's start offset
50 : ScrollDirection mDirection;
51 : };
52 :
53 : }
54 : }
55 :
56 : #endif
|