summaryrefslogtreecommitdiffstats
path: root/cc/animation
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-26 21:15:06 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-26 21:15:06 +0000
commitbf691c24ca3cf0ebbe8c82e871b4b05bd4256f6d (patch)
treedba84d59df6abc81803ce0191ccb78c42d4ca55b /cc/animation
parent01fc514f488305c0c57038c3d5c7b28eb09df4cd (diff)
downloadchromium_src-bf691c24ca3cf0ebbe8c82e871b4b05bd4256f6d.zip
chromium_src-bf691c24ca3cf0ebbe8c82e871b4b05bd4256f6d.tar.gz
chromium_src-bf691c24ca3cf0ebbe8c82e871b4b05bd4256f6d.tar.bz2
Fix cpplint errors in cc/(animation|input|layers|trees|test)/
This fixes lint errors in everything except for the few stragglers (occlusion unit test, etc) that haven't been chromified. BUG=144577 Review URL: https://chromiumcodereview.appspot.com/12965007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/animation')
-rw-r--r--cc/animation/animation_id_provider.h2
-rw-r--r--cc/animation/keyframed_animation_curve.h3
-rw-r--r--cc/animation/keyframed_animation_curve_unittest.cc4
-rw-r--r--cc/animation/layer_animation_controller.cc8
-rw-r--r--cc/animation/layer_animation_controller.h2
-rw-r--r--cc/animation/layer_animation_event_observer.h7
-rw-r--r--cc/animation/layer_animation_value_observer.h4
-rw-r--r--cc/animation/scrollbar_animation_controller_linear_fade.h4
-rw-r--r--cc/animation/transform_operation.cc4
-rw-r--r--cc/animation/transform_operations.cc3
-rw-r--r--cc/animation/transform_operations_unittest.cc2
11 files changed, 27 insertions, 16 deletions
diff --git a/cc/animation/animation_id_provider.h b/cc/animation/animation_id_provider.h
index da08c92..a8d3a5b 100644
--- a/cc/animation/animation_id_provider.h
+++ b/cc/animation/animation_id_provider.h
@@ -16,6 +16,6 @@ class CC_EXPORT AnimationIdProvider {
static int NextGroupId();
};
-}
+} // namespace cc
#endif // CC_ANIMATION_ANIMATION_ID_PROVIDER_H_
diff --git a/cc/animation/keyframed_animation_curve.h b/cc/animation/keyframed_animation_curve.h
index 09f269c..6d775c9 100644
--- a/cc/animation/keyframed_animation_curve.h
+++ b/cc/animation/keyframed_animation_curve.h
@@ -98,7 +98,8 @@ class CC_EXPORT KeyframedFloatAnimationCurve : public FloatAnimationCurve {
DISALLOW_COPY_AND_ASSIGN(KeyframedFloatAnimationCurve);
};
-class CC_EXPORT KeyframedTransformAnimationCurve : public TransformAnimationCurve {
+class CC_EXPORT KeyframedTransformAnimationCurve
+ : public TransformAnimationCurve {
public:
// It is required that the keyframes be sorted by time.
static scoped_ptr<KeyframedTransformAnimationCurve> Create();
diff --git a/cc/animation/keyframed_animation_curve_unittest.cc b/cc/animation/keyframed_animation_curve_unittest.cc
index 333490a..dac393e 100644
--- a/cc/animation/keyframed_animation_curve_unittest.cc
+++ b/cc/animation/keyframed_animation_curve_unittest.cc
@@ -178,8 +178,8 @@ TEST(KeyframedAnimationCurveTest, RepeatedTransformKeyTimes) {
// There is a discontinuity at 1. Any value between 4 and 6 is valid.
gfx::Transform value = curve->GetValue(1.f);
- EXPECT_TRUE(value.matrix().getDouble(0.f, 3.f) >= 4);
- EXPECT_TRUE(value.matrix().getDouble(0.f, 3.f) <= 6);
+ EXPECT_GE(value.matrix().getDouble(0.f, 3.f), 4);
+ EXPECT_LE(value.matrix().getDouble(0.f, 3.f), 6);
ExpectTranslateX(6.f, curve->GetValue(1.5f));
ExpectTranslateX(6.f, curve->GetValue(2.f));
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index 5f7ad26..6ab3528 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -43,7 +43,7 @@ void LayerAnimationController::PauseAnimation(int animation_id,
}
struct HasAnimationId {
- HasAnimationId(int id) : id_(id) {}
+ explicit HasAnimationId(int id) : id_(id) {}
bool operator()(Animation* animation) const {
return animation->id() == id_;
}
@@ -160,8 +160,7 @@ void LayerAnimationController::AccumulatePropertyUpdates(
monotonic_time);
events->push_back(event);
- }
- else if (animation->target_property() == Animation::Transform) {
+ } else if (animation->target_property() == Animation::Transform) {
AnimationEvent event(AnimationEvent::PropertyUpdate,
id_,
animation->group(),
@@ -305,7 +304,7 @@ void LayerAnimationController::PushNewAnimationsToImplThread(
}
struct IsCompleted {
- IsCompleted(const LayerAnimationController& main_thread_controller)
+ explicit IsCompleted(const LayerAnimationController& main_thread_controller)
: main_thread_controller_(main_thread_controller) {}
bool operator()(Animation* animation) const {
if (animation->is_impl_only())
@@ -564,7 +563,6 @@ void LayerAnimationController::TickAnimations(double monotonic_time) {
trimmed = 0;
switch (active_animations_[i]->target_property()) {
-
case Animation::Transform: {
const TransformAnimationCurve* transform_animation_curve =
active_animations_[i]->curve()->ToTransformAnimationCurve();
diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h
index 1de1131..866377f 100644
--- a/cc/animation/layer_animation_controller.h
+++ b/cc/animation/layer_animation_controller.h
@@ -93,7 +93,7 @@ class CC_EXPORT LayerAnimationController
protected:
friend class base::RefCounted<LayerAnimationController>;
- LayerAnimationController(int id);
+ explicit LayerAnimationController(int id);
virtual ~LayerAnimationController();
private:
diff --git a/cc/animation/layer_animation_event_observer.h b/cc/animation/layer_animation_event_observer.h
index b20c590..9f7f04b 100644
--- a/cc/animation/layer_animation_event_observer.h
+++ b/cc/animation/layer_animation_event_observer.h
@@ -5,14 +5,19 @@
#ifndef CC_ANIMATION_LAYER_ANIMATION_EVENT_OBSERVER_H_
#define CC_ANIMATION_LAYER_ANIMATION_EVENT_OBSERVER_H_
+#include "cc/base/cc_export.h"
+
namespace cc {
class CC_EXPORT LayerAnimationEventObserver {
public:
virtual void OnAnimationStarted(const AnimationEvent& event) = 0;
+
+ protected:
+ virtual ~LayerAnimationEventObserver() {}
};
-} // namespace cc
+} // namespace cc
#endif // CC_ANIMATION_LAYER_ANIMATION_EVENT_OBSERVER_H_
diff --git a/cc/animation/layer_animation_value_observer.h b/cc/animation/layer_animation_value_observer.h
index 5919d8c..ca3cafa 100644
--- a/cc/animation/layer_animation_value_observer.h
+++ b/cc/animation/layer_animation_value_observer.h
@@ -5,6 +5,8 @@
#ifndef CC_ANIMATION_LAYER_ANIMATION_VALUE_OBSERVER_H_
#define CC_ANIMATION_LAYER_ANIMATION_VALUE_OBSERVER_H_
+#include "cc/base/cc_export.h"
+
namespace cc {
class CC_EXPORT LayerAnimationValueObserver {
@@ -16,7 +18,7 @@ class CC_EXPORT LayerAnimationValueObserver {
virtual bool IsActive() const = 0;
};
-} // namespace cc
+} // namespace cc
#endif // CC_ANIMATION_LAYER_ANIMATION_VALUE_OBSERVER_H_
diff --git a/cc/animation/scrollbar_animation_controller_linear_fade.h b/cc/animation/scrollbar_animation_controller_linear_fade.h
index 19a94d8..bc6972c 100644
--- a/cc/animation/scrollbar_animation_controller_linear_fade.h
+++ b/cc/animation/scrollbar_animation_controller_linear_fade.h
@@ -12,8 +12,8 @@
namespace cc {
class LayerImpl;
-class CC_EXPORT ScrollbarAnimationControllerLinearFade :
- public ScrollbarAnimationController {
+class CC_EXPORT ScrollbarAnimationControllerLinearFade
+ : public ScrollbarAnimationController {
public:
static scoped_ptr<ScrollbarAnimationControllerLinearFade> Create(
LayerImpl* scroll_layer,
diff --git a/cc/animation/transform_operation.cc b/cc/animation/transform_operation.cc
index 65769b4..b4e6917 100644
--- a/cc/animation/transform_operation.cc
+++ b/cc/animation/transform_operation.cc
@@ -115,10 +115,10 @@ bool TransformOperation::BlendTransformOperations(
double axis_z = 1;
double from_angle = 0;
double to_angle = IsOperationIdentity(to) ? 0 : to->rotate.angle;
- if (ShareSameAxis(from, to, axis_x, axis_y, axis_z, from_angle))
+ if (ShareSameAxis(from, to, axis_x, axis_y, axis_z, from_angle)) {
result.RotateAbout(gfx::Vector3dF(axis_x, axis_y, axis_z),
BlendDoubles(from_angle, to_angle, progress));
- else {
+ } else {
gfx::Transform to_matrix;
if (!IsOperationIdentity(to))
to_matrix = to->matrix;
diff --git a/cc/animation/transform_operations.cc b/cc/animation/transform_operations.cc
index 4de283e..bc7a0c3 100644
--- a/cc/animation/transform_operations.cc
+++ b/cc/animation/transform_operations.cc
@@ -3,6 +3,9 @@
// found in the LICENSE file.
#include "cc/animation/transform_operations.h"
+
+#include <algorithm>
+
#include "ui/gfx/transform_util.h"
#include "ui/gfx/vector3d_f.h"
diff --git a/cc/animation/transform_operations_unittest.cc b/cc/animation/transform_operations_unittest.cc
index 206a9f6..7e344c7 100644
--- a/cc/animation/transform_operations_unittest.cc
+++ b/cc/animation/transform_operations_unittest.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <limits>
+
#include "base/memory/scoped_vector.h"
#include "cc/animation/transform_operations.h"
#include "cc/test/geometry_test_utils.h"