tor-browser

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

CoalescedTouchData.h (1622B)


      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__CoalescedTouchData_h
      8 #define mozilla_dom__CoalescedTouchData_h
      9 
     10 #include "CoalescedInputData.h"
     11 #include "mozilla/TouchEvents.h"
     12 
     13 namespace mozilla::dom {
     14 
     15 class CoalescedTouchData final : public CoalescedInputData<WidgetTouchEvent> {
     16 public:
     17  void CreateCoalescedTouchEvent(const WidgetTouchEvent& aEvent);
     18 
     19  void Coalesce(const WidgetTouchEvent& aEvent,
     20                const ScrollableLayerGuid& aGuid, const uint64_t& aInputBlockId,
     21                const nsEventStatus& aApzResponse);
     22 
     23  bool CanCoalesce(const WidgetTouchEvent& aEvent,
     24                   const ScrollableLayerGuid& aGuid,
     25                   const uint64_t& aInputBlockId,
     26                   const nsEventStatus& aApzResponse);
     27 
     28  nsEventStatus GetApzResponse() { return mApzResponse; }
     29 
     30  void NotifyTouchRawUpdateOfHandled(const WidgetTouchEvent& aEvent);
     31 
     32 private:
     33  Touch* GetTouch(int32_t aIdentifier);
     34 
     35  nsEventStatus mApzResponse = nsEventStatus_eIgnore;
     36 };
     37 
     38 class CoalescedTouchMoveFlusher final : public CoalescedInputFlusher {
     39 public:
     40  explicit CoalescedTouchMoveFlusher(BrowserChild* aBrowserChild);
     41  void WillRefresh(mozilla::TimeStamp aTime) override;
     42 
     43 private:
     44  ~CoalescedTouchMoveFlusher() override;
     45 };
     46 };  // namespace mozilla::dom
     47 
     48 #endif  // mozilla_dom_CoalescedTouchData_h