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" | 8 #include "base/memory/ref_counted.h" |
9 #include "cc/animation/animation_host.h" | 9 #include "cc/animation/animation_host.h" |
10 #include "platform/PlatformExport.h" | 10 #include "platform/PlatformExport.h" |
11 #include "ui/gfx/geometry/vector2d.h" | 11 #include "ui/gfx/geometry/vector2d.h" |
12 #include "wtf/Noncopyable.h" | 12 #include "wtf/Noncopyable.h" |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 namespace cc { | |
17 struct ScrollOffsetAnimationUpdate; | |
18 } | |
19 | |
20 namespace blink { | 16 namespace blink { |
21 | 17 |
22 // A compositor representation for cc::AnimationHost. | 18 // A compositor representation for cc::AnimationHost. |
23 // This class wraps cc::AnimationHost and is currently only created from | 19 // This class wraps cc::AnimationHost and is currently only created from |
24 // CompositorAnimationTimeline::compositorAnimationHost. | 20 // CompositorAnimationTimeline::compositorAnimationHost. |
25 // TODO(ymalik): Correctly introduce CompositorAnimationHost to blink. See | 21 // TODO(ymalik): Correctly introduce CompositorAnimationHost to blink. See |
26 // crbug.com/610763. | 22 // crbug.com/610763. |
27 class PLATFORM_EXPORT CompositorAnimationHost { | 23 class PLATFORM_EXPORT CompositorAnimationHost { |
28 public: | 24 public: |
29 explicit CompositorAnimationHost(cc::AnimationHost*); | 25 explicit CompositorAnimationHost(cc::AnimationHost*); |
30 | 26 |
31 // TODO(ymalik): Remove when CompositorAnimationHost* optional nullable ptr | 27 // TODO(ymalik): Remove when CompositorAnimationHost* optional nullable ptr |
32 // is returned. See crbug.com/610763. | 28 // is returned. See crbug.com/610763. |
33 bool isNull() const; | 29 bool isNull() const; |
34 | 30 |
35 void adjustImplOnlyScrollOffsetAnimation(cc::ElementId, | 31 void adjustImplOnlyScrollOffsetAnimation(cc::ElementId, |
36 const gfx::Vector2dF& adjustment); | 32 const gfx::Vector2dF& adjustment); |
37 void takeOverImplOnlyScrollOffsetAnimation(cc::ElementId); | 33 void takeOverImplOnlyScrollOffsetAnimation(cc::ElementId); |
38 | 34 |
39 private: | 35 private: |
40 cc::AnimationHost* m_animationHost; | 36 cc::AnimationHost* m_animationHost; |
41 }; | 37 }; |
42 | 38 |
43 } // namespace blink | 39 } // namespace blink |
44 | 40 |
45 #endif // CompositorAnimationTimeline_h | 41 #endif // CompositorAnimationTimeline_h |
OLD | NEW |