tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

QueuedInput.cpp (1705B)


      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 PinchGestureInput& aInput,
     32                         PinchGestureBlockState& aBlock)
     33    : mInput(MakeUnique<PinchGestureInput>(aInput)), mBlock(&aBlock) {}
     34 
     35 QueuedInput::QueuedInput(const KeyboardInput& aInput,
     36                         KeyboardBlockState& aBlock)
     37    : mInput(MakeUnique<KeyboardInput>(aInput)), mBlock(&aBlock) {}
     38 
     39 InputData* QueuedInput::Input() { return mInput.get(); }
     40 
     41 InputBlockState* QueuedInput::Block() { return mBlock.get(); }
     42 
     43 }  // namespace layers
     44 }  // namespace mozilla