summaryrefslogtreecommitdiffstats
path: root/cc/animation
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-10 23:05:01 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-10 23:05:01 +0000
commite51444acccf0aeeeed78d0a9795016e26013e1a1 (patch)
tree358fba3fd6a996a2de9814bd5fd78ab204b5cd7a /cc/animation
parenta269ade545f74e075b8fff7ca5b7f2edf32369d0 (diff)
downloadchromium_src-e51444acccf0aeeeed78d0a9795016e26013e1a1.zip
chromium_src-e51444acccf0aeeeed78d0a9795016e26013e1a1.tar.gz
chromium_src-e51444acccf0aeeeed78d0a9795016e26013e1a1.tar.bz2
cc: Add PRESUBMIT rule to ban using cc:: inside of namespace cc {...}
This also makes cc/ PRESUBMIT clean for the new check. The most invasive changes were: 1. Moving the cc/test/paths.h enum into a CCPaths class (named with CC prefix to clarify this path is for CC since the enum is extending an enum from base/. 2. Merge ResourcePool::Resource up into ScopedResource which was the same thing basically. R=enne BUG= Review URL: https://codereview.chromium.org/109263003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239904 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/animation')
-rw-r--r--cc/animation/layer_animation_controller.cc12
-rw-r--r--cc/animation/layer_animation_controller_unittest.cc32
2 files changed, 22 insertions, 22 deletions
diff --git a/cc/animation/layer_animation_controller.cc b/cc/animation/layer_animation_controller.cc
index 43d680b..e1ab646 100644
--- a/cc/animation/layer_animation_controller.cc
+++ b/cc/animation/layer_animation_controller.cc
@@ -85,12 +85,12 @@ void LayerAnimationController::RemoveAnimation(
int animation_id,
Animation::TargetProperty target_property) {
ScopedPtrVector<Animation>& animations = active_animations_;
- animations.erase(cc::remove_if(&animations,
- animations.begin(),
- animations.end(),
- HasAnimationIdAndProperty(animation_id,
- target_property)),
- animations.end());
+ animations.erase(
+ cc::remove_if(&animations,
+ animations.begin(),
+ animations.end(),
+ HasAnimationIdAndProperty(animation_id, target_property)),
+ animations.end());
UpdateActivation(NormalActivation);
}
diff --git a/cc/animation/layer_animation_controller_unittest.cc b/cc/animation/layer_animation_controller_unittest.cc
index 47c714f..f7918cd 100644
--- a/cc/animation/layer_animation_controller_unittest.cc
+++ b/cc/animation/layer_animation_controller_unittest.cc
@@ -425,11 +425,11 @@ TEST(LayerAnimationControllerTest, TrivialTransformOnImpl) {
// Create simple Transform animation.
TransformOperations operations;
- curve->AddKeyframe(TransformKeyframe::Create(
- 0, operations, scoped_ptr<cc::TimingFunction>()));
+ curve->AddKeyframe(
+ TransformKeyframe::Create(0, operations, scoped_ptr<TimingFunction>()));
operations.AppendTranslate(delta_x, delta_y, 0);
- curve->AddKeyframe(TransformKeyframe::Create(
- 1, operations, scoped_ptr<cc::TimingFunction>()));
+ curve->AddKeyframe(
+ TransformKeyframe::Create(1, operations, scoped_ptr<TimingFunction>()));
scoped_ptr<Animation> animation(Animation::Create(
curve.PassAs<AnimationCurve>(), 1, 0, Animation::Transform));
@@ -475,12 +475,12 @@ TEST(LayerAnimationControllerTest, FilterTransition) {
FilterOperations start_filters;
start_filters.Append(FilterOperation::CreateBrightnessFilter(1.f));
- curve->AddKeyframe(FilterKeyframe::Create(
- 0, start_filters, scoped_ptr<cc::TimingFunction>()));
+ curve->AddKeyframe(
+ FilterKeyframe::Create(0, start_filters, scoped_ptr<TimingFunction>()));
FilterOperations end_filters;
end_filters.Append(FilterOperation::CreateBrightnessFilter(2.f));
- curve->AddKeyframe(FilterKeyframe::Create(
- 1, end_filters, scoped_ptr<cc::TimingFunction>()));
+ curve->AddKeyframe(
+ FilterKeyframe::Create(1, end_filters, scoped_ptr<TimingFunction>()));
scoped_ptr<Animation> animation(Animation::Create(
curve.PassAs<AnimationCurve>(), 1, 0, Animation::Filter));
@@ -524,12 +524,12 @@ TEST(LayerAnimationControllerTest, FilterTransitionOnImplOnly) {
// Create simple Filter animation.
FilterOperations start_filters;
start_filters.Append(FilterOperation::CreateBrightnessFilter(1.f));
- curve->AddKeyframe(FilterKeyframe::Create(
- 0, start_filters, scoped_ptr<cc::TimingFunction>()));
+ curve->AddKeyframe(
+ FilterKeyframe::Create(0, start_filters, scoped_ptr<TimingFunction>()));
FilterOperations end_filters;
end_filters.Append(FilterOperation::CreateBrightnessFilter(2.f));
- curve->AddKeyframe(FilterKeyframe::Create(
- 1, end_filters, scoped_ptr<cc::TimingFunction>()));
+ curve->AddKeyframe(
+ FilterKeyframe::Create(1, end_filters, scoped_ptr<TimingFunction>()));
scoped_ptr<Animation> animation(Animation::Create(
curve.PassAs<AnimationCurve>(), 1, 0, Animation::Filter));
@@ -1415,16 +1415,16 @@ TEST(LayerAnimationControllerTest, AnimatedBounds) {
EXPECT_EQ(gfx::BoxF(1.f, 2.f, -4.f, 13.f, 19.f, 20.f).ToString(),
bounds.ToString());
- controller_impl->GetAnimation(1, Animation::Transform)->SetRunState(
- cc::Animation::Finished, 0.0);
+ controller_impl->GetAnimation(1, Animation::Transform)
+ ->SetRunState(Animation::Finished, 0.0);
// Only the unfinished animation should affect the animated bounds.
EXPECT_TRUE(controller_impl->AnimatedBoundsForBox(box, &bounds));
EXPECT_EQ(gfx::BoxF(1.f, 2.f, -4.f, 7.f, 16.f, 20.f).ToString(),
bounds.ToString());
- controller_impl->GetAnimation(2, Animation::Transform)->SetRunState(
- cc::Animation::Finished, 0.0);
+ controller_impl->GetAnimation(2, Animation::Transform)
+ ->SetRunState(Animation::Finished, 0.0);
// There are no longer any running animations.
EXPECT_TRUE(controller_impl->AnimatedBoundsForBox(box, &bounds));