| Index: cc/trees/tree_scroll_elasticity_client.h
|
| diff --git a/cc/trees/tree_scroll_elasticity_client.h b/cc/trees/tree_scroll_elasticity_client.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3b5931741433b3f9055bc518de899fe011992403
|
| --- /dev/null
|
| +++ b/cc/trees/tree_scroll_elasticity_client.h
|
| @@ -0,0 +1,46 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CC_TREES_TREE_SCROLL_ELASTICITY_CLIENT_H_
|
| +#define CC_TREES_TREE_SCROLL_ELASTICITY_CLIENT_H_
|
| +
|
| +#include "cc/input/scroll_elasticity_controller.h"
|
| +
|
| +namespace cc {
|
| +
|
| +class LayerTreeHostImpl;
|
| +
|
| +class TreeScrollElasticityClient
|
| + : public ScrollElasticityControllerClient {
|
| + public:
|
| + TreeScrollElasticityClient(LayerTreeHostImpl* tree);
|
| + virtual ~TreeScrollElasticityClient();
|
| +
|
| + ScrollElasticityController* controller() const { return controller_; }
|
| +
|
| + // cc::ScrollElasticityControllerClient implementation:
|
| + void BindToController(ScrollElasticityController* controller) override;
|
| + bool allowsHorizontalStretching() const override;
|
| + bool allowsVerticalStretching() const override;
|
| + gfx::Vector2dF stretchAmount() const override;
|
| + bool pinnedInDirection(const gfx::Vector2dF& delta) const override;
|
| + bool canScrollHorizontally() const override;
|
| + bool canScrollVertically() const override;
|
| + gfx::Vector2dF absoluteScrollPosition() const override;
|
| + void immediateScrollBy(const gfx::Vector2dF& delta) override;
|
| + void immediateScrollByWithoutContentEdgeConstraints(const gfx::Vector2dF& delta) override;
|
| + void startSnapRubberbandTimer() override;
|
| + void stopSnapRubberbandTimer() override;
|
| + void adjustScrollPositionToBoundsIfNecessary() override;
|
| +
|
| + private:
|
| + LayerTreeHostImpl* tree_;
|
| + gfx::Vector2dF stretch_offset_;
|
| + bool timer_active_;
|
| + ScrollElasticityController* controller_;
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_TREES_TREE_SCROLL_ELASTICITY_CLIENT_H_
|
|
|