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

Side by Side Diff: ui/views/animation/button_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: Refactor ink drop animations (nits in ui/views/ Created 5 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/events/event_target.cc ('k') | ui/views/animation/button_ink_drop_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BUTTON_INK_DROP_DELEGATE_H_
6 #define UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
7
8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/events/event_handler.h"
11 #include "ui/views/animation/ink_drop_delegate.h"
12 #include "ui/views/views_export.h"
13
14 namespace views {
15
16 class InkDropAnimationController;
17 class InkDropHost;
18 class ScopedTargetHandler;
19 class View;
20
21 // An InkDropDelegate that handles animations for toolbar buttons.
22 class VIEWS_EXPORT ButtonInkDropDelegate : public InkDropDelegate,
23 public ui::EventHandler {
24 public:
25 ButtonInkDropDelegate(InkDropHost* ink_drop_host, View* view);
26 ~ButtonInkDropDelegate() override;
27
28 // InkDropDelegate:
29 void SetInkDropSize(int large_size,
30 int large_corner_radius,
31 int small_size,
32 int small_corner_radius) override;
33 void OnLayout() override;
34 void OnAction(InkDropState state) override;
35
36 // ui::EventHandler:
37 void OnGestureEvent(ui::GestureEvent* event) override;
38
39 private:
40 // An instance of ScopedTargetHandler allowing |this| to handling events.
41 scoped_ptr<views::ScopedTargetHandler> target_handler_;
42
43 // Parent InkDropHost (typically a View) that hosts the ink ripple animations.
44 InkDropHost* ink_drop_host_;
45
46 // Animation controller for the ink drop ripple effect.
47 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_;
48
49 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate);
50 };
51
52 } // namespace views
53
54 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/events/event_target.cc ('k') | ui/views/animation/button_ink_drop_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698