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

Unified Diff: third_party/WebKit/Source/platform/animation/WebCompositorAnimation.h

Issue 1616653002: CC Animation: Move files from cc_blink to Source/platform/animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ScrollAnimatorCompositorCoordinator for MSVC. Created 4 years, 11 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
Index: third_party/WebKit/Source/platform/animation/WebCompositorAnimation.h
diff --git a/third_party/WebKit/Source/platform/animation/WebCompositorAnimation.h b/third_party/WebKit/Source/platform/animation/WebCompositorAnimation.h
new file mode 100644
index 0000000000000000000000000000000000000000..22785ca0f3b669d8c550f6ce36889d0e407e561b
--- /dev/null
+++ b/third_party/WebKit/Source/platform/animation/WebCompositorAnimation.h
@@ -0,0 +1,91 @@
+// Copyright 2014 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.
+
+#ifndef WebCompositorAnimation_h
+#define WebCompositorAnimation_h
+
+#include "base/memory/scoped_ptr.h"
+#include "platform/PlatformExport.h"
+
+namespace cc {
+class Animation;
+}
+
+namespace blink {
+
+class WebCompositorAnimationCurve;
+
+// A compositor driven animation.
+class PLATFORM_EXPORT WebCompositorAnimation {
+public:
+ enum TargetProperty {
+ TargetPropertyTransform,
+ TargetPropertyOpacity,
+ TargetPropertyFilter,
+ TargetPropertyScrollOffset
+ };
+
+ enum Direction {
+ DirectionNormal,
+ DirectionReverse,
+ DirectionAlternate,
+ DirectionAlternateReverse
+ };
+
+ enum FillMode {
+ FillModeNone,
+ FillModeForwards,
+ FillModeBackwards,
+ FillModeBoth
+ };
+
+ WebCompositorAnimation(const WebCompositorAnimationCurve&, TargetProperty, int animationId, int groupId);
+ virtual ~WebCompositorAnimation();
+
+ // An id must be unique.
+ virtual int id();
esprehn 2016/01/28 03:40:40 why are these virtual now? I don't think you want
loyso (OOO) 2016/01/28 07:10:08 We have random gmock classes (not for all the publ
+ virtual int group();
+
+ virtual TargetProperty targetProperty() const;
+
+ // This is the number of times that the animation will play. If this
+ // value is zero the animation will not play. If it is negative, then
+ // the animation will loop indefinitely.
+ virtual double iterations() const;
+ virtual void setIterations(double);
+
+ virtual double startTime() const;
+ virtual void setStartTime(double monotonicTime);
+
+ virtual double timeOffset() const;
+ virtual void setTimeOffset(double monotonicTime);
+
+ virtual Direction direction() const;
+ virtual void setDirection(Direction);
+
+ virtual double playbackRate() const;
+ virtual void setPlaybackRate(double);
+
+ virtual FillMode fillMode() const;
+ virtual void setFillMode(FillMode);
+
+ virtual double iterationStart() const;
+ virtual void setIterationStart(double);
+
+ scoped_ptr<cc::Animation> passAnimation();
+
+ // Removes ownership over cc animation. Identical to PassAnimation.
+ // TODO(loyso): Erase this method. crbug.com/575041
+ cc::Animation* releaseCCAnimation();
+
+protected:
+ WebCompositorAnimation();
+
+private:
+ scoped_ptr<cc::Animation> m_animation;
+};
+
+} // namespace blink
+
+#endif // WebCompositorAnimation_h

Powered by Google App Engine
This is Rietveld 408576698