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

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

Issue 2680643002: Add old_state parameter to CustomButton::StateChanged (Closed)
Patch Set: Created 3 years, 10 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/custom_button.h ('k') | ui/views/controls/button/label_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index a3fd6ce370b84ad0cc24be004bbaaf463c054065..cdf6a6d620cc2e3373c983c16ac98b4d4dd75c3d 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -100,8 +100,9 @@ void CustomButton::SetState(ButtonState state) {
}
}
+ ButtonState old_state = state_;
state_ = state;
- StateChanged();
+ StateChanged(old_state);
SchedulePaint();
}
@@ -437,8 +438,7 @@ CustomButton::CustomButton(ButtonListener* listener)
hover_animation_.SetSlideDuration(kHoverFadeDurationMs);
}
-void CustomButton::StateChanged() {
-}
+void CustomButton::StateChanged(ButtonState old_state) {}
bool CustomButton::IsTriggerableEvent(const ui::Event& event) {
return event.type() == ui::ET_GESTURE_TAP_DOWN ||
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | ui/views/controls/button/label_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698