Commit 0bc5f344 authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

[reland] cros: OnHotseatTransitionStarted -> WillStart

Rename the observer to make it more clear that the function is called
prior to the animation beginning.

TBR=manucornet@chromium.org

Change-Id: I627bf805a74c12f86df5fb5bf4a85debaf9b63a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2065337Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743339}
parent c4d4b657
......@@ -141,7 +141,7 @@ void HotseatTransitionAnimator::DoAnimation(HotseatState old_state,
animation_metrics_reporter_->set_new_state(new_state);
for (auto& observer : observers_)
observer.OnHotseatTransitionAnimationStarted(old_state, new_state);
observer.OnHotseatTransitionAnimationWillStart(old_state, new_state);
{
ui::ScopedLayerAnimationSettings shelf_bg_animation_setter(
......
......@@ -30,9 +30,9 @@ class ASH_EXPORT HotseatTransitionAnimator
class Observer : public base::CheckedObserver {
public:
// Called before the hotseat transition animations begin.
virtual void OnHotseatTransitionAnimationStarted(HotseatState from_state,
HotseatState to_start) {}
// Called before hotseat transition animations begin.
virtual void OnHotseatTransitionAnimationWillStart(HotseatState from_state,
HotseatState to_start) {}
// Called when hotseat transition animations end.
virtual void OnHotseatTransitionAnimationEnded(HotseatState from_state,
HotseatState to_start) {}
......
......@@ -112,8 +112,8 @@ class HotseatWidget::DelegateView : public HotseatTransitionAnimator::Observer,
void SetBackgroundBlur(bool enable_blur);
// HotseatTransitionAnimator::Observer:
void OnHotseatTransitionAnimationStarted(HotseatState from_state,
HotseatState to_state) override;
void OnHotseatTransitionAnimationWillStart(HotseatState from_state,
HotseatState to_state) override;
void OnHotseatTransitionAnimationEnded(HotseatState from_state,
HotseatState to_state) override;
// views::WidgetDelegateView:
......@@ -229,7 +229,7 @@ void HotseatWidget::DelegateView::SetBackgroundBlur(bool enable_blur) {
translucent_background_.SetBackgroundBlur(blur_radius);
}
void HotseatWidget::DelegateView::OnHotseatTransitionAnimationStarted(
void HotseatWidget::DelegateView::OnHotseatTransitionAnimationWillStart(
HotseatState from_state,
HotseatState to_state) {
SetBackgroundBlur(false);
......
......@@ -68,8 +68,8 @@ class HotseatWidgetAnimationMetricsReporter
~HotseatWidgetAnimationMetricsReporter() override {}
void OnHotseatTransitionAnimationStarted(HotseatState from_state,
HotseatState to_state) override {
void OnHotseatTransitionAnimationWillStart(HotseatState from_state,
HotseatState to_state) override {
target_state_ = to_state;
}
......
......@@ -152,8 +152,8 @@ class ShelfWidget::DelegateView : public views::WidgetDelegate,
void UpdateShelfBackground(SkColor color) override;
// HotseatBackgroundAnimator::Observer:
void OnHotseatTransitionAnimationStarted(HotseatState from_state,
HotseatState to_state) override;
void OnHotseatTransitionAnimationWillStart(HotseatState from_state,
HotseatState to_state) override;
void OnHotseatTransitionAnimationEnded(HotseatState from_state,
HotseatState to_state) override;
......@@ -421,7 +421,7 @@ void ShelfWidget::DelegateView::UpdateShelfBackground(SkColor color) {
UpdateOpaqueBackground();
}
void ShelfWidget::DelegateView::OnHotseatTransitionAnimationStarted(
void ShelfWidget::DelegateView::OnHotseatTransitionAnimationWillStart(
HotseatState from_state,
HotseatState to_state) {
ShowAnimatingBackground(true);
......
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