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

Unified Diff: webkit/compositor_bindings/WebAnimationImpl.cpp

Issue 11192050: Rename compositor bindings filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/compositor_bindings/WebAnimationImpl.h ('k') | webkit/compositor_bindings/WebAnimationTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor_bindings/WebAnimationImpl.cpp
diff --git a/webkit/compositor_bindings/WebAnimationImpl.cpp b/webkit/compositor_bindings/WebAnimationImpl.cpp
deleted file mode 100644
index 2a0db9e38f57f8f676523faf37f7d60537dcf31a..0000000000000000000000000000000000000000
--- a/webkit/compositor_bindings/WebAnimationImpl.cpp
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-
-#include "WebAnimationImpl.h"
-
-#include "WebFloatAnimationCurveImpl.h"
-#include "WebTransformAnimationCurveImpl.h"
-#include "cc/active_animation.h"
-#include "cc/animation_curve.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebAnimation.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebAnimationCurve.h"
-
-using cc::CCActiveAnimation;
-
-namespace WebKit {
-
-WebAnimation* WebAnimation::create(const WebAnimationCurve& curve, TargetProperty targetProperty, int animationId)
-{
- return new WebAnimationImpl(curve, targetProperty, animationId, 0);
-}
-
-WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& webCurve, TargetProperty targetProperty, int animationId, int groupId)
-{
- static int nextAnimationId = 1;
- static int nextGroupId = 1;
- if (!animationId)
- animationId = nextAnimationId++;
- if (!groupId)
- groupId = nextGroupId++;
-
- WebAnimationCurve::AnimationCurveType curveType = webCurve.type();
- scoped_ptr<cc::CCAnimationCurve> curve;
- switch (curveType) {
- case WebAnimationCurve::AnimationCurveTypeFloat: {
- const WebFloatAnimationCurveImpl* floatCurveImpl = static_cast<const WebFloatAnimationCurveImpl*>(&webCurve);
- curve = floatCurveImpl->cloneToCCAnimationCurve();
- break;
- }
- case WebAnimationCurve::AnimationCurveTypeTransform: {
- const WebTransformAnimationCurveImpl* transformCurveImpl = static_cast<const WebTransformAnimationCurveImpl*>(&webCurve);
- curve = transformCurveImpl->cloneToCCAnimationCurve();
- break;
- }
- }
- m_animation = CCActiveAnimation::create(curve.Pass(), animationId, groupId, static_cast<cc::CCActiveAnimation::TargetProperty>(targetProperty));
-}
-
-WebAnimationImpl::~WebAnimationImpl()
-{
-}
-
-int WebAnimationImpl::id()
-{
- return m_animation->id();
-}
-
-WebAnimation::TargetProperty WebAnimationImpl::targetProperty() const
-{
- return static_cast<WebAnimationImpl::TargetProperty>(m_animation->targetProperty());
-}
-
-int WebAnimationImpl::iterations() const
-{
- return m_animation->iterations();
-}
-
-void WebAnimationImpl::setIterations(int n)
-{
- m_animation->setIterations(n);
-}
-
-double WebAnimationImpl::startTime() const
-{
- return m_animation->startTime();
-}
-
-void WebAnimationImpl::setStartTime(double monotonicTime)
-{
- m_animation->setStartTime(monotonicTime);
-}
-
-double WebAnimationImpl::timeOffset() const
-{
- return m_animation->timeOffset();
-}
-
-void WebAnimationImpl::setTimeOffset(double monotonicTime)
-{
- m_animation->setTimeOffset(monotonicTime);
-}
-
-bool WebAnimationImpl::alternatesDirection() const
-{
- return m_animation->alternatesDirection();
-}
-
-void WebAnimationImpl::setAlternatesDirection(bool alternates)
-{
- m_animation->setAlternatesDirection(alternates);
-}
-
-scoped_ptr<cc::CCActiveAnimation> WebAnimationImpl::cloneToCCAnimation()
-{
- scoped_ptr<cc::CCActiveAnimation> toReturn(m_animation->clone(cc::CCActiveAnimation::NonControllingInstance));
- toReturn->setNeedsSynchronizedStartTime(true);
- return toReturn.Pass();
-}
-
-} // namespace WebKit
« no previous file with comments | « webkit/compositor_bindings/WebAnimationImpl.h ('k') | webkit/compositor_bindings/WebAnimationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698