Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: cc/animation/scroll_offset_animations_impl.h

Issue 2506093003: CC Animation: Make cc/animation an independent GN component. (Closed)
Patch Set: Import compiler.gni Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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; 21 class ElementAnimations;
22 22
23 // Contains an AnimationTimeline and its AnimationPlayer that owns the impl 23 // Contains an AnimationTimeline and its AnimationPlayer that owns the impl
24 // only scroll offset animations running on a particular CC Layer. 24 // 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 25 // 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. 26 // 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. 27 // Note that this class only exists on the compositor thread.
28 class CC_EXPORT ScrollOffsetAnimationsImpl : public AnimationDelegate { 28 class CC_ANIMATION_EXPORT ScrollOffsetAnimationsImpl
29 : public AnimationDelegate {
29 public: 30 public:
30 explicit ScrollOffsetAnimationsImpl(AnimationHost* animation_host); 31 explicit ScrollOffsetAnimationsImpl(AnimationHost* animation_host);
31 32
32 ~ScrollOffsetAnimationsImpl() override; 33 ~ScrollOffsetAnimationsImpl() override;
33 34
34 void ScrollAnimationCreate(ElementId element_id, 35 void ScrollAnimationCreate(ElementId element_id,
35 const gfx::ScrollOffset& target_offset, 36 const gfx::ScrollOffset& target_offset,
36 const gfx::ScrollOffset& current_offset, 37 const gfx::ScrollOffset& current_offset,
37 base::TimeDelta delayed_by); 38 base::TimeDelta delayed_by);
38 39
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // I.e. only one element can have an impl-only scroll offset animation at 76 // I.e. only one element can have an impl-only scroll offset animation at
76 // any given time. 77 // any given time.
77 scoped_refptr<AnimationPlayer> scroll_offset_animation_player_; 78 scoped_refptr<AnimationPlayer> scroll_offset_animation_player_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationsImpl); 80 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationsImpl);
80 }; 81 };
81 82
82 } // namespace cc 83 } // namespace cc
83 84
84 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ 85 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698