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

Side by Side Diff: Source/core/animation/AnimationValue.h

Issue 1210353004: Rename {Animation,Interpolation}Type and {Animation,Interpolation}Value (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/AnimationType.h ('k') | Source/core/animation/CSSValueAnimationType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef AnimationValue_h
6 #define AnimationValue_h
7
8 #include "core/animation/InterpolableValue.h"
9 #include "core/animation/NonInterpolableValue.h"
10 #include "platform/heap/Handle.h"
11
12 namespace blink {
13
14 class AnimationType;
15
16 class AnimationValue : public NoBaseWillBeGarbageCollectedFinalized<AnimationVal ue> {
17 public:
18 static PassOwnPtrWillBeRawPtr<AnimationValue> create(const AnimationType& ty pe, PassOwnPtrWillBeRawPtr<InterpolableValue> interpolableValue, PassRefPtrWillB eRawPtr<NonInterpolableValue> nonInterpolableValue = nullptr)
19 {
20 return adoptPtrWillBeNoop(new AnimationValue(type, interpolableValue, no nInterpolableValue));
21 }
22
23 PassOwnPtrWillBeRawPtr<AnimationValue> clone() const
24 {
25 return create(m_type, m_interpolableValue->clone(), m_nonInterpolableVal ue);
26 }
27
28 const AnimationType& type() const { return m_type; }
29 const InterpolableValue& interpolableValue() const { return *m_interpolableV alue; }
30 InterpolableValue& interpolableValue() { return *m_interpolableValue; }
31 const NonInterpolableValue* nonInterpolableValue() const { return m_nonInter polableValue.get(); }
32
33 DEFINE_INLINE_TRACE()
34 {
35 visitor->trace(m_interpolableValue);
36 visitor->trace(m_nonInterpolableValue);
37 }
38
39 private:
40 AnimationValue(const AnimationType& type, PassOwnPtrWillBeRawPtr<Interpolabl eValue> interpolableValue, PassRefPtrWillBeRawPtr<NonInterpolableValue> nonInter polableValue = nullptr)
41 : m_type(type)
42 , m_interpolableValue(interpolableValue)
43 , m_nonInterpolableValue(nonInterpolableValue)
44 {
45 ASSERT(this->m_interpolableValue);
46 }
47
48 const AnimationType& m_type;
49 OwnPtrWillBeMember<InterpolableValue> m_interpolableValue;
50 RefPtrWillBeMember<NonInterpolableValue> m_nonInterpolableValue;
51
52 friend class AnimationType;
53 };
54
55 } // namespace blink
56
57 #endif // AnimationValue_h
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationType.h ('k') | Source/core/animation/CSSValueAnimationType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698