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

Side by Side Diff: cc/animation/animation_registrar.h

Issue 1584743002: CC Animation: Replace AnimiationEventsVector with AnimiationEvents class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 11 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/animation_host.cc ('k') | cc/animation/animation_registrar.cc » ('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 #ifndef CC_ANIMATION_ANIMATION_REGISTRAR_H_ 5 #ifndef CC_ANIMATION_ANIMATION_REGISTRAR_H_
6 #define CC_ANIMATION_ANIMATION_REGISTRAR_H_ 6 #define CC_ANIMATION_ANIMATION_REGISTRAR_H_
7 7
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "cc/animation/animation_events.h" 12 #include "base/time/time.h"
13 #include "cc/base/cc_export.h" 13 #include "cc/base/cc_export.h"
14 14
15 namespace cc { 15 namespace cc {
16 16
17 class AnimationEvents;
17 class LayerAnimationController; 18 class LayerAnimationController;
18 19
19 class CC_EXPORT AnimationRegistrar { 20 class CC_EXPORT AnimationRegistrar {
20 public: 21 public:
21 typedef base::hash_map<int, LayerAnimationController*> AnimationControllerMap; 22 typedef base::hash_map<int, LayerAnimationController*> AnimationControllerMap;
22 23
23 static scoped_ptr<AnimationRegistrar> Create() { 24 static scoped_ptr<AnimationRegistrar> Create() {
24 return make_scoped_ptr(new AnimationRegistrar()); 25 return make_scoped_ptr(new AnimationRegistrar());
25 } 26 }
26 27
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 61
61 bool supports_scroll_animations() { return supports_scroll_animations_; } 62 bool supports_scroll_animations() { return supports_scroll_animations_; }
62 63
63 bool needs_animate_layers() const { 64 bool needs_animate_layers() const {
64 return !active_animation_controllers_.empty(); 65 return !active_animation_controllers_.empty();
65 } 66 }
66 67
67 bool ActivateAnimations(); 68 bool ActivateAnimations();
68 bool AnimateLayers(base::TimeTicks monotonic_time); 69 bool AnimateLayers(base::TimeTicks monotonic_time);
69 bool UpdateAnimationState(bool start_ready_animations, 70 bool UpdateAnimationState(bool start_ready_animations,
70 AnimationEventsVector* events); 71 AnimationEvents* events);
71 72
72 scoped_ptr<AnimationEventsVector> CreateEvents() { 73 scoped_ptr<AnimationEvents> CreateEvents();
73 return make_scoped_ptr(new AnimationEventsVector()); 74 void SetAnimationEvents(scoped_ptr<AnimationEvents> events);
74 }
75
76 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> events);
77 75
78 private: 76 private:
79 AnimationRegistrar(); 77 AnimationRegistrar();
80 78
81 AnimationControllerMap active_animation_controllers_; 79 AnimationControllerMap active_animation_controllers_;
82 AnimationControllerMap all_animation_controllers_; 80 AnimationControllerMap all_animation_controllers_;
83 81
84 bool supports_scroll_animations_; 82 bool supports_scroll_animations_;
85 83
86 DISALLOW_COPY_AND_ASSIGN(AnimationRegistrar); 84 DISALLOW_COPY_AND_ASSIGN(AnimationRegistrar);
87 }; 85 };
88 86
89 } // namespace cc 87 } // namespace cc
90 88
91 #endif // CC_ANIMATION_ANIMATION_REGISTRAR_H_ 89 #endif // CC_ANIMATION_ANIMATION_REGISTRAR_H_
OLDNEW
« no previous file with comments | « cc/animation/animation_host.cc ('k') | cc/animation/animation_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698