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

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: Rebase. 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
« no previous file with comments | « cc/animation/scroll_offset_animations.h ('k') | cc/animation/timing_function.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 21
22 // Contains an AnimationTimeline and its AnimationPlayer that owns the impl 22 // Contains an AnimationTimeline and its AnimationPlayer that owns the impl
23 // only scroll offset animations running on a particular CC Layer. 23 // only scroll offset animations running on a particular CC Layer.
24 // 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
25 // 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.
26 // Note that this class only exists on the compositor thread. 26 // Note that this class only exists on the compositor thread.
27 class CC_EXPORT ScrollOffsetAnimationsImpl : public AnimationDelegate { 27 class CC_ANIMATION_EXPORT ScrollOffsetAnimationsImpl
28 : public AnimationDelegate {
28 public: 29 public:
29 explicit ScrollOffsetAnimationsImpl(AnimationHost* animation_host); 30 explicit ScrollOffsetAnimationsImpl(AnimationHost* animation_host);
30 31
31 ~ScrollOffsetAnimationsImpl() override; 32 ~ScrollOffsetAnimationsImpl() override;
32 33
33 void ScrollAnimationCreate(ElementId element_id, 34 void ScrollAnimationCreate(ElementId element_id,
34 const gfx::ScrollOffset& target_offset, 35 const gfx::ScrollOffset& target_offset,
35 const gfx::ScrollOffset& current_offset, 36 const gfx::ScrollOffset& current_offset,
36 base::TimeDelta delayed_by); 37 base::TimeDelta delayed_by);
37 38
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // I.e. only one element can have an impl-only scroll offset animation at 75 // I.e. only one element can have an impl-only scroll offset animation at
75 // any given time. 76 // any given time.
76 scoped_refptr<AnimationPlayer> scroll_offset_animation_player_; 77 scoped_refptr<AnimationPlayer> scroll_offset_animation_player_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationsImpl); 79 DISALLOW_COPY_AND_ASSIGN(ScrollOffsetAnimationsImpl);
79 }; 80 };
80 81
81 } // namespace cc 82 } // namespace cc
82 83
83 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_ 84 #endif // CC_ANIMATION_SCROLL_OFFSET_ANIMATIONS_IMPL_H_
OLDNEW
« no previous file with comments | « cc/animation/scroll_offset_animations.h ('k') | cc/animation/timing_function.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698