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

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

Issue 1411833006: Refactoring to make adding ink drop animations easier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Attempt to refactor ink drop animations (moving more stuff into InkDropDelegate) Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_
7
8 #include "base/macros.h"
9 #include "ui/views/views_export.h"
10
11 namespace ui {
12 class GestureEvent;
13 class Event;
14 } // namespace ui
15
16 namespace views {
17
18 // Ink ripple animation delegate that starts and stops animations based on
19 // View states and events.
20 class VIEWS_EXPORT InkDropDelegate {
21 public:
22 InkDropDelegate() {}
23 virtual ~InkDropDelegate() {}
24
25 // Sets sizes for the animation layers.
26 virtual void SetInkDropSize(int large_size,
27 int large_corner_radius,
28 int small_size,
29 int small_corner_radius) = 0;
30
31 // Called when the View's layout changes necessitating change in positioning
32 // of ink ripple layers.
33 virtual void Layout() = 0;
bruthig 2015/11/12 16:41:15 Unless there is a compelling reason/benefit to mov
varkha 2015/11/13 00:32:42 As we talked offline. I've renamed it to OnLayout(
34
35 // Called on gesture to allow starting and stopping animations.
36 virtual void OnGestureEvent(const ui::GestureEvent& event) = 0;
bruthig 2015/11/12 16:41:15 |event| probably shouldn't be const. I imagine so
varkha 2015/11/13 00:32:42 Done.
37
38 // Called when ink ripple should be hidden.
39 virtual void OnActionComplete() = 0;
40
41 // Called to activate the ink ripple.
42 virtual void OnActionPending(const ui::Event& event) = 0;
bruthig 2015/11/12 16:41:15 Is |event| used anywhere, or are there plans to us
varkha 2015/11/13 00:32:42 Done.
43
44 // Called to start showing QUICK_ACTION ripple.
45 virtual void OnActionQuick() = 0;
46
47 // Called to start showing ACTIVATED (menu) ripple.
48 virtual void OnActivated() = 0;
49
50 // Called to animate end of ACTIVATED (menu) ripple.
51 virtual void OnDeactivated() = 0;
52
53 private:
54 DISALLOW_COPY_AND_ASSIGN(InkDropDelegate);
55 };
56
57 } // namespace views
58
59 #endif // UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698