Commit 03019b27 authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS Shelf: Hotseat positioning in overview

Extend the hotseat in overview mode, and hide it in split view mode.

Bug: 1009550, 1009716
Change-Id: I2494c07a2d9bf486ffd4be5a0da4779c855cd59e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1872189Reviewed-by: default avatarAlex Newcomer <newcomer@chromium.org>
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707976}
parent 11cfdb6e
...@@ -1067,7 +1067,12 @@ HotseatState ShelfLayoutManager::CalculateHotseatState( ...@@ -1067,7 +1067,12 @@ HotseatState ShelfLayoutManager::CalculateHotseatState(
return HotseatState::kShown; return HotseatState::kShown;
if (Shell::Get()->overview_controller() && if (Shell::Get()->overview_controller() &&
Shell::Get()->overview_controller()->InOverviewSession()) { Shell::Get()->overview_controller()->InOverviewSession()) {
return HotseatState::kShown; auto* split_view_controller =
SplitViewController::Get(Shell::GetPrimaryRootWindow());
return split_view_controller &&
split_view_controller->InSplitViewMode()
? HotseatState::kHidden
: HotseatState::kExtended;
} }
if (visibility_state == SHELF_AUTO_HIDE) { if (visibility_state == SHELF_AUTO_HIDE) {
if (auto_hide_state == SHELF_AUTO_HIDE_HIDDEN || if (auto_hide_state == SHELF_AUTO_HIDE_HIDDEN ||
......
...@@ -3487,7 +3487,7 @@ TEST_P(HotseatShelfLayoutManagerTest, ReleasingSlowDragAboveThreshold) { ...@@ -3487,7 +3487,7 @@ TEST_P(HotseatShelfLayoutManagerTest, ReleasingSlowDragAboveThreshold) {
} }
// Tests that showing overview after showing the hotseat results in only one // Tests that showing overview after showing the hotseat results in only one
// animation, to |kShown|. // animation, to |kExtended|.
TEST_P(HotseatShelfLayoutManagerTest, ShowingOverviewFromShownAnimatesOnce) { TEST_P(HotseatShelfLayoutManagerTest, ShowingOverviewFromShownAnimatesOnce) {
GetPrimaryShelf()->SetAutoHideBehavior(GetParam()); GetPrimaryShelf()->SetAutoHideBehavior(GetParam());
TabletModeControllerTestApi().EnterTabletMode(); TabletModeControllerTestApi().EnterTabletMode();
...@@ -3508,7 +3508,7 @@ TEST_P(HotseatShelfLayoutManagerTest, ShowingOverviewFromShownAnimatesOnce) { ...@@ -3508,7 +3508,7 @@ TEST_P(HotseatShelfLayoutManagerTest, ShowingOverviewFromShownAnimatesOnce) {
.CenterPoint(); .CenterPoint();
GetEventGenerator()->GestureTapAt(overview_button_center); GetEventGenerator()->GestureTapAt(overview_button_center);
state_watcher_->CheckEqual({HotseatState::kExtended, HotseatState::kShown}); state_watcher_->CheckEqual({HotseatState::kExtended});
} }
// Tests that the hotseat is not flush with the bottom of the screen when home // Tests that the hotseat is not flush with the bottom of the screen when home
......
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