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

Side by Side Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableTransform.h

Issue 2893313004: Remove unused AnimatableValue types (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 22 matching lines...) Expand all
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/animation/animatable/AnimatableValue.h" 35 #include "core/animation/animatable/AnimatableValue.h"
36 #include "platform/transforms/TransformOperations.h" 36 #include "platform/transforms/TransformOperations.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class CORE_EXPORT AnimatableTransform final : public AnimatableValue { 40 class CORE_EXPORT AnimatableTransform final : public AnimatableValue {
41 public: 41 public:
42 ~AnimatableTransform() override {} 42 ~AnimatableTransform() override {}
43 static PassRefPtr<AnimatableTransform> Create(const TransformOperations&, 43 static PassRefPtr<AnimatableTransform> Create(
44 double zoom); 44 const TransformOperations& transform,
45 double zoom) {
46 return AdoptRef(new AnimatableTransform(transform, zoom));
47 }
45 const TransformOperations& GetTransformOperations() const { 48 const TransformOperations& GetTransformOperations() const {
46 return transform_; 49 return transform_;
47 } 50 }
48 double Zoom() const { return zoom_; } 51 double Zoom() const { return zoom_; }
49 52
50 protected: 53 protected:
51 PassRefPtr<AnimatableValue> InterpolateTo(const AnimatableValue*, 54 PassRefPtr<AnimatableValue> InterpolateTo(const AnimatableValue*,
52 double fraction) const override; 55 double fraction) const override;
53 56
54 private: 57 private:
55 explicit AnimatableTransform(const TransformOperations& transform, 58 explicit AnimatableTransform(const TransformOperations& transform,
56 double zoom) 59 double zoom)
57 : transform_(transform), zoom_(zoom) {} 60 : transform_(transform), zoom_(zoom) {}
58 AnimatableType GetType() const override { return kTypeTransform; } 61 AnimatableType GetType() const override { return kTypeTransform; }
59 bool EqualTo(const AnimatableValue*) const override;
60 62
61 const TransformOperations transform_; 63 const TransformOperations transform_;
62 const double zoom_; 64 const double zoom_;
63 }; 65 };
64 66
65 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableTransform, IsTransform()); 67 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableTransform, IsTransform());
66 68
67 } // namespace blink 69 } // namespace blink
68 70
69 #endif // AnimatableTransform_h 71 #endif // AnimatableTransform_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698