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

Side by Side Diff: ui/compositor/layer_animator_collection.h

Issue 667923002: Standardize usage of virtual/override/final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_COLLECTION_H_ 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATOR_COLLECTION_H_
6 #define UI_COMPOSITOR_LAYER_ANIMATOR_COLLECTION_H_ 6 #define UI_COMPOSITOR_LAYER_ANIMATOR_COLLECTION_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "ui/compositor/compositor_animation_observer.h" 13 #include "ui/compositor/compositor_animation_observer.h"
14 #include "ui/compositor/compositor_export.h" 14 #include "ui/compositor/compositor_export.h"
15 15
16 namespace ui { 16 namespace ui {
17 17
18 class Compositor; 18 class Compositor;
19 class LayerAnimator; 19 class LayerAnimator;
20 20
21 // A collection of LayerAnimators that should be updated at each animation step 21 // A collection of LayerAnimators that should be updated at each animation step
22 // in the compositor. 22 // in the compositor.
23 class COMPOSITOR_EXPORT LayerAnimatorCollection 23 class COMPOSITOR_EXPORT LayerAnimatorCollection
24 : public CompositorAnimationObserver { 24 : public CompositorAnimationObserver {
25 public: 25 public:
26 explicit LayerAnimatorCollection(Compositor* compositor); 26 explicit LayerAnimatorCollection(Compositor* compositor);
27 virtual ~LayerAnimatorCollection(); 27 ~LayerAnimatorCollection() override;
28 28
29 void StartAnimator(scoped_refptr<LayerAnimator> animator); 29 void StartAnimator(scoped_refptr<LayerAnimator> animator);
30 void StopAnimator(scoped_refptr<LayerAnimator> animator); 30 void StopAnimator(scoped_refptr<LayerAnimator> animator);
31 31
32 bool HasActiveAnimators() const; 32 bool HasActiveAnimators() const;
33 33
34 base::TimeTicks last_tick_time() const { return last_tick_time_; } 34 base::TimeTicks last_tick_time() const { return last_tick_time_; }
35 35
36 // CompositorAnimationObserver: 36 // CompositorAnimationObserver:
37 virtual void OnAnimationStep(base::TimeTicks timestamp) override; 37 void OnAnimationStep(base::TimeTicks timestamp) override;
38 38
39 private: 39 private:
40 Compositor* compositor_; 40 Compositor* compositor_;
41 base::TimeTicks last_tick_time_; 41 base::TimeTicks last_tick_time_;
42 std::set<scoped_refptr<LayerAnimator> > animators_; 42 std::set<scoped_refptr<LayerAnimator> > animators_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(LayerAnimatorCollection); 44 DISALLOW_COPY_AND_ASSIGN(LayerAnimatorCollection);
45 }; 45 };
46 46
47 } // namespace ui 47 } // namespace ui
48 48
49 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_COLLECTION_H_ 49 #endif // UI_COMPOSITOR_LAYER_ANIMATOR_COLLECTION_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer_animation_observer.h ('k') | ui/compositor/scoped_layer_animation_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698