Commit a54f0e72 authored by Avery Musbach's avatar Avery Musbach Committed by Commit Bot

split view: Nix Ms suffix of TimeDelta constants in split_view_utils.cc

In split_view_utils.cc, the "Ms" suffix in the names of the TimeDelta
constants does not make sense. The TimeDelta class abstracts away the
unit, and does not even use milliseconds internally. The values are
created from numbers of milliseconds, but this fact is clear enough from
just the function name "FromMilliseconds."

Test: manual
Change-Id: Ic9973375fd07b22faf97332e82c2227a05bce3c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1598920Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Avery Musbach <amusbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658784}
parent 2cc2fbdf
...@@ -26,26 +26,26 @@ namespace ash { ...@@ -26,26 +26,26 @@ namespace ash {
namespace { namespace {
// The animation speed at which the highlights fade in or out. // The animation speed at which the highlights fade in or out.
constexpr base::TimeDelta kHighlightsFadeInOutMs = constexpr base::TimeDelta kHighlightsFadeInOut =
base::TimeDelta::FromMilliseconds(250); base::TimeDelta::FromMilliseconds(250);
// The animation speed which the other highlight fades in or out. // The animation speed which the other highlight fades in or out.
constexpr base::TimeDelta kOtherFadeInOutMs = constexpr base::TimeDelta kOtherFadeInOut =
base::TimeDelta::FromMilliseconds(133); base::TimeDelta::FromMilliseconds(133);
// The delay before the other highlight starts fading in. // The delay before the other highlight starts fading in.
constexpr base::TimeDelta kOtherFadeInDelayMs = constexpr base::TimeDelta kOtherFadeInDelay =
base::TimeDelta::FromMilliseconds(117); base::TimeDelta::FromMilliseconds(117);
// The animation speed at which the preview area fades out (when you snap a // The animation speed at which the preview area fades out (when you snap a
// window). // window).
constexpr base::TimeDelta kPreviewAreaFadeOutMs = constexpr base::TimeDelta kPreviewAreaFadeOut =
base::TimeDelta::FromMilliseconds(67); base::TimeDelta::FromMilliseconds(67);
// The time duration for the indicator label opacity animations. // The time duration for the indicator label opacity animations.
constexpr base::TimeDelta kLabelAnimationMs = constexpr base::TimeDelta kLabelAnimation =
base::TimeDelta::FromMilliseconds(83); base::TimeDelta::FromMilliseconds(83);
// The delay before the indicator labels start fading in. // The delay before the indicator labels start fading in.
constexpr base::TimeDelta kLabelAnimationDelayMs = constexpr base::TimeDelta kLabelAnimationDelay =
base::TimeDelta::FromMilliseconds(167); base::TimeDelta::FromMilliseconds(167);
// The time duration for the window transformation animations. // The time duration for the window transformation animations.
constexpr base::TimeDelta kWindowTransformMs = constexpr base::TimeDelta kWindowTransform =
base::TimeDelta::FromMilliseconds(250); base::TimeDelta::FromMilliseconds(250);
constexpr float kHighlightOpacity = 0.3f; constexpr float kHighlightOpacity = 0.3f;
...@@ -71,40 +71,40 @@ void GetAnimationValuesForType( ...@@ -71,40 +71,40 @@ void GetAnimationValuesForType(
case SPLITVIEW_ANIMATION_PREVIEW_AREA_SLIDE_OUT: case SPLITVIEW_ANIMATION_PREVIEW_AREA_SLIDE_OUT:
case SPLITVIEW_ANIMATION_PREVIEW_AREA_TEXT_SLIDE_IN: case SPLITVIEW_ANIMATION_PREVIEW_AREA_TEXT_SLIDE_IN:
case SPLITVIEW_ANIMATION_PREVIEW_AREA_TEXT_SLIDE_OUT: case SPLITVIEW_ANIMATION_PREVIEW_AREA_TEXT_SLIDE_OUT:
*out_duration = kHighlightsFadeInOutMs; *out_duration = kHighlightsFadeInOut;
*out_tween_type = gfx::Tween::FAST_OUT_SLOW_IN; *out_tween_type = gfx::Tween::FAST_OUT_SLOW_IN;
return; return;
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_FADE_IN: case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_FADE_IN:
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_SLIDE_IN: case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_SLIDE_IN:
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_TEXT_SLIDE_IN: case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_TEXT_SLIDE_IN:
*out_delay = kOtherFadeInDelayMs; *out_delay = kOtherFadeInDelay;
*out_duration = kOtherFadeInOutMs; *out_duration = kOtherFadeInOut;
*out_tween_type = gfx::Tween::LINEAR_OUT_SLOW_IN; *out_tween_type = gfx::Tween::LINEAR_OUT_SLOW_IN;
*out_preemption_strategy = ui::LayerAnimator::ENQUEUE_NEW_ANIMATION; *out_preemption_strategy = ui::LayerAnimator::ENQUEUE_NEW_ANIMATION;
return; return;
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_FADE_OUT: case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_FADE_OUT:
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_SLIDE_OUT: case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_SLIDE_OUT:
case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_TEXT_SLIDE_OUT: case SPLITVIEW_ANIMATION_OTHER_HIGHLIGHT_TEXT_SLIDE_OUT:
*out_duration = kOtherFadeInOutMs; *out_duration = kOtherFadeInOut;
*out_tween_type = gfx::Tween::FAST_OUT_LINEAR_IN; *out_tween_type = gfx::Tween::FAST_OUT_LINEAR_IN;
return; return;
case SPLITVIEW_ANIMATION_PREVIEW_AREA_FADE_OUT: case SPLITVIEW_ANIMATION_PREVIEW_AREA_FADE_OUT:
case SPLITVIEW_ANIMATION_PREVIEW_AREA_NIX_INSET: case SPLITVIEW_ANIMATION_PREVIEW_AREA_NIX_INSET:
*out_duration = kPreviewAreaFadeOutMs; *out_duration = kPreviewAreaFadeOut;
*out_tween_type = gfx::Tween::FAST_OUT_LINEAR_IN; *out_tween_type = gfx::Tween::FAST_OUT_LINEAR_IN;
return; return;
case SPLITVIEW_ANIMATION_TEXT_FADE_IN: case SPLITVIEW_ANIMATION_TEXT_FADE_IN:
*out_delay = kLabelAnimationDelayMs; *out_delay = kLabelAnimationDelay;
*out_duration = kLabelAnimationMs; *out_duration = kLabelAnimation;
*out_tween_type = gfx::Tween::LINEAR_OUT_SLOW_IN; *out_tween_type = gfx::Tween::LINEAR_OUT_SLOW_IN;
*out_preemption_strategy = ui::LayerAnimator::ENQUEUE_NEW_ANIMATION; *out_preemption_strategy = ui::LayerAnimator::ENQUEUE_NEW_ANIMATION;
return; return;
case SPLITVIEW_ANIMATION_TEXT_FADE_OUT: case SPLITVIEW_ANIMATION_TEXT_FADE_OUT:
*out_duration = kLabelAnimationMs; *out_duration = kLabelAnimation;
*out_tween_type = gfx::Tween::FAST_OUT_LINEAR_IN; *out_tween_type = gfx::Tween::FAST_OUT_LINEAR_IN;
return; return;
case SPLITVIEW_ANIMATION_SET_WINDOW_TRANSFORM: case SPLITVIEW_ANIMATION_SET_WINDOW_TRANSFORM:
*out_duration = kWindowTransformMs; *out_duration = kWindowTransform;
*out_tween_type = gfx::Tween::FAST_OUT_SLOW_IN; *out_tween_type = gfx::Tween::FAST_OUT_SLOW_IN;
*out_preemption_strategy = *out_preemption_strategy =
ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET; ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment