Commit 71930cf9 authored by Avery Musbach's avatar Avery Musbach Committed by Commit Bot

split view: Record overview animation histogram for snapping two windows

Overview exit animation histograms shall include when overview ends
because you drag two windows from overview and snap on opposite sides.

Test: All/SplitViewOverviewSessionInClamshellTest.BothSnappedOverviewExitAnimationHistogramTest/?
Change-Id: I5a1e7d11a4e6d4e3aff49c32e489b9042aa5cf0e
Fixed: 1124786
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2401941Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Avery Musbach <amusbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#806377}
parent b32e781a
......@@ -1366,11 +1366,11 @@ void SplitViewController::OnOverviewModeEnding(
if (state_ == State::kBothSnapped)
overview_session->SetWindowListNotAnimatedWhenExiting(root_window_);
// If clamshell split view mode is active, end it and bail out.
if (split_view_type_ == SplitViewType::kClamshellType) {
EndSplitView();
// If clamshell split view mode is active, bail out. |OnOverviewModeEnded|
// will end split view. We do not end split view here, because that would mess
// up histograms of overview exit animation smoothness.
if (split_view_type_ == SplitViewType::kClamshellType)
return;
}
// Tablet split view mode is active. If it still only has one snapped window,
// snap the first snappable window in the overview grid on the other side.
......@@ -1406,6 +1406,12 @@ void SplitViewController::OnOverviewModeEnding(
ShowAppCannotSnapToast();
}
void SplitViewController::OnOverviewModeEnded() {
DCHECK(InSplitViewMode());
if (split_view_type_ == SplitViewType::kClamshellType)
EndSplitView();
}
void SplitViewController::OnDisplayRemoved(
const display::Display& old_display) {
// Display removal always triggers a window activation which ends overview,
......
......@@ -247,6 +247,7 @@ class ASH_EXPORT SplitViewController : public aura::WindowObserver,
// OverviewObserver:
void OnOverviewModeStarting() override;
void OnOverviewModeEnding(OverviewSession* overview_session) override;
void OnOverviewModeEnded() override;
// display::DisplayObserver:
void OnDisplayRemoved(const display::Display& old_display) override;
......
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