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

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

Issue 2406323002: CustomButton: restrict animation repaints to buttons that actually animate (Closed)
Patch Set: don't use bool(T*) Created 4 years, 2 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 | « chrome/browser/ui/views/tabs/tab_strip.cc ('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 a73d5008cf67e90ce6790de0f9bca7660573736c..161824c9869e35bbcdfbbadd62dd258d932d7a0f 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -42,6 +42,7 @@ class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate {
void SetState(ButtonState state);
// Starts throbbing. See HoverAnimation for a description of cycles_til_stop.
+ // This method does nothing if |animate_on_state_change_| is false.
void StartThrobbing(int cycles_til_stop);
// Stops throbbing immediately.
@@ -165,8 +166,8 @@ class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate {
gfx::ThrobAnimation hover_animation_;
- // Should we animate when the state changes? Defaults to true.
- bool animate_on_state_change_;
+ // Should we animate when the state changes?
+ bool animate_on_state_change_ = false;
// Is the hover animation running because StartThrob was invoked?
bool is_throbbing_;
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698