Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/layers/AsyncDragMetrics.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_layers_DragMetrics_h
8
#define mozilla_layers_DragMetrics_h
9
10
#include "FrameMetrics.h"
11
#include "LayersTypes.h"
12
#include "mozilla/Maybe.h"
13
14
namespace IPC {
15
template <typename T> struct ParamTraits;
16
} // namespace IPC
17
18
namespace mozilla {
19
20
namespace layers {
21
22
class AsyncDragMetrics {
23
  friend struct IPC::ParamTraits<mozilla::layers::AsyncDragMetrics>;
24
25
public:
26
  // IPC constructor
27
  AsyncDragMetrics()
28
    : mViewId(0)
29
    , mPresShellId(0)
30
    , mDragStartSequenceNumber(0)
31
    , mScrollbarDragOffset(0)
32
0
  {}
33
34
  AsyncDragMetrics(const FrameMetrics::ViewID& aViewId,
35
                   uint32_t aPresShellId,
36
                   uint64_t aDragStartSequenceNumber,
37
                   CSSCoord aScrollbarDragOffset,
38
                   ScrollDirection aDirection)
39
    : mViewId(aViewId)
40
    , mPresShellId(aPresShellId)
41
    , mDragStartSequenceNumber(aDragStartSequenceNumber)
42
    , mScrollbarDragOffset(aScrollbarDragOffset)
43
    , mDirection(Some(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
  Maybe<ScrollDirection> mDirection;
51
};
52
53
}
54
}
55
56
#endif