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

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

Issue 1390113006: Added material design mouse hover feedback support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved MouseEntered/Exit() to hover handling in to the ButtonInkDropDelegate. Created 4 years, 11 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 17 matching lines...) Expand all
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 SetInkDropSize(int large_size, 32 void SetInkDropSize(int large_size,
33 int large_corner_radius, 33 int large_corner_radius,
34 int small_size, 34 int small_size,
35 int small_corner_radius) override; 35 int small_corner_radius) override;
36 void OnLayout() override; 36 void OnLayout() override;
37 void OnAction(InkDropState state) override; 37 void OnAction(InkDropState state) override;
38 void SetHovered(bool is_hovered) override;
38 39
39 // ui::EventHandler: 40 // ui::EventHandler:
41 void OnMouseEvent(ui::MouseEvent* event) override;
40 void OnGestureEvent(ui::GestureEvent* event) override; 42 void OnGestureEvent(ui::GestureEvent* event) override;
41 43
42 private: 44 private:
43 // An instance of ScopedTargetHandler allowing |this| to handle events. 45 // An instance of ScopedTargetHandler allowing |this| to handle events.
44 scoped_ptr<ui::ScopedTargetHandler> target_handler_; 46 scoped_ptr<ui::ScopedTargetHandler> target_handler_;
45 47
46 // Parent InkDropHost (typically a View) that hosts the ink ripple animations. 48 // Parent InkDropHost (typically a View) that hosts the ink ripple animations.
47 InkDropHost* ink_drop_host_; 49 InkDropHost* ink_drop_host_;
48 50
49 // Animation controller for the ink drop ripple effect. 51 // Animation controller for the ink drop ripple effect.
50 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_; 52 scoped_ptr<InkDropAnimationController> ink_drop_animation_controller_;
51 53
52 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate); 54 DISALLOW_COPY_AND_ASSIGN(ButtonInkDropDelegate);
53 }; 55 };
54 56
55 } // namespace views 57 } // namespace views
56 58
57 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_ 59 #endif // UI_VIEWS_ANIMATION_BUTTON_INK_DROP_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698