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

Unified Diff: ui/views/controls/button/label_button_unittest.cc

Issue 2001843002: Use ink drop hover for focus states on toolbar buttons and location (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layout Created 4 years, 7 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/controls/button/label_button.cc ('k') | ui/views/controls/button/md_text_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/label_button_unittest.cc
diff --git a/ui/views/controls/button/label_button_unittest.cc b/ui/views/controls/button/label_button_unittest.cc
index f8c0da76cd6a78f5372aad901cf46f9cae860607..face1beeb89dc4d65a6c6011b73a14bc7ea7cba5 100644
--- a/ui/views/controls/button/label_button_unittest.cc
+++ b/ui/views/controls/button/label_button_unittest.cc
@@ -429,18 +429,19 @@ class InkDropLabelButton : public LabelButton {
public:
InkDropLabelButton()
: LabelButton(nullptr, base::string16()),
- test_ink_drop_delegate_(this, this) {
- set_ink_drop_delegate(&test_ink_drop_delegate_);
+ test_ink_drop_delegate_(new TestButtonInkDropDelegate(this, this)) {
+ set_ink_drop_delegate(base::WrapUnique(test_ink_drop_delegate_));
}
~InkDropLabelButton() override {}
TestButtonInkDropDelegate* test_ink_drop_delegate() {
- return &test_ink_drop_delegate_;
+ return test_ink_drop_delegate_;
}
private:
- TestButtonInkDropDelegate test_ink_drop_delegate_;
+ // Weak pointer.
+ TestButtonInkDropDelegate* test_ink_drop_delegate_;
DISALLOW_COPY_AND_ASSIGN(InkDropLabelButton);
};
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/button/md_text_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698