Commit dbb51738 authored by Yulun Wu's avatar Yulun Wu Committed by Commit Bot

Flip feature flag to maintain shelf state on overview.

Fixed bug where home to overview nudge was not being hidden when
transitioning to overview mode. Fixed bug where
use_in_app_shelf_in_overview_ was not reset when ending overview mode.

Bug: 1123553
Change-Id: I8d00c0c685793d74ce5f813ebf3b2c8de1d7a88d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2385897Reviewed-by: default avatarXiyuan Slow <xiyuan@chromium.org>
Reviewed-by: default avatarYulun Wu <yulunwu@chromium.org>
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803918}
parent 0f31d8c8
......@@ -131,8 +131,7 @@ const base::Feature kNotificationsInContextMenu{
"NotificationsInContextMenu", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kMaintainShelfStateWhenEnteringOverview{
"MaintainShelfStateWhenEnteringOverview",
base::FEATURE_DISABLED_BY_DEFAULT};
"MaintainShelfStateWhenEnteringOverview", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kTemporaryHoldingSpace{"TemporaryHoldingSpace",
base::FEATURE_DISABLED_BY_DEFAULT};
......
......@@ -185,6 +185,8 @@ class ASH_EXPORT ShelfConfig : public TabletModeObserver,
// Opacity of the ink drop ripple for shelf items when the ripple is visible.
float GetInkDropVisibleOpacity() const;
bool in_overview_mode() const { return overview_mode_; }
// Gets the current color for the shelf control buttons.
SkColor GetShelfControlButtonColor() const;
......
......@@ -194,6 +194,7 @@ void ShelfConfig::OnOverviewModeWillStart() {
void ShelfConfig::OnOverviewModeEnding(OverviewSession* overview_session) {
overview_mode_ = false;
use_in_app_shelf_in_overview_ = false;
UpdateConfig(is_app_list_visible_, /*tablet_mode_changed=*/false);
}
......
......@@ -617,6 +617,7 @@ void ShelfLayoutManager::UpdateContextualNudges() {
const bool in_app_shelf = ShelfConfig::Get()->is_in_app();
const bool in_tablet_mode = ShelfConfig::Get()->in_tablet_mode();
const bool in_overview_mode = ShelfConfig::Get()->in_overview_mode();
contextual_tooltip::SetDragHandleNudgeDisabledForHiddenShelf(!IsVisible());
......@@ -635,7 +636,7 @@ void ShelfLayoutManager::UpdateContextualNudges() {
// allowed by the current shelf state.
const bool allow_home_to_overview_nudge =
in_tablet_mode && !in_app_shelf &&
!ShelfConfig::Get()->shelf_controls_shown();
!ShelfConfig::Get()->shelf_controls_shown() && !in_overview_mode;
if (allow_home_to_overview_nudge && !home_to_overview_nudge_controller_) {
home_to_overview_nudge_controller_ =
std::make_unique<HomeToOverviewNudgeController>(
......@@ -1032,6 +1033,7 @@ void ShelfLayoutManager::OnOverviewModeWillStart() {
void ShelfLayoutManager::OnOverviewModeStarting() {
overview_mode_will_start_ = false;
overview_suspend_work_area_update_.emplace(this);
UpdateContextualNudges();
}
void ShelfLayoutManager::OnOverviewModeStartingAnimationComplete(
......
......@@ -2972,7 +2972,7 @@
{
"name": "maintain-shelf-state-overview",
"owners": [ "yulunwu" ],
"expiry_milestone": 86
"expiry_milestone": 88
},
{
"name": "managed-bookmarks-ios",
......
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