Source code

Revision control

Other Tools

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
#include "QueuedInput.h"
8
9
#include "AsyncPanZoomController.h"
10
#include "InputBlockState.h"
11
#include "InputData.h"
12
#include "OverscrollHandoffState.h"
13
14
namespace mozilla {
15
namespace layers {
16
17
QueuedInput::QueuedInput(const MultiTouchInput& aInput, TouchBlockState& aBlock)
18
: mInput(MakeUnique<MultiTouchInput>(aInput)), mBlock(&aBlock) {}
19
20
QueuedInput::QueuedInput(const ScrollWheelInput& aInput,
21
WheelBlockState& aBlock)
22
: mInput(MakeUnique<ScrollWheelInput>(aInput)), mBlock(&aBlock) {}
23
24
QueuedInput::QueuedInput(const MouseInput& aInput, DragBlockState& aBlock)
25
: mInput(MakeUnique<MouseInput>(aInput)), mBlock(&aBlock) {}
26
27
QueuedInput::QueuedInput(const PanGestureInput& aInput,
28
PanGestureBlockState& aBlock)
29
: mInput(MakeUnique<PanGestureInput>(aInput)), mBlock(&aBlock) {}
30
31
QueuedInput::QueuedInput(const KeyboardInput& aInput,
32
KeyboardBlockState& aBlock)
33
: mInput(MakeUnique<KeyboardInput>(aInput)), mBlock(&aBlock) {}
34
35
InputData* QueuedInput::Input() { return mInput.get(); }
36
37
InputBlockState* QueuedInput::Block() { return mBlock.get(); }
38
39
} // namespace layers
40
} // namespace mozilla