1 // Copyright 2018 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_SCROLL_SCROLL_CUSTOMIZATION_H_ 6 #define THIRD_PARTY_BLINK_RENDERER_CORE_SCROLL_SCROLL_CUSTOMIZATION_H_ 7 8 #include <stdint.h> 9 10 #include "third_party/blink/renderer/core/core_export.h" 11 12 namespace blink { 13 namespace scroll_customization { 14 using ScrollDirection = uint8_t; 15 16 constexpr ScrollDirection kScrollDirectionNone = 0; 17 constexpr ScrollDirection kScrollDirectionPanLeft = 1 << 0; 18 constexpr ScrollDirection kScrollDirectionPanRight = 1 << 1; 19 constexpr ScrollDirection kScrollDirectionPanX = 20 kScrollDirectionPanLeft | kScrollDirectionPanRight; 21 constexpr ScrollDirection kScrollDirectionPanUp = 1 << 2; 22 constexpr ScrollDirection kScrollDirectionPanDown = 1 << 3; 23 constexpr ScrollDirection kScrollDirectionPanY = 24 kScrollDirectionPanUp | kScrollDirectionPanDown; 25 constexpr ScrollDirection kScrollDirectionAuto = 26 kScrollDirectionPanX | kScrollDirectionPanY; 27 28 CORE_EXPORT ScrollDirection GetScrollDirectionFromDeltas(double delta_x, 29 double delta_y); 30 } // namespace scroll_customization 31 } // namespace blink 32 33 #endif // THIRD_PARTY_BLINK_RENDERER_CORE_SCROLL_SCROLL_CUSTOMIZATION_H_ 34