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

Side by Side Diff: webkit/compositor_bindings/web_animation_impl.cc

Issue 11231017: Remove ::create factory functions from objects created via WebCompositorSupport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "web_animation_impl.h" 5 #include "web_animation_impl.h"
6 6
7 #include "cc/active_animation.h" 7 #include "cc/active_animation.h"
8 #include "cc/animation_curve.h" 8 #include "cc/animation_curve.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationCurve.h " 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationCurve.h "
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimation.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebAnimation.h"
11 #include "web_float_animation_curve_impl.h" 11 #include "web_float_animation_curve_impl.h"
12 #include "web_transform_animation_curve_impl.h" 12 #include "web_transform_animation_curve_impl.h"
13 13
14 using cc::ActiveAnimation; 14 using cc::ActiveAnimation;
15 15
16 namespace WebKit { 16 namespace WebKit {
17 17
18 WebAnimation* WebAnimation::create(const WebAnimationCurve& curve, TargetPropert y targetProperty, int animationId)
19 {
20 return new WebAnimationImpl(curve, targetProperty, animationId, 0);
21 }
22
23 WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& webCurve, TargetProp erty targetProperty, int animationId, int groupId) 18 WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& webCurve, TargetProp erty targetProperty, int animationId, int groupId)
24 { 19 {
25 static int nextAnimationId = 1; 20 static int nextAnimationId = 1;
26 static int nextGroupId = 1; 21 static int nextGroupId = 1;
27 if (!animationId) 22 if (!animationId)
28 animationId = nextAnimationId++; 23 animationId = nextAnimationId++;
29 if (!groupId) 24 if (!groupId)
30 groupId = nextGroupId++; 25 groupId = nextGroupId++;
31 26
32 WebAnimationCurve::AnimationCurveType curveType = webCurve.type(); 27 WebAnimationCurve::AnimationCurveType curveType = webCurve.type();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 96 }
102 97
103 scoped_ptr<cc::ActiveAnimation> WebAnimationImpl::cloneToAnimation() 98 scoped_ptr<cc::ActiveAnimation> WebAnimationImpl::cloneToAnimation()
104 { 99 {
105 scoped_ptr<cc::ActiveAnimation> toReturn(m_animation->clone(cc::ActiveAnimat ion::NonControllingInstance)); 100 scoped_ptr<cc::ActiveAnimation> toReturn(m_animation->clone(cc::ActiveAnimat ion::NonControllingInstance));
106 toReturn->setNeedsSynchronizedStartTime(true); 101 toReturn->setNeedsSynchronizedStartTime(true);
107 return toReturn.Pass(); 102 return toReturn.Pass();
108 } 103 }
109 104
110 } // namespace WebKit 105 } // namespace WebKit
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | webkit/compositor_bindings/web_content_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698