// Copyright 2013 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CC_INPUT_SCROLLBAR_H_ #define CC_INPUT_SCROLLBAR_H_ #include "base/memory/ref_counted.h" #include "cc/cc_export.h" #include "cc/paint/paint_canvas.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/rect.h" // Autoscrolling (on the main thread) happens by applying a delta every 50ms. // Hence, pixels per second for a autoscroll cc animation can be calculated as: // autoscroll velocity = delta / 0.05 sec = delta x 20 static constexpr float kAutoscrollMultiplier = …; static constexpr base::TimeDelta kInitialAutoscrollTimerDelay = …; // Constants used to figure the how far out in the non-scrolling direction // should trigger the thumb to snap back to its origin. These calculations are // based on observing the behavior of the MSVC8 main window scrollbar + some // guessing/extrapolation. static constexpr int kOffSideMultiplier = …; static constexpr int kDefaultWinScrollbarThickness = …; namespace cc { enum class ScrollbarOrientation { … }; enum class ScrollbarPart { … }; class Scrollbar : public base::RefCounted<Scrollbar> { … }; } // namespace cc #endif // CC_INPUT_SCROLLBAR_H_