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

Unified Diff: content/renderer/compositor_bindings/web_animation_impl.cc

Issue 317163002: Moving compositor_bindings from webkit to content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing dependencies due to failing ios bots Created 6 years, 6 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: content/renderer/compositor_bindings/web_animation_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_animation_impl.cc b/content/renderer/compositor_bindings/web_animation_impl.cc
similarity index 77%
rename from webkit/renderer/compositor_bindings/web_animation_impl.cc
rename to content/renderer/compositor_bindings/web_animation_impl.cc
index ca329ecd629f03b069037e80d374d31d218327fa..67d9bb70ea0fd9e1becb10714912a22c4ca38c60 100644
--- a/webkit/renderer/compositor_bindings/web_animation_impl.cc
+++ b/content/renderer/compositor_bindings/web_animation_impl.cc
@@ -2,17 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/renderer/compositor_bindings/web_animation_impl.h"
+#include "content/renderer/compositor_bindings/web_animation_impl.h"
#include "cc/animation/animation.h"
#include "cc/animation/animation_curve.h"
#include "cc/animation/animation_id_provider.h"
+#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h"
+#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h"
#include "third_party/WebKit/public/platform/WebAnimation.h"
#include "third_party/WebKit/public/platform/WebAnimationCurve.h"
-#include "webkit/renderer/compositor_bindings/web_filter_animation_curve_impl.h"
-#include "webkit/renderer/compositor_bindings/web_float_animation_curve_impl.h"
-#include "webkit/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h"
-#include "webkit/renderer/compositor_bindings/web_transform_animation_curve_impl.h"
using cc::Animation;
using cc::AnimationIdProvider;
@@ -20,7 +20,7 @@ using cc::AnimationIdProvider;
using blink::WebAnimation;
using blink::WebAnimationCurve;
-namespace webkit {
+namespace content {
WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& web_curve,
TargetProperty target_property,
@@ -68,18 +68,25 @@ WebAnimationImpl::WebAnimationImpl(const WebAnimationCurve& web_curve,
static_cast<cc::Animation::TargetProperty>(target_property));
}
-WebAnimationImpl::~WebAnimationImpl() {}
+WebAnimationImpl::~WebAnimationImpl() {
+}
-int WebAnimationImpl::id() { return animation_->id(); }
+int WebAnimationImpl::id() {
+ return animation_->id();
+}
blink::WebAnimation::TargetProperty WebAnimationImpl::targetProperty() const {
return static_cast<WebAnimationImpl::TargetProperty>(
animation_->target_property());
}
-int WebAnimationImpl::iterations() const { return animation_->iterations(); }
+int WebAnimationImpl::iterations() const {
+ return animation_->iterations();
+}
-void WebAnimationImpl::setIterations(int n) { animation_->set_iterations(n); }
+void WebAnimationImpl::setIterations(int n) {
+ animation_->set_iterations(n);
+}
double WebAnimationImpl::startTime() const {
return (animation_->start_time() - base::TimeTicks()).InSecondsF();
@@ -149,19 +156,5 @@ scoped_ptr<cc::Animation> WebAnimationImpl::PassAnimation() {
return animation_.Pass();
}
-#define COMPILE_ASSERT_MATCHING_ENUMS(webkit_name, cc_name) \
- COMPILE_ASSERT(static_cast<int>(webkit_name) == static_cast<int>(cc_name), \
- mismatching_enums)
-
-COMPILE_ASSERT_MATCHING_ENUMS(
- WebAnimation::TargetPropertyTransform, Animation::Transform);
-COMPILE_ASSERT_MATCHING_ENUMS(
- WebAnimation::TargetPropertyOpacity, Animation::Opacity);
-COMPILE_ASSERT_MATCHING_ENUMS(
- WebAnimation::TargetPropertyFilter, Animation::Filter);
-#if WEB_SCROLL_OFFSET_ANIMATION_CURVE_IS_DEFINED
-COMPILE_ASSERT_MATCHING_ENUMS(
- WebAnimation::TargetPropertyScrollOffset, Animation::ScrollOffset);
-#endif
+} // namespace content
-} // namespace webkit

Powered by Google App Engine
This is Rietveld 408576698