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

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

Issue 2041033002: Moved ButtonInkDropDelegate logic into InkDropHostView and deleted InkDropDelegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed merge conflict in custom_button.cc Created 4 years, 6 months 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.h ('k') | ui/views/animation/ink_drop_factory.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_INK_DROP_DELEGATE_H_
6 #define UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_
7
8 #include "base/macros.h"
9 #include "ui/views/animation/ink_drop_state.h"
10 #include "ui/views/views_export.h"
11
12 namespace ui {
13 class GestureEvent;
14 class Event;
15 } // namespace ui
16
17 namespace views {
18
19 class InkDrop;
20
21 // Ink ripple animation delegate that starts and stops animations based on
22 // View states and events.
23 class VIEWS_EXPORT InkDropDelegate {
24 public:
25 InkDropDelegate() {}
26 virtual ~InkDropDelegate() {}
27
28 // Called when ink ripple state changes.
29 // TODO(bruthig): Replace the InkDropState parameter with an InkDropAction
30 // enum. The InkDropAction enum should be a subset of the InkDropState values
31 // as well as a NONE value.
32 virtual void OnAction(InkDropState state) = 0;
33
34 // Immediately snaps the InkDropState to ACTIVATED.
35 virtual void SnapToActivated() = 0;
36
37 // Enables or disables the hover state.
38 virtual void SetHovered(bool is_hovered) = 0;
39
40 // Returns the current InkDropState
41 virtual InkDropState GetTargetInkDropState() const = 0;
42
43 // Returns the ink drop that this delegate controls. TODO(estade): remove the
44 // above pass throughs and convert callers to using this function.
45 virtual InkDrop* GetInkDrop() = 0;
46
47 private:
48 DISALLOW_COPY_AND_ASSIGN(InkDropDelegate);
49 };
50
51 } // namespace views
52
53 #endif // UI_VIEWS_ANIMATION_INK_DROP_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/animation/ink_drop.h ('k') | ui/views/animation/ink_drop_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698