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

Side by Side Diff: cc/animation/layer_animation_controller_unittest.cc

Issue 645853008: Standardize usage of virtual/override/final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 years, 2 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
« no previous file with comments | « cc/animation/keyframed_animation_curve.h ('k') | cc/animation/scroll_offset_animation_curve.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/animation/layer_animation_controller.h" 5 #include "cc/animation/layer_animation_controller.h"
6 6
7 #include "cc/animation/animation.h" 7 #include "cc/animation/animation.h"
8 #include "cc/animation/animation_curve.h" 8 #include "cc/animation/animation_curve.h"
9 #include "cc/animation/animation_delegate.h" 9 #include "cc/animation/animation_delegate.h"
10 #include "cc/animation/animation_registrar.h" 10 #include "cc/animation/animation_registrar.h"
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 event = GetMostRecentPropertyUpdateEvent(events.get()); 852 event = GetMostRecentPropertyUpdateEvent(events.get());
853 EXPECT_FALSE(event); 853 EXPECT_FALSE(event);
854 } 854 }
855 855
856 class FakeAnimationDelegate : public AnimationDelegate { 856 class FakeAnimationDelegate : public AnimationDelegate {
857 public: 857 public:
858 FakeAnimationDelegate() 858 FakeAnimationDelegate()
859 : started_(false), 859 : started_(false),
860 finished_(false) {} 860 finished_(false) {}
861 861
862 virtual void NotifyAnimationStarted(TimeTicks monotonic_time, 862 void NotifyAnimationStarted(TimeTicks monotonic_time,
863 Animation::TargetProperty target_property, 863 Animation::TargetProperty target_property,
864 int group) override { 864 int group) override {
865 started_ = true; 865 started_ = true;
866 } 866 }
867 867
868 virtual void NotifyAnimationFinished( 868 void NotifyAnimationFinished(TimeTicks monotonic_time,
869 TimeTicks monotonic_time, 869 Animation::TargetProperty target_property,
870 Animation::TargetProperty target_property, 870 int group) override {
871 int group) override {
872 finished_ = true; 871 finished_ = true;
873 } 872 }
874 873
875 bool started() { return started_; } 874 bool started() { return started_; }
876 875
877 bool finished() { return finished_; } 876 bool finished() { return finished_; }
878 877
879 private: 878 private:
880 bool started_; 879 bool started_;
881 bool finished_; 880 bool finished_;
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 EXPECT_FALSE(controller->IsAnimatingProperty(Animation::Opacity)); 2339 EXPECT_FALSE(controller->IsAnimatingProperty(Animation::Opacity));
2341 EXPECT_FALSE(controller->IsAnimatingProperty(Animation::Filter)); 2340 EXPECT_FALSE(controller->IsAnimatingProperty(Animation::Filter));
2342 2341
2343 controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(2000)); 2342 controller->Animate(kInitialTickTime + TimeDelta::FromMilliseconds(2000));
2344 controller->UpdateState(true, nullptr); 2343 controller->UpdateState(true, nullptr);
2345 EXPECT_TRUE(controller->IsAnimatingProperty(Animation::Opacity)); 2344 EXPECT_TRUE(controller->IsAnimatingProperty(Animation::Opacity));
2346 } 2345 }
2347 2346
2348 } // namespace 2347 } // namespace
2349 } // namespace cc 2348 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/keyframed_animation_curve.h ('k') | cc/animation/scroll_offset_animation_curve.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698