OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
jbroman
2016/02/01 15:44:36
nit: This file probably belongs in platform/graphi
loyso (OOO)
2016/02/04 05:49:29
Done.
| |
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 CompositorFactory_h | |
6 #define CompositorFactory_h | |
7 | |
8 #include "platform/PlatformExport.h" | |
9 #include "platform/animation/CompositorAnimation.h" | |
10 #include "platform/animation/CompositorAnimationCurve.h" | |
11 #include "platform/animation/CompositorScrollOffsetAnimationCurve.h" | |
12 #include "platform/geometry/FloatPoint.h" | |
13 #include "wtf/PassOwnPtr.h" | |
14 | |
15 namespace blink { | |
16 | |
17 class CompositorAnimationPlayer; | |
18 class CompositorAnimationTimeline; | |
19 class CompositorFilterAnimationCurve; | |
20 class CompositorFilterOperations; | |
21 class CompositorFloatAnimationCurve; | |
22 class CompositorTransformAnimationCurve; | |
23 class CompositorTransformOperations; | |
24 | |
25 class PLATFORM_EXPORT CompositorFactory { | |
26 public: | |
27 static void initializeDefault(); | |
28 static void initializeForTesting(PassOwnPtr<CompositorFactory>); | |
29 static void shutdown(); | |
30 static CompositorFactory& current(); | |
31 | |
32 // Animation ---------------------------------------------------- | |
33 | |
34 virtual CompositorFilterAnimationCurve* createFilterAnimationCurve() { retur n nullptr; } | |
jbroman
2016/02/01 15:44:36
Please return smart pointers (i.e. PassOwnPtr<T>)
loyso (OOO)
2016/02/04 05:49:29
I doesn't work with gmock overrides.
See the depen
jbroman
2016/02/04 15:17:55
:( I hadn't realized someone had added that annota
| |
35 | |
36 virtual CompositorFloatAnimationCurve* createFloatAnimationCurve() { return nullptr; } | |
37 | |
38 virtual CompositorScrollOffsetAnimationCurve* createScrollOffsetAnimationCur ve( | |
39 FloatPoint targetValue, | |
40 CompositorAnimationCurve::TimingFunctionType, | |
41 CompositorScrollOffsetAnimationCurve::ScrollDurationBehavior) { return n ullptr; } | |
42 | |
43 virtual CompositorTransformAnimationCurve* createTransformAnimationCurve() { return nullptr; } | |
44 | |
45 virtual CompositorTransformOperations* createTransformOperations() { return nullptr; } | |
46 | |
47 virtual CompositorFilterOperations* createFilterOperations() { return nullpt r; } | |
48 | |
49 virtual CompositorAnimation* createAnimation(const CompositorAnimationCurve& , CompositorAnimation::TargetProperty, int groupId = 0, int animationId = 0) { r eturn nullptr; } | |
50 | |
51 virtual CompositorAnimationPlayer* createAnimationPlayer() { return nullptr; } | |
52 | |
53 virtual CompositorAnimationTimeline* createAnimationTimeline() { return null ptr; } | |
54 | |
55 virtual ~CompositorFactory() {} | |
56 }; | |
57 } | |
jbroman
2016/02/01 15:44:36
super-nit: closing namespace comment please:
} //
loyso (OOO)
2016/02/04 05:49:29
Done.
| |
58 | |
59 #endif // CompositorFactory_h | |
OLD | NEW |