Commit e197d1e0 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

MessageCenter Redesign: disable by default

The message center redesign kUnifiedMessageCenterRefactor feature
is disabled by default, and is only enabled on the devices that
has hotseat feature enabled (i.e., on Krane and on Dogfood devices).

Bug: 976952, 958020
Change-Id: I172f310831a0ef64dfecccc210850464b2a5c80b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1951283
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721653}
parent 2983fdc9
......@@ -96,7 +96,7 @@ const base::Feature kSwapSideVolumeButtonsForOrientation{
"SwapSideVolumeButtonsForOrientation", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kUnifiedMessageCenterRefactor{
"UnifiedMessageCenterRefactor", base::FEATURE_ENABLED_BY_DEFAULT};
"UnifiedMessageCenterRefactor", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kEnableBackgroundBlur{"EnableBackgroundBlur",
base::FEATURE_ENABLED_BY_DEFAULT};
......@@ -181,7 +181,8 @@ bool IsSwapSideVolumeButtonsForOrientationEnabled() {
}
bool IsUnifiedMessageCenterRefactorEnabled() {
return base::FeatureList::IsEnabled(kUnifiedMessageCenterRefactor);
return base::FeatureList::IsEnabled(kUnifiedMessageCenterRefactor) ||
chromeos::switches::ShouldShowShelfHotseat();
}
bool IsBackgroundBlurEnabled() {
......
......@@ -249,7 +249,6 @@ StackedNotificationBar::StackedNotificationBar(
IDS_ASH_MESSAGE_CENTER_EXPAND_ALL_NOTIFICATIONS_BUTTON_LABEL),
message_center_view)) {
SetVisible(false);
message_center::MessageCenter::Get()->AddObserver(this);
int left_padding = features::IsUnifiedMessageCenterRefactorEnabled()
? 0
: kStackingNotificationClearAllButtonPadding.left();
......@@ -260,6 +259,7 @@ StackedNotificationBar::StackedNotificationBar(
views::BoxLayout::CrossAxisAlignment::kStretch);
if (features::IsUnifiedMessageCenterRefactorEnabled()) {
message_center::MessageCenter::Get()->AddObserver(this);
notification_icons_container_ = new views::View();
notification_icons_container_->SetLayoutManager(
std::make_unique<views::BoxLayout>(
......
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