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

Unified Diff: ui/views/controls/button/custom_button.h

Issue 1550443002: Pushed InkDropHost inheritence up to CustomButton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/animation/ink_drop_host.h ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/custom_button.h
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index 2f04cb4b0b6c82d9b1bfd23b241d434bab4dd858..6d23e8e08affb3a9644a17a74c5b80a4b3f8d2fd 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -10,6 +10,7 @@
#include "ui/events/event_constants.h"
#include "ui/gfx/animation/animation_delegate.h"
#include "ui/gfx/animation/throb_animation.h"
+#include "ui/views/animation/ink_drop_host.h"
#include "ui/views/animation/ink_drop_state.h"
#include "ui/views/controls/button/button.h"
@@ -22,7 +23,8 @@ class InkDropDelegate;
// part of the focus chain. Call SetFocusable(true) to make it part of the
// focus chain.
class VIEWS_EXPORT CustomButton : public Button,
- public gfx::AnimationDelegate {
+ public gfx::AnimationDelegate,
+ public views::InkDropHost {
public:
// An enum describing the events on which a button should notify its listener.
enum NotifyAction {
@@ -100,6 +102,11 @@ class VIEWS_EXPORT CustomButton : public Button,
// Overridden from gfx::AnimationDelegate:
void AnimationProgressed(const gfx::Animation* animation) override;
+ // Overridden from views::InkDropHost:
+ void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
+ void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
+ gfx::Point CalculateInkDropCenter() const override;
+
protected:
// Construct the Button with a Listener. See comment for Button's ctor.
explicit CustomButton(ButtonListener* listener);
« no previous file with comments | « ui/views/animation/ink_drop_host.h ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698