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

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

Issue 1757993004: Added ink drop hover/ripple to menu hosting bookmark buttons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sky@ & varkha@ comments. Created 4 years, 9 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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_BUTTON_INK_DROP_DELEGATE_H_ 5 #ifndef UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
6 #define UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ 6 #define UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/events/event_handler.h" 10 #include "ui/events/event_handler.h"
(...skipping 12 matching lines...) Expand all
23 23
24 // An InkDropDelegate that handles animations for things that act like buttons. 24 // An InkDropDelegate that handles animations for things that act like buttons.
25 class VIEWS_EXPORT ButtonInkDropDelegate : public InkDropDelegate, 25 class VIEWS_EXPORT ButtonInkDropDelegate : public InkDropDelegate,
26 public ui::EventHandler { 26 public ui::EventHandler {
27 public: 27 public:
28 ButtonInkDropDelegate(InkDropHost* ink_drop_host, View* view); 28 ButtonInkDropDelegate(InkDropHost* ink_drop_host, View* view);
29 ~ButtonInkDropDelegate() override; 29 ~ButtonInkDropDelegate() override;
30 30
31 // InkDropDelegate: 31 // InkDropDelegate:
32 void OnAction(InkDropState state) override; 32 void OnAction(InkDropState state) override;
33 void SnapToActivated() override;
33 void SetHovered(bool is_hovered) override; 34 void SetHovered(bool is_hovered) override;
34 35
35 // ui::EventHandler: 36 // ui::EventHandler:
36 void OnMouseEvent(ui::MouseEvent* event) override; 37 void OnMouseEvent(ui::MouseEvent* event) override;
37 void OnGestureEvent(ui::GestureEvent* event) override; 38 void OnGestureEvent(ui::GestureEvent* event) override;
38 39
39 private: 40 private:
40 // An instance of ScopedTargetHandler allowing |this| to handle events. 41 // An instance of ScopedTargetHandler allowing |this| to handle events.
41 scoped_ptr<ui::ScopedTargetHandler> target_handler_; 42 scoped_ptr<ui::ScopedTargetHandler> target_handler_;
42 43
43 // Parent InkDropHost (typically a View) that hosts the ink ripple animations. 44 // Parent InkDropHost (typically a View) that hosts the ink ripple animations.
44 InkDropHost* ink_drop_host_; 45 InkDropHost* ink_drop_host_;
45 46
46 // Animation controller for the ink drop ripple effect. 47 // Animation controller for the ink drop ripple effect.
47 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_; 48 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate); 50 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate);
50 }; 51 };
51 52
52 } // namespace views 53 } // namespace views
53 54
54 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ 55 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.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