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

Side by Side Diff: ui/views/animation/toolbar_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_TOOLBAR_INK_DROP_DELEGATE_H_
6 #define UI_VIEWS_ANIMATION_TOOLBAR_INK_DROP_DELEGATE_H_
7
8 #include "base/macros.h"
9 #include "ui/views/animation/ink_drop_delegate.h"
10 #include "ui/views/views_export.h"
11
12 namespace ui {
13 class GestureEvent;
14 } // namespace ui
15
16 namespace views {
17
18 class InkDropAnimationController;
19 class InkDropHost;
20
21 // An InkDropDelegate that handles animations for toolbar buttons.
22 class VIEWS_EXPORT ToolbarInkDropDelegate : public InkDropDelegate {
23 public:
24 ToolbarInkDropDelegate(InkDropHost* ink_drop_host);
25 ~ToolbarInkDropDelegate() override;
26
27 // InkDropDelegate:
28 void SetInkDropSize(int large_size,
29 int large_corner_radius,
30 int small_size,
31 int small_corner_radius) override;
32 void Layout() override;
33 void OnGestureEvent(const ui::GestureEvent& event) override;
34 void OnActionComplete() override;
35 void OnActionPending(const ui::Event& event) override;
36 void OnActionQuick() override;
37 void OnActivated() override;
38 void OnDeactivated() override;
39
40 private:
41 // Parent InkDropHost (typically a View) that hosts the ink ripple animations.
42 InkDropHost* ink_drop_host_;
43
44 // Animation controller for the ink drop ripple effect.
45 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_;
46
47 DISALLOW_COPY_AND_ASSIGN(ToolbarInkDropDelegate);
48 };
49
50 } // namespace views
51
52 #endif // UI_VIEWS_ANIMATION_TOOLBAR_INK_DROP_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698