OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CompositorAnimationHost_h | 5 #ifndef CompositorAnimationHost_h |
6 #define CompositorAnimationHost_h | 6 #define CompositorAnimationHost_h |
7 | 7 |
8 #include "base/memory/ref_counted.h" | |
9 #include "cc/animation/animation_host.h" | |
10 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
9 #include "platform/graphics/CompositorElementId.h" | |
11 #include "ui/gfx/geometry/vector2d.h" | 10 #include "ui/gfx/geometry/vector2d.h" |
12 #include "wtf/Noncopyable.h" | 11 #include "wtf/Noncopyable.h" |
13 | 12 |
14 #include <memory> | 13 namespace cc { |
14 class AnimationHost; | |
15 } | |
15 | 16 |
16 namespace blink { | 17 namespace blink { |
17 | 18 |
19 class CompositorAnimationTimeline; | |
20 | |
18 // A compositor representation for cc::AnimationHost. | 21 // A compositor representation for cc::AnimationHost. |
19 // This class wraps cc::AnimationHost and is currently only created from | |
20 // CompositorAnimationTimeline::compositorAnimationHost. | |
21 // TODO(ymalik): Correctly introduce CompositorAnimationHost to blink. See | |
22 // crbug.com/610763. | |
23 class PLATFORM_EXPORT CompositorAnimationHost { | 22 class PLATFORM_EXPORT CompositorAnimationHost { |
23 WTF_MAKE_NONCOPYABLE(CompositorAnimationHost); | |
24 | |
24 public: | 25 public: |
25 explicit CompositorAnimationHost(cc::AnimationHost*); | 26 explicit CompositorAnimationHost(cc::AnimationHost*); |
26 | 27 |
27 // TODO(ymalik): Remove when CompositorAnimationHost* optional nullable ptr | 28 void addTimeline(CompositorAnimationTimeline*); |
jbroman
2016/12/13 16:38:32
These look like they could take "const CompositorA
loyso (OOO)
2016/12/13 22:23:35
Yes, technically we can. Only because 'const' sema
loyso (OOO)
2016/12/19 04:03:12
Done.
| |
28 // is returned. See crbug.com/610763. | 29 void removeTimeline(CompositorAnimationTimeline*); |
29 bool isNull() const; | |
30 | 30 |
31 void adjustImplOnlyScrollOffsetAnimation(cc::ElementId, | 31 void adjustImplOnlyScrollOffsetAnimation(CompositorElementId, |
32 const gfx::Vector2dF& adjustment); | 32 const gfx::Vector2dF& adjustment); |
33 void takeOverImplOnlyScrollOffsetAnimation(cc::ElementId); | 33 void takeOverImplOnlyScrollOffsetAnimation(CompositorElementId); |
34 | 34 |
35 private: | 35 private: |
36 cc::AnimationHost* m_animationHost; | 36 cc::AnimationHost* m_animationHost; |
37 }; | 37 }; |
38 | 38 |
39 } // namespace blink | 39 } // namespace blink |
40 | 40 |
41 #endif // CompositorAnimationTimeline_h | 41 #endif // CompositorAnimationTimeline_h |
OLD | NEW |