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

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

Issue 2473483013: [ash-md] Enhanced LayerAnimator to allow animations to be aborted/started in OnLayerAnimationStarte… (Closed)
Patch Set: Addresse review comments. Created 4 years, 1 month 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 | « no previous file | ui/compositor/layer_animation_sequence.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 (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
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "ui/compositor/compositor_export.h" 12 #include "ui/compositor/compositor_export.h"
13 #include "ui/compositor/layer_animation_element.h" 13 #include "ui/compositor/layer_animation_element.h"
14 14
15 namespace ui { 15 namespace ui {
16 16
17 namespace test { 17 namespace test {
18 class CountCheckingLayerAnimationObserver;
18 class LayerAnimationObserverTestApi; 19 class LayerAnimationObserverTestApi;
19 } // namespace test 20 } // namespace test
20 21
21 class LayerAnimationSequence; 22 class LayerAnimationSequence;
22 class ScopedLayerAnimationSettings; 23 class ScopedLayerAnimationSettings;
23 class ImplicitAnimationObserver; 24 class ImplicitAnimationObserver;
24 25
25 // LayerAnimationObservers are notified when animations complete. 26 // LayerAnimationObservers are notified when animations complete.
26 class COMPOSITOR_EXPORT LayerAnimationObserver { 27 class COMPOSITOR_EXPORT LayerAnimationObserver {
27 public: 28 public:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 75
75 // Detaches this observer from all sequences it is currently observing. 76 // Detaches this observer from all sequences it is currently observing.
76 void StopObserving(); 77 void StopObserving();
77 78
78 const AttachedSequences& attached_sequences() const { 79 const AttachedSequences& attached_sequences() const {
79 return attached_sequences_; 80 return attached_sequences_;
80 } 81 }
81 82
82 private: 83 private:
83 friend class LayerAnimationSequence; 84 friend class LayerAnimationSequence;
85 friend class test::CountCheckingLayerAnimationObserver;
84 friend class test::LayerAnimationObserverTestApi; 86 friend class test::LayerAnimationObserverTestApi;
85 87
86 // Called when |this| is added to |sequence|'s observer list. 88 // Called when |this| is added to |sequence|'s observer list.
87 void AttachedToSequence(LayerAnimationSequence* sequence); 89 void AttachedToSequence(LayerAnimationSequence* sequence);
88 90
89 // Called when |this| is removed to |sequence|'s observer list. 91 // Called when |this| is removed to |sequence|'s observer list.
90 // This will only result in notifications if |send_notification| is true. 92 // This will only result in notifications if |send_notification| is true.
91 void DetachedFromSequence(LayerAnimationSequence* sequence, 93 void DetachedFromSequence(LayerAnimationSequence* sequence,
92 bool send_notification); 94 bool send_notification);
93 95
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 AnimationStatus> PropertyAnimationStatusMap; 166 AnimationStatus> PropertyAnimationStatusMap;
165 PropertyAnimationStatusMap property_animation_status_; 167 PropertyAnimationStatusMap property_animation_status_;
166 168
167 // True if OnLayerAnimationScheduled() has been called at least once. 169 // True if OnLayerAnimationScheduled() has been called at least once.
168 bool first_sequence_scheduled_; 170 bool first_sequence_scheduled_;
169 }; 171 };
170 172
171 } // namespace ui 173 } // namespace ui
172 174
173 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_ 175 #endif // UI_COMPOSITOR_LAYER_ANIMATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/layer_animation_sequence.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698