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

Unified Diff: ash/wm/session_state_animator.cc

Issue 11783032: ash: Fix abort-shutdown animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « no previous file | ash/wm/session_state_controller_impl2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/session_state_animator.cc
diff --git a/ash/wm/session_state_animator.cc b/ash/wm/session_state_animator.cc
index 0f34b9d7efd16a391bfdf6aa964c46977b9dede2..82af8b3a63c3c4d0b277cc5234aba7a824718979 100644
--- a/ash/wm/session_state_animator.cc
+++ b/ash/wm/session_state_animator.cc
@@ -246,6 +246,7 @@ void StartGrayscaleBrightnessAnimationForWindow(
aura::Window* window,
float target,
base::TimeDelta duration,
+ ui::Tween::Type tween_type,
ui::LayerAnimationObserver* observer) {
ui::LayerAnimator* animator = window->layer()->GetAnimator();
@@ -257,13 +258,13 @@ void StartGrayscaleBrightnessAnimationForWindow(
scoped_ptr<ui::LayerAnimationElement> brightness_element(
ui::LayerAnimationElement::CreateBrightnessElement(
target, duration));
- brightness_element->set_tween_type(ui::Tween::EASE_IN);
+ brightness_element->set_tween_type(tween_type);
brightness_sequence->AddElement(brightness_element.release());
scoped_ptr<ui::LayerAnimationElement> grayscale_element(
ui::LayerAnimationElement::CreateGrayscaleElement(
target, duration));
- grayscale_element->set_tween_type(ui::Tween::EASE_IN);
+ grayscale_element->set_tween_type(tween_type);
grayscale_sequence->AddElement(grayscale_element.release());
std::vector<ui::LayerAnimationSequence*> animations;
@@ -439,11 +440,11 @@ base::TimeDelta SessionStateAnimator::GetDuration(AnimationSpeed speed) {
case ANIMATION_SPEED_MOVE_WINDOWS:
return base::TimeDelta::FromMilliseconds(350);
case ANIMATION_SPEED_UNDO_MOVE_WINDOWS:
- return base::TimeDelta::FromMilliseconds(500);
+ return base::TimeDelta::FromMilliseconds(350);
case ANIMATION_SPEED_SHUTDOWN:
return base::TimeDelta::FromMilliseconds(1000);
case ANIMATION_SPEED_REVERT_SHUTDOWN:
- return base::TimeDelta::FromMilliseconds(1500);
+ return base::TimeDelta::FromMilliseconds(500);
}
// Satisfy compilers that do not understand that we will return from switch
// above anyway.
@@ -603,11 +604,11 @@ void SessionStateAnimator::RunAnimationForWindow(
break;
case ANIMATION_GRAYSCALE_BRIGHTNESS:
StartGrayscaleBrightnessAnimationForWindow(
- window, 1.0, duration, observer);
+ window, 1.0, duration, ui::Tween::EASE_IN, observer);
break;
case ANIMATION_UNDO_GRAYSCALE_BRIGHTNESS:
StartGrayscaleBrightnessAnimationForWindow(
- window, 0.0, duration, observer);
+ window, 0.0, duration, ui::Tween::EASE_IN_OUT, observer);
break;
}
}
« no previous file with comments | « no previous file | ash/wm/session_state_controller_impl2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698