diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 00:17:22 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 00:17:22 +0000 |
commit | 8fcec3c79f1c8f2edae6a1b064cf60c39720ba54 (patch) | |
tree | d2949c5b8fc3a926940366ca3a7fe4eaacdc36e7 /app | |
parent | 8622c0c034073504735808dc83dd509ce444b4ae (diff) | |
download | chromium_src-8fcec3c79f1c8f2edae6a1b064cf60c39720ba54.zip chromium_src-8fcec3c79f1c8f2edae6a1b064cf60c39720ba54.tar.gz chromium_src-8fcec3c79f1c8f2edae6a1b064cf60c39720ba54.tar.bz2 |
Linux/GTK: implement update notification.
BUG=45148
TEST=compile chrome with PRODUCT_VERSION manually set to something higher than the current version (e.g. 7.0.0.0), and manually set the upgrade detector time to something short (like 10 seconds). Launch chrome and wait a short time for the update notification to appear. The update notification should pulse every few seconds, and should stop pulsing when the user opens the wrench menu. The about menu item should launch a dialog that allows the user to restart chrome, restoring the current session.
Review URL: http://codereview.chromium.org/2365003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/throb_animation.cc | 4 | ||||
-rw-r--r-- | app/throb_animation.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/throb_animation.cc b/app/throb_animation.cc index 922d77d..65596b3 100644 --- a/app/throb_animation.cc +++ b/app/throb_animation.cc @@ -4,6 +4,8 @@ #include "app/throb_animation.h" +#include <limits> + static const int kDefaultThrobDurationMS = 400; ThrobAnimation::ThrobAnimation(AnimationDelegate* target) @@ -15,6 +17,8 @@ ThrobAnimation::ThrobAnimation(AnimationDelegate* target) } void ThrobAnimation::StartThrobbing(int cycles_til_stop) { + cycles_til_stop = cycles_til_stop >= 0 ? cycles_til_stop : + std::numeric_limits<int>::max(); cycles_remaining_ = cycles_til_stop; throbbing_ = true; SlideAnimation::SetSlideDuration(throb_duration_); diff --git a/app/throb_animation.h b/app/throb_animation.h index 2405724..7dc67b3 100644 --- a/app/throb_animation.h +++ b/app/throb_animation.h @@ -20,7 +20,7 @@ class ThrobAnimation : public SlideAnimation { virtual ~ThrobAnimation() {} // Starts throbbing. cycles_til_stop gives the number of cycles to do before - // stopping. + // stopping. A negative value means "throb indefinitely". void StartThrobbing(int cycles_til_stop); // Sets the duration of the slide animation when throbbing. |