| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ | 5 #ifndef CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ |
| 6 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ | 6 #define CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "cc/animation/animation_delegate.h" | 11 #include "cc/animation/animation_delegate.h" |
| 12 #include "cc/animation/scroll_offset_animation_curve.h" | 12 #include "cc/animation/scroll_offset_animation_curve.h" |
| 13 #include "cc/trees/mutator_host_client.h" | 13 #include "cc/trees/mutator_host_client.h" |
| 14 #include "ui/gfx/geometry/scroll_offset.h" | 14 #include "ui/gfx/geometry/scroll_offset.h" |
| 15 | 15 |
| 16 namespace cc { | 16 namespace cc { |
| 17 | 17 |
| 18 class AnimationPlayer; | 18 class AnimationPlayer; |
| 19 class AnimationHost; | 19 class AnimationHost; |
| 20 class AnimationTimeline; | 20 class AnimationTimeline; |
| 21 class ElementAnimations; | |
| 22 | 21 |
| 23 // Contains an AnimationTimeline and its AnimationPlayer that owns the impl | 22 // Contains an AnimationTimeline and its AnimationPlayer that owns the impl |
| 24 // only scroll offset animations running on a particular CC Layer. | 23 // only scroll offset animations running on a particular CC Layer. |
| 25 // We have just one player for impl-only scroll offset animations. I.e. only | 24 // We have just one player for impl-only scroll offset animations. I.e. only |
| 26 // one element can have an impl-only scroll offset animation at any given time. | 25 // one element can have an impl-only scroll offset animation at any given time. |
| 27 // Note that this class only exists on the compositor thread. | 26 // Note that this class only exists on the compositor thread. |
| 28 class CC_EXPORT ScrollOffsetAnimationsImpl : public AnimationDelegate { | 27 class CC_EXPORT ScrollOffsetAnimationsImpl : public AnimationDelegate { |
| 29 public: | 28 public: |
| 30 explicit ScrollOffsetAnimationsImpl(AnimationHost* animation_host); | 29 explicit ScrollOffsetAnimationsImpl(AnimationHost* animation_host); |
| 31 | 30 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // I.e. only one element can have an impl-only scroll offset animation at | 74 // I.e. only one element can have an impl-only scroll offset animation at |
| 76 // any given time. | 75 // any given time. |
| 77 scoped_refptr<AnimationPlayer> scroll_offset_animation_player_; | 76 scoped_refptr<AnimationPlayer> scroll_offset_animation_player_; |
| 78 | 77 |
| 79 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationsImpl); | 78 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationsImpl); |
| 80 }; | 79 }; |
| 81 | 80 |
| 82 } // namespace cc | 81 } // namespace cc |
| 83 | 82 |
| 84 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ | 83 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ |
| OLD | NEW |