LCOV - code coverage report
Current view: top level - dom/ipc - CoalescedWheelData.h (source / functions) Hit Total Coverage
Test: output.info Lines: 3 15 20.0 %
Date: 2017-07-14 16:53:18 Functions: 1 7 14.3 %
Legend: Lines: hit not hit

          Line data    Source code
       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_dom_CoalescedWheelData_h
       8             : #define mozilla_dom_CoalescedWheelData_h
       9             : 
      10             : #include "mozilla/MouseEvents.h"
      11             : #include "mozilla/UniquePtr.h"
      12             : 
      13             : namespace mozilla {
      14             : namespace dom {
      15             : 
      16           0 : class CoalescedWheelData final
      17             : {
      18             : protected:
      19             :   typedef mozilla::layers::ScrollableLayerGuid ScrollableLayerGuid;
      20             : 
      21             : public:
      22             :   UniquePtr<WidgetWheelEvent> mCoalescedWheelEvent;
      23             :   ScrollableLayerGuid mGuid;
      24             :   uint64_t mInputBlockId;
      25             : 
      26           1 :   CoalescedWheelData()
      27           1 :     : mInputBlockId(0)
      28             :   {
      29           1 :   }
      30             : 
      31             :   void Coalesce(const WidgetWheelEvent& aEvent,
      32             :                 const ScrollableLayerGuid& aGuid,
      33             :                 const uint64_t& aInputBlockId);
      34           0 :   void Reset()
      35             :   {
      36           0 :     mCoalescedWheelEvent = nullptr;
      37           0 :   }
      38             : 
      39           0 :   bool IsEmpty()
      40             :   {
      41           0 :     return !mCoalescedWheelEvent;
      42             :   }
      43             : 
      44             :   bool CanCoalesce(const WidgetWheelEvent& aEvent,
      45             :                    const ScrollableLayerGuid& aGuid,
      46             :                    const uint64_t& aInputBlockId);
      47             : 
      48           0 :   const WidgetWheelEvent* GetCoalescedWheelEvent()
      49             :   {
      50           0 :     return mCoalescedWheelEvent.get();
      51             :   }
      52             : 
      53           0 :   ScrollableLayerGuid GetScrollableLayerGuid()
      54             :   {
      55           0 :     return mGuid;
      56             :   }
      57             : 
      58           0 :   uint64_t GetInputBlockId()
      59             :   {
      60           0 :     return mInputBlockId;
      61             :   }
      62             : };
      63             : 
      64             : } // namespace dom
      65             : } // namespace mozilla
      66             : 
      67             : #endif // mozilla_dom_CoalescedWheelData_h

Generated by: LCOV version 1.13