tor-browser

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

APZTestAccess.h (1298B)


      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_layers_APZTestAccess_h
      8 #define mozilla_layers_APZTestAccess_h
      9 
     10 #include <cstddef>  // for size_t
     11 #include <cstdint>  // for int32_t
     12 
     13 namespace mozilla {
     14 namespace layers {
     15 
     16 struct ScrollMetadata;
     17 class WebRenderLayerScrollData;
     18 class WebRenderScrollData;
     19 
     20 // The only purpose of this class is to serve as a single type that can be
     21 // the target of a "friend class" declaration in APZ classes that want to
     22 // give APZ test code access to their private members.
     23 // APZ test code can then access those members via this class.
     24 class APZTestAccess {
     25 public:
     26  static void InitializeForTest(WebRenderLayerScrollData& aLayer,
     27                                int32_t aDescendantCount);
     28  static ScrollMetadata& GetScrollMetadataMut(WebRenderLayerScrollData& aLayer,
     29                                              WebRenderScrollData& aOwner,
     30                                              size_t aIndex);
     31 };
     32 
     33 }  // namespace layers
     34 }  // namespace mozilla
     35 
     36 #endif