chromium/cc/input/scrollbar_controller.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/layers/scrollbar_layer_impl_base.h"

#include <algorithm>

#include "base/cancelable_callback.h"
#include "cc/base/features.h"
#include "cc/base/math_util.h"
#include "cc/input/scroll_utils.h"
#include "cc/input/scrollbar.h"
#include "cc/input/scrollbar_controller.h"
#include "cc/layers/viewport.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/scroll_node.h"

namespace cc {
ScrollbarController::~ScrollbarController() {}

ScrollbarController::ScrollbarController(
    LayerTreeHostImpl* layer_tree_host_impl)
    :{}

void ScrollbarController::WillBeginImplFrame() {}

// Retrieves the ScrollbarLayerImplBase corresponding to the stashed ElementId.
ScrollbarLayerImplBase* ScrollbarController::ScrollbarLayer() const {}

const ScrollbarLayerImplBase* ScrollbarController::HitTest(
    const gfx::PointF position_in_widget) const {}

// Performs hit test and prepares scroll deltas that will be used by GSB and
// GSU.
InputHandlerPointerResult ScrollbarController::HandlePointerDown(
    const gfx::PointF position_in_widget,
    bool jump_key_modifier) {}

void ScrollbarController::PostAutoscrollTask(const base::TimeDelta delay) {}

gfx::PointF ScrollbarController::DragOriginForJumpClick(
    const ScrollbarLayerImplBase* scrollbar) const {}

bool ScrollbarController::SnapToDragOrigin(
    const gfx::PointF pointer_position_in_widget) const {}

ui::ScrollGranularity ScrollbarController::Granularity(
    const ScrollbarPart scrollbar_part,
    const bool jump_key_modifier) const {}

float ScrollbarController::GetScrollDistanceForAbsoluteJump() const {}

float ScrollbarController::GetScrollDistanceForDragPosition(
    const gfx::PointF pointer_position_in_widget) const {}

// Performs hit test and prepares scroll deltas that will be used by GSU.
InputHandlerPointerResult ScrollbarController::HandlePointerMove(
    const gfx::PointF position_in_widget) {}

gfx::Vector2dF ScrollbarController::ComputeClampedDelta(
    const ScrollNode& target_node,
    const gfx::Vector2dF& scroll_delta) const {}

float ScrollbarController::GetScrollerToScrollbarRatio() const {}

void ScrollbarController::ResetState() {}

void ScrollbarController::DidRegisterScrollbar(
    ElementId element_id,
    ScrollbarOrientation orientation) {}

void ScrollbarController::DidUnregisterScrollbar(
    ElementId element_id,
    ScrollbarOrientation orientation) {}

void ScrollbarController::RecomputeAutoscrollStateIfNeeded() {}

// Helper to calculate the autoscroll velocity.
float ScrollbarController::InitialDeltaToAutoscrollVelocity(
    gfx::Vector2dF scroll_delta) const {}

void ScrollbarController::StartAutoScroll() {}

void ScrollbarController::StartAutoScrollAnimation() {}

// Performs hit test and prepares scroll deltas that will be used by GSE.
InputHandlerPointerResult ScrollbarController::HandlePointerUp(
    const gfx::PointF position_in_widget) {}

// Returns the layer that is hit by the position_in_widget.
LayerImpl* ScrollbarController::GetLayerHitByPoint(
    const gfx::PointF position_in_widget) const {}

float ScrollbarController::GetViewportLength() const {}

float ScrollbarController::GetScrollDistanceForPercentBasedScroll() const {}

float ScrollbarController::GetPageScaleFactorForScroll() const {}

float ScrollbarController::GetScrollDistanceForScrollbarPart(
    const ScrollbarPart scrollbar_part,
    const bool jump_key_modifier) const {}

float ScrollbarController::ScreenSpaceScaleFactor() const {}

gfx::PointF ScrollbarController::GetScrollbarRelativePosition(
    const gfx::PointF position_in_widget,
    bool* clipped) const {}

// Determines the ScrollbarPart based on the position_in_widget.
ScrollbarPart ScrollbarController::GetScrollbarPartFromPointerDown(
    const gfx::PointF position_in_widget) const {}

// Determines the corresponding rect for the given scrollbar part.
gfx::Rect ScrollbarController::GetRectForScrollbarPart(
    const ScrollbarPart scrollbar_part) const {}

// Determines the scroll delta as a gfx::Vector2dF based on the ScrollbarPart
// and the scrollbar orientation.
gfx::Vector2dF ScrollbarController::GetScrollDeltaForScrollbarPart(
    const ScrollbarPart scrollbar_part,
    const bool jump_key_modifier) const {}

}  // namespace cc