LCOV - code coverage report
Current view: top level - gfx/layers/apz/src - DragTracker.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 1 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       5             : 
       6             : #ifndef mozilla_layers_DragTracker_h
       7             : #define mozilla_layers_DragTracker_h
       8             : 
       9             : #include "mozilla/EventForwards.h"
      10             : #include "mozilla/Maybe.h"
      11             : 
      12             : namespace mozilla {
      13             : 
      14             : class MouseInput;
      15             : 
      16             : namespace layers {
      17             : 
      18             : // DragTracker simply tracks a sequence of mouse inputs and allows us to tell
      19             : // if we are in a drag or not (i.e. the left mouse button went down and hasn't
      20             : // gone up yet).
      21           0 : class DragTracker
      22             : {
      23             : public:
      24             :   DragTracker();
      25             :   static bool StartsDrag(const MouseInput& aInput);
      26             :   static bool EndsDrag(const MouseInput& aInput);
      27             :   void Update(const MouseInput& aInput);
      28             :   bool InDrag() const;
      29             :   bool IsOnScrollbar(bool aOnScrollbar);
      30             : 
      31             : private:
      32             :   Maybe<bool> mOnScrollbar;
      33             :   bool mInDrag;
      34             : };
      35             : 
      36             : } // namespace layers
      37             : } // namespace mozilla
      38             : 
      39             : #endif /* mozilla_layers_DragTracker_h */

Generated by: LCOV version 1.13