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

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

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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 | « ui/compositor/layer_animation_element.cc ('k') | ui/compositor/layer_animator_collection.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
6 #define UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ 6 #define UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 25 matching lines...) Expand all
36 LayerAnimationSequence* sequence) = 0; 36 LayerAnimationSequence* sequence) = 0;
37 37
38 protected: 38 protected:
39 typedef std::set<LayerAnimationSequence*> AttachedSequences; 39 typedef std::set<LayerAnimationSequence*> AttachedSequences;
40 40
41 LayerAnimationObserver(); 41 LayerAnimationObserver();
42 virtual ~LayerAnimationObserver(); 42 virtual ~LayerAnimationObserver();
43 43
44 // If the animator is destroyed during an animation, the animations are 44 // If the animator is destroyed during an animation, the animations are
45 // aborted. The resulting NotifyAborted notifications will NOT be sent to 45 // aborted. The resulting NotifyAborted notifications will NOT be sent to
46 // this observer if this function returns false. NOTE: IF YOU OVERRIDE THIS 46 // this observer if this function returns false. NOTE: IF YOU override THIS
47 // FUNCTION TO RETURN TRUE, YOU MUST REMEMBER TO REMOVE YOURSELF AS AN 47 // FUNCTION TO RETURN TRUE, YOU MUST REMEMBER TO REMOVE YOURSELF AS AN
48 // OBSERVER WHEN YOU ARE DESTROYED. 48 // OBSERVER WHEN YOU ARE DESTROYED.
49 virtual bool RequiresNotificationWhenAnimatorDestroyed() const; 49 virtual bool RequiresNotificationWhenAnimatorDestroyed() const;
50 50
51 // Called when |this| is added to |sequence|'s observer list. 51 // Called when |this| is added to |sequence|'s observer list.
52 virtual void OnAttachedToSequence(LayerAnimationSequence* sequence); 52 virtual void OnAttachedToSequence(LayerAnimationSequence* sequence);
53 53
54 // Called when |this| is removed to |sequence|'s observer list. 54 // Called when |this| is removed to |sequence|'s observer list.
55 virtual void OnDetachedFromSequence(LayerAnimationSequence* sequence); 55 virtual void OnDetachedFromSequence(LayerAnimationSequence* sequence);
56 56
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 enum AnimationStatus { 110 enum AnimationStatus {
111 ANIMATION_STATUS_UNKNOWN, 111 ANIMATION_STATUS_UNKNOWN,
112 ANIMATION_STATUS_COMPLETED, 112 ANIMATION_STATUS_COMPLETED,
113 ANIMATION_STATUS_ABORTED, 113 ANIMATION_STATUS_ABORTED,
114 }; 114 };
115 115
116 friend class ScopedLayerAnimationSettings; 116 friend class ScopedLayerAnimationSettings;
117 117
118 // LayerAnimationObserver implementation 118 // LayerAnimationObserver implementation
119 virtual void OnLayerAnimationEnded( 119 virtual void OnLayerAnimationEnded(
120 LayerAnimationSequence* sequence) OVERRIDE; 120 LayerAnimationSequence* sequence) override;
121 virtual void OnLayerAnimationAborted( 121 virtual void OnLayerAnimationAborted(
122 LayerAnimationSequence* sequence) OVERRIDE; 122 LayerAnimationSequence* sequence) override;
123 virtual void OnLayerAnimationScheduled( 123 virtual void OnLayerAnimationScheduled(
124 LayerAnimationSequence* sequence) OVERRIDE; 124 LayerAnimationSequence* sequence) override;
125 virtual void OnAttachedToSequence( 125 virtual void OnAttachedToSequence(
126 LayerAnimationSequence* sequence) OVERRIDE; 126 LayerAnimationSequence* sequence) override;
127 virtual void OnDetachedFromSequence( 127 virtual void OnDetachedFromSequence(
128 LayerAnimationSequence* sequence) OVERRIDE; 128 LayerAnimationSequence* sequence) override;
129 129
130 // OnImplicitAnimationsCompleted is not fired unless the observer is active. 130 // OnImplicitAnimationsCompleted is not fired unless the observer is active.
131 bool active() const { return active_; } 131 bool active() const { return active_; }
132 void SetActive(bool active); 132 void SetActive(bool active);
133 133
134 void CheckCompleted(); 134 void CheckCompleted();
135 135
136 void UpdatePropertyAnimationStatus(LayerAnimationSequence* sequence, 136 void UpdatePropertyAnimationStatus(LayerAnimationSequence* sequence,
137 AnimationStatus status); 137 AnimationStatus status);
138 AnimationStatus AnimationStatusForProperty( 138 AnimationStatus AnimationStatusForProperty(
139 LayerAnimationElement::AnimatableProperty property) const; 139 LayerAnimationElement::AnimatableProperty property) const;
140 140
141 bool active_; 141 bool active_;
142 142
143 // Set to true in the destructor (if non-NULL). Used to detect deletion while 143 // Set to true in the destructor (if non-NULL). Used to detect deletion while
144 // calling out. 144 // calling out.
145 bool* destroyed_; 145 bool* destroyed_;
146 146
147 typedef std::map<LayerAnimationElement::AnimatableProperty, 147 typedef std::map<LayerAnimationElement::AnimatableProperty,
148 AnimationStatus> PropertyAnimationStatusMap; 148 AnimationStatus> PropertyAnimationStatusMap;
149 PropertyAnimationStatusMap property_animation_status_; 149 PropertyAnimationStatusMap property_animation_status_;
150 150
151 // True if OnLayerAnimationScheduled() has been called at least once. 151 // True if OnLayerAnimationScheduled() has been called at least once.
152 bool first_sequence_scheduled_; 152 bool first_sequence_scheduled_;
153 }; 153 };
154 154
155 } // namespace ui 155 } // namespace ui
156 156
157 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ 157 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « ui/compositor/layer_animation_element.cc ('k') | ui/compositor/layer_animator_collection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698