| OLD | NEW | 
|    1 // Copyright 2012 The Chromium Authors. All rights reserved. |    1 // Copyright 2012 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #ifndef CC_TEST_ANIMATION_TEST_COMMON_H_ |    5 #ifndef CC_TEST_ANIMATION_TEST_COMMON_H_ | 
|    6 #define CC_TEST_ANIMATION_TEST_COMMON_H_ |    6 #define CC_TEST_ANIMATION_TEST_COMMON_H_ | 
|    7  |    7  | 
|    8 #include "cc/animation/animation.h" |    8 #include "cc/animation/animation.h" | 
|    9 #include "cc/animation/animation_curve.h" |    9 #include "cc/animation/animation_curve.h" | 
|   10 #include "cc/animation/layer_animation_controller.h" |   10 #include "cc/animation/layer_animation_controller.h" | 
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   75  public: |   75  public: | 
|   76   FakeLayerAnimationValueObserver(); |   76   FakeLayerAnimationValueObserver(); | 
|   77   ~FakeLayerAnimationValueObserver() override; |   77   ~FakeLayerAnimationValueObserver() override; | 
|   78  |   78  | 
|   79   // LayerAnimationValueObserver implementation |   79   // LayerAnimationValueObserver implementation | 
|   80   void OnFilterAnimated(const FilterOperations& filters) override; |   80   void OnFilterAnimated(const FilterOperations& filters) override; | 
|   81   void OnOpacityAnimated(float opacity) override; |   81   void OnOpacityAnimated(float opacity) override; | 
|   82   void OnTransformAnimated(const gfx::Transform& transform) override; |   82   void OnTransformAnimated(const gfx::Transform& transform) override; | 
|   83   void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; |   83   void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; | 
|   84   void OnAnimationWaitingForDeletion() override; |   84   void OnAnimationWaitingForDeletion() override; | 
 |   85   void OnScrollOffsetAnimationRemoved() override; | 
|   85   bool IsActive() const override; |   86   bool IsActive() const override; | 
|   86  |   87  | 
|   87   const FilterOperations& filters() const { return filters_; } |   88   const FilterOperations& filters() const { return filters_; } | 
|   88   float opacity() const  { return opacity_; } |   89   float opacity() const  { return opacity_; } | 
|   89   const gfx::Transform& transform() const { return transform_; } |   90   const gfx::Transform& transform() const { return transform_; } | 
|   90   gfx::ScrollOffset scroll_offset() { return scroll_offset_; } |   91   gfx::ScrollOffset scroll_offset() { return scroll_offset_; } | 
|   91  |   92  | 
|   92   bool animation_waiting_for_deletion() { |   93   bool animation_waiting_for_deletion() { | 
|   93     return animation_waiting_for_deletion_; |   94     return animation_waiting_for_deletion_; | 
|   94   } |   95   } | 
|   95  |   96  | 
 |   97   bool scroll_offset_animation_removed() const { | 
 |   98     return scroll_offset_animation_removed_; | 
 |   99   } | 
 |  100   void reset_scroll_offset_animation_removed() { | 
 |  101     scroll_offset_animation_removed_ = false; | 
 |  102   } | 
 |  103  | 
|   96  private: |  104  private: | 
|   97   FilterOperations filters_; |  105   FilterOperations filters_; | 
|   98   float opacity_; |  106   float opacity_; | 
|   99   gfx::Transform transform_; |  107   gfx::Transform transform_; | 
|  100   gfx::ScrollOffset scroll_offset_; |  108   gfx::ScrollOffset scroll_offset_; | 
|  101   bool animation_waiting_for_deletion_; |  109   bool animation_waiting_for_deletion_; | 
 |  110   bool scroll_offset_animation_removed_; | 
|  102 }; |  111 }; | 
|  103  |  112  | 
|  104 class FakeInactiveLayerAnimationValueObserver |  113 class FakeInactiveLayerAnimationValueObserver | 
|  105     : public FakeLayerAnimationValueObserver { |  114     : public FakeLayerAnimationValueObserver { | 
|  106  public: |  115  public: | 
|  107   bool IsActive() const override; |  116   bool IsActive() const override; | 
|  108 }; |  117 }; | 
|  109  |  118  | 
|  110 class FakeLayerAnimationValueProvider : public LayerAnimationValueProvider { |  119 class FakeLayerAnimationValueProvider : public LayerAnimationValueProvider { | 
|  111  public: |  120  public: | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  173                              float end_brightness); |  182                              float end_brightness); | 
|  174  |  183  | 
|  175 int AddAnimatedFilterToLayer(LayerImpl* layer, |  184 int AddAnimatedFilterToLayer(LayerImpl* layer, | 
|  176                              double duration, |  185                              double duration, | 
|  177                              float start_brightness, |  186                              float start_brightness, | 
|  178                              float end_brightness); |  187                              float end_brightness); | 
|  179  |  188  | 
|  180 }  // namespace cc |  189 }  // namespace cc | 
|  181  |  190  | 
|  182 #endif  // CC_TEST_ANIMATION_TEST_COMMON_H_ |  191 #endif  // CC_TEST_ANIMATION_TEST_COMMON_H_ | 
| OLD | NEW |