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

Side by Side Diff: ui/views/animation/ink_drop_ripple.h

Issue 2533053002: Handle view resize for ripple (Closed)
Patch Set: const -> constexpr Created 4 years 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/views/animation/ink_drop_impl.cc ('k') | ui/views/animation/ink_drop_ripple.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_ 5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_ 6 #define UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/gfx/geometry/point.h" 9 #include "ui/gfx/geometry/point.h"
10 #include "ui/gfx/geometry/size.h"
10 #include "ui/views/animation/ink_drop_ripple_observer.h" 11 #include "ui/views/animation/ink_drop_ripple_observer.h"
11 #include "ui/views/animation/ink_drop_state.h" 12 #include "ui/views/animation/ink_drop_state.h"
12 #include "ui/views/views_export.h" 13 #include "ui/views/views_export.h"
13 14
14 namespace ui { 15 namespace ui {
15 class CallbackLayerAnimationObserver; 16 class CallbackLayerAnimationObserver;
16 class Layer; 17 class Layer;
17 class LayerAnimationObserver; 18 class LayerAnimationObserver;
18 } // namespace ui 19 } // namespace ui
19 20
(...skipping 26 matching lines...) Expand all
46 47
47 InkDropRipple(); 48 InkDropRipple();
48 virtual ~InkDropRipple(); 49 virtual ~InkDropRipple();
49 50
50 // In the event that an animation is in progress for ink drop state 's1' and 51 // In the event that an animation is in progress for ink drop state 's1' and
51 // an animation to a new state 's2' is triggered, then 52 // an animation to a new state 's2' is triggered, then
52 // AnimationEnded(s1, PRE_EMPTED) will be called before 53 // AnimationEnded(s1, PRE_EMPTED) will be called before
53 // AnimationStarted(s2). 54 // AnimationStarted(s2).
54 void set_observer(InkDropRippleObserver* observer) { observer_ = observer; } 55 void set_observer(InkDropRippleObserver* observer) { observer_ = observer; }
55 56
57 // Called by ink drop whenever its host's size is changed in order to give the
58 // ripple an opportunity to handle dynamic host resizes.
59 virtual void HostSizeChanged(const gfx::Size& new_size);
60
56 // Animates from the current InkDropState to the new |ink_drop_state|. 61 // Animates from the current InkDropState to the new |ink_drop_state|.
57 // 62 //
58 // NOTE: GetTargetInkDropState() should return the new |ink_drop_state| value 63 // NOTE: GetTargetInkDropState() should return the new |ink_drop_state| value
59 // to any observers being notified as a result of the call. 64 // to any observers being notified as a result of the call.
60 void AnimateToState(InkDropState ink_drop_state); 65 void AnimateToState(InkDropState ink_drop_state);
61 66
62 InkDropState target_ink_drop_state() const { return target_ink_drop_state_; } 67 InkDropState target_ink_drop_state() const { return target_ink_drop_state_; }
63 68
64 // Immediately aborts all in-progress animations and hides the ink drop. 69 // Immediately aborts all in-progress animations and hides the ink drop.
65 // 70 //
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 InkDropState target_ink_drop_state_; 122 InkDropState target_ink_drop_state_;
118 123
119 InkDropRippleObserver* observer_; 124 InkDropRippleObserver* observer_;
120 125
121 DISALLOW_COPY_AND_ASSIGN(InkDropRipple); 126 DISALLOW_COPY_AND_ASSIGN(InkDropRipple);
122 }; 127 };
123 128
124 } // namespace views 129 } // namespace views
125 130
126 #endif // UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_ 131 #endif // UI_VIEWS_ANIMATION_INK_DROP_RIPPLE_H_
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop_impl.cc ('k') | ui/views/animation/ink_drop_ripple.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698