| Index: cc/test/animation_test_common.h
|
| diff --git a/cc/test/animation_test_common.h b/cc/test/animation_test_common.h
|
| index 008af87d0db3142745a7695e9680e6e2860f61eb..1205bf30929cc90c93e0d4be2bb0f7de66f70fdc 100644
|
| --- a/cc/test/animation_test_common.h
|
| +++ b/cc/test/animation_test_common.h
|
| @@ -9,7 +9,9 @@
|
| #include "cc/animation/animation_curve.h"
|
| #include "cc/animation/layer_animation_controller.h"
|
| #include "cc/animation/layer_animation_value_observer.h"
|
| +#include "cc/animation/layer_animation_value_provider.h"
|
| #include "cc/output/filter_operations.h"
|
| +#include "cc/test/geometry_test_utils.h"
|
|
|
| namespace cc {
|
| class LayerImpl;
|
| @@ -73,12 +75,14 @@ class FakeLayerAnimationValueObserver : public LayerAnimationValueObserver {
|
| virtual void OnFilterAnimated(const FilterOperations& filters) OVERRIDE;
|
| virtual void OnOpacityAnimated(float opacity) OVERRIDE;
|
| virtual void OnTransformAnimated(const gfx::Transform& transform) OVERRIDE;
|
| + virtual void OnScrollOffsetAnimated(gfx::Vector2dF scroll_offset) OVERRIDE;
|
| virtual void OnAnimationWaitingForDeletion() OVERRIDE;
|
| virtual bool IsActive() const OVERRIDE;
|
|
|
| const FilterOperations& filters() const { return filters_; }
|
| float opacity() const { return opacity_; }
|
| const gfx::Transform& transform() const { return transform_; }
|
| + gfx::Vector2dF scroll_offset() { return scroll_offset_; }
|
|
|
| bool animation_waiting_for_deletion() {
|
| return animation_waiting_for_deletion_;
|
| @@ -88,6 +92,7 @@ class FakeLayerAnimationValueObserver : public LayerAnimationValueObserver {
|
| FilterOperations filters_;
|
| float opacity_;
|
| gfx::Transform transform_;
|
| + gfx::Vector2dF scroll_offset_;
|
| bool animation_waiting_for_deletion_;
|
| };
|
|
|
| @@ -97,6 +102,18 @@ class FakeInactiveLayerAnimationValueObserver
|
| virtual bool IsActive() const OVERRIDE;
|
| };
|
|
|
| +class FakeLayerAnimationValueProvider : public LayerAnimationValueProvider {
|
| + public:
|
| + virtual gfx::Vector2dF ScrollOffsetForAnimation() const OVERRIDE;
|
| +
|
| + void set_scroll_offset(gfx::Vector2dF scroll_offset) {
|
| + scroll_offset_ = scroll_offset;
|
| + }
|
| +
|
| + private:
|
| + gfx::Vector2dF scroll_offset_;
|
| +};
|
| +
|
| int AddOpacityTransitionToController(LayerAnimationController* controller,
|
| double duration,
|
| float start_opacity,
|
|
|