Commit 05fde3b7 authored by Jun Mukai's avatar Jun Mukai Committed by Commit Bot

Change the timing of the SetTargetState on closing animation

The animation is already ongoing when the closing is scheduled,
Chrome is going to crash without SetTargetState() regardless of
the side-shelf state.

Bug: 954907, 951853
Test: manually
Change-Id: Ic5e67e152341cb96829fd2d1e9e768485f8b2eff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1577482Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652881}
parent e5095811
......@@ -1417,6 +1417,8 @@ void AppListView::StartAnimationForState(
}
void AppListView::StartCloseAnimation(base::TimeDelta animation_duration) {
state_animation_metrics_reporter_->SetTargetState(
ash::mojom::AppListViewState::kClosed);
if (is_side_shelf_)
return;
......@@ -1427,8 +1429,6 @@ void AppListView::StartCloseAnimation(base::TimeDelta animation_duration) {
animation_duration /= 2;
}
state_animation_metrics_reporter_->SetTargetState(
ash::mojom::AppListViewState::kClosed);
SetState(ash::mojom::AppListViewState::kClosed);
app_list_main_view_->contents_view()->FadeOutOnClose(animation_duration);
}
......
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