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

Side by Side Diff: ui/base/animation/throb_animation.cc

Issue 10392173: Flash window by pulsing their launcher icon state indicator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/base/animation/throb_animation.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/animation/throb_animation.h" 5 #include "ui/base/animation/throb_animation.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 namespace ui { 9 namespace ui {
10 10
11 static const int kDefaultThrobDurationMS = 400; 11 static const int kDefaultThrobDurationMS = 400;
(...skipping 16 matching lines...) Expand all
28 return; // We're already running, we'll cycle when current loop finishes. 28 return; // We're already running, we'll cycle when current loop finishes.
29 29
30 if (IsShowing()) 30 if (IsShowing())
31 SlideAnimation::Hide(); 31 SlideAnimation::Hide();
32 else 32 else
33 SlideAnimation::Show(); 33 SlideAnimation::Show();
34 cycles_remaining_ = cycles_til_stop; 34 cycles_remaining_ = cycles_til_stop;
35 } 35 }
36 36
37 void ThrobAnimation::Reset() { 37 void ThrobAnimation::Reset() {
38 Reset(0);
39 }
40
41 void ThrobAnimation::Reset(double value) {
38 ResetForSlide(); 42 ResetForSlide();
39 SlideAnimation::Reset(); 43 SlideAnimation::Reset(value);
40 } 44 }
41 45
42 void ThrobAnimation::Show() { 46 void ThrobAnimation::Show() {
43 ResetForSlide(); 47 ResetForSlide();
44 SlideAnimation::Show(); 48 SlideAnimation::Show();
45 } 49 }
46 50
47 void ThrobAnimation::Hide() { 51 void ThrobAnimation::Hide() {
48 ResetForSlide(); 52 ResetForSlide();
49 SlideAnimation::Hide(); 53 SlideAnimation::Hide();
(...skipping 22 matching lines...) Expand all
72 } 76 }
73 } 77 }
74 78
75 void ThrobAnimation::ResetForSlide() { 79 void ThrobAnimation::ResetForSlide() {
76 SlideAnimation::SetSlideDuration(slide_duration_); 80 SlideAnimation::SetSlideDuration(slide_duration_);
77 cycles_remaining_ = 0; 81 cycles_remaining_ = 0;
78 throbbing_ = false; 82 throbbing_ = false;
79 } 83 }
80 84
81 } // namespace ui 85 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/animation/throb_animation.h ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698