summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 19:51:34 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-17 19:51:34 +0000
commit48f40b2ab482fbf21109fbf396fb43d2285e6f75 (patch)
tree6f2ff069178be3445ccbdd685d6bde17e0192ea8 /views
parent096c3bcb4ed173c7f7c9c59e7c8007b065cad7d0 (diff)
downloadchromium_src-48f40b2ab482fbf21109fbf396fb43d2285e6f75.zip
chromium_src-48f40b2ab482fbf21109fbf396fb43d2285e6f75.tar.gz
chromium_src-48f40b2ab482fbf21109fbf396fb43d2285e6f75.tar.bz2
Fixes bug where if you click on the bookmark bubble, then change the
folder we wouldn't throb the right view. To get this to work I changed the order of when we apply edits (change the model) to before the bubble is closed. Previously we closed the bubble, then applied the edits. We need to apply the edits first as bookmark bar stops throbbing when the bubble is closed. BUG=41082 TEST=see bug R=ben@chromium.org Review URL: http://codereview.chromium.org/6677050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78585 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/button/custom_button.cc7
-rw-r--r--views/controls/button/custom_button.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc
index 887e0b4..5f8e82e 100644
--- a/views/controls/button/custom_button.cc
+++ b/views/controls/button/custom_button.cc
@@ -52,6 +52,13 @@ void CustomButton::StartThrobbing(int cycles_til_stop) {
hover_animation_->StartThrobbing(cycles_til_stop);
}
+void CustomButton::StopThrobbing() {
+ if (hover_animation_->is_animating()) {
+ hover_animation_->Stop();
+ SchedulePaint();
+ }
+}
+
void CustomButton::SetAnimationDuration(int duration) {
hover_animation_->SetSlideDuration(duration);
}
diff --git a/views/controls/button/custom_button.h b/views/controls/button/custom_button.h
index b9e1d31..8b4008c 100644
--- a/views/controls/button/custom_button.h
+++ b/views/controls/button/custom_button.h
@@ -44,6 +44,9 @@ class CustomButton : public Button,
// Starts throbbing. See HoverAnimation for a description of cycles_til_stop.
void StartThrobbing(int cycles_til_stop);
+ // Stops throbbing immediately.
+ void StopThrobbing();
+
// Set how long the hover animation will last for.
void SetAnimationDuration(int duration);