Commit b019c30f authored by Qiang Xu's avatar Qiang Xu Committed by Commit Bot

cros: enable persistent window bounds feature

changes:
Per crbug.com/740268, we get all launch review YES. Remove behind-flag
--ash-enable-persistent-window-bounds switch.

Bug: 805046
Test: device test
Change-Id: I33dfec4dd97e01c7ba159ab005cfd97cff51e215
Reviewed-on: https://chromium-review.googlesource.com/954067Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/heads/master@{#542267}
parent c49d74ff
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "ash/display/persistent_window_controller.h" #include "ash/display/persistent_window_controller.h"
#include "ash/display/persistent_window_info.h" #include "ash/display/persistent_window_info.h"
#include "ash/public/cpp/ash_switches.h" #include "ash/public/cpp/ash_features.h"
#include "ash/session/session_controller.h" #include "ash/session/session_controller.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/wm/mru_window_tracker.h" #include "ash/wm/mru_window_tracker.h"
...@@ -30,10 +30,8 @@ MruWindowTracker::WindowList GetWindowList() { ...@@ -30,10 +30,8 @@ MruWindowTracker::WindowList GetWindowList() {
// Returns true when window cycle list can be processed to perform save/restore // Returns true when window cycle list can be processed to perform save/restore
// operations on observing display changes. // operations on observing display changes.
bool ShouldProcessWindowList() { bool ShouldProcessWindowList() {
if (!base::CommandLine::ForCurrentProcess()->HasSwitch( if (!features::IsPersistentWindowBoundsEnabled())
switches::kAshEnablePersistentWindowBounds)) {
return false; return false;
}
// Window cycle list exists in active user session only. // Window cycle list exists in active user session only.
if (!Shell::Get()->session_controller()->IsActiveUserSessionStarted()) if (!Shell::Get()->session_controller()->IsActiveUserSessionStarted())
......
...@@ -7,13 +7,11 @@ ...@@ -7,13 +7,11 @@
#include "ash/display/display_move_window_util.h" #include "ash/display/display_move_window_util.h"
#include "ash/display/window_tree_host_manager.h" #include "ash/display/window_tree_host_manager.h"
#include "ash/public/cpp/ash_features.h" #include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/ash_switches.h"
#include "ash/session/test_session_controller_client.h" #include "ash/session/test_session_controller_client.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/test/ash_test_base.h" #include "ash/test/ash_test_base.h"
#include "ash/wm/window_state.h" #include "ash/wm/window_state.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "base/test/histogram_tester.h" #include "base/test/histogram_tester.h"
#include "base/test/scoped_feature_list.h" #include "base/test/scoped_feature_list.h"
#include "ui/display/test/display_manager_test_api.h" #include "ui/display/test/display_manager_test_api.h"
...@@ -29,10 +27,11 @@ class PersistentWindowControllerTest : public AshTestBase { ...@@ -29,10 +27,11 @@ class PersistentWindowControllerTest : public AshTestBase {
// AshTestBase: // AshTestBase:
void SetUp() override { void SetUp() override {
scoped_feature_list_.InitAndEnableFeature( // Explicitly enable persistent window bounds and displays move window
features::kDisplayMoveWindowAccels); // accels features for the tests.
base::CommandLine::ForCurrentProcess()->AppendSwitch( scoped_feature_list_.InitWithFeatures(
switches::kAshEnablePersistentWindowBounds); {features::kPersistentWindowBounds, features::kDisplayMoveWindowAccels},
{});
AshTestBase::SetUp(); AshTestBase::SetUp();
} }
......
...@@ -19,6 +19,9 @@ const base::Feature kKeyboardShortcutViewer{"KeyboardShortcutViewer", ...@@ -19,6 +19,9 @@ const base::Feature kKeyboardShortcutViewer{"KeyboardShortcutViewer",
const base::Feature kNewOverviewAnimations{"NewOverviewAnimations", const base::Feature kNewOverviewAnimations{"NewOverviewAnimations",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kPersistentWindowBounds{"PersistentWindowBounds",
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kSystemTrayUnified{"SystemTrayUnified", const base::Feature kSystemTrayUnified{"SystemTrayUnified",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
...@@ -45,6 +48,10 @@ bool IsSystemTrayUnifiedEnabled() { ...@@ -45,6 +48,10 @@ bool IsSystemTrayUnifiedEnabled() {
return base::FeatureList::IsEnabled(kSystemTrayUnified); return base::FeatureList::IsEnabled(kSystemTrayUnified);
} }
bool IsPersistentWindowBoundsEnabled() {
return base::FeatureList::IsEnabled(kPersistentWindowBounds);
}
bool IsLockScreenNotificationsEnabled() { bool IsLockScreenNotificationsEnabled() {
return base::FeatureList::IsEnabled(kLockScreenNotifications); return base::FeatureList::IsEnabled(kLockScreenNotifications);
} }
......
...@@ -31,6 +31,11 @@ ASH_PUBLIC_EXPORT extern const base::Feature kKeyboardShortcutViewer; ...@@ -31,6 +31,11 @@ ASH_PUBLIC_EXPORT extern const base::Feature kKeyboardShortcutViewer;
// https://crbug.com/801465. // https://crbug.com/801465.
ASH_PUBLIC_EXPORT extern const base::Feature kNewOverviewAnimations; ASH_PUBLIC_EXPORT extern const base::Feature kNewOverviewAnimations;
// Enables persistent window bounds in multi-displays scenario.
// TODO(warx): Remove this after the feature is fully launched.
// https://crbug.com/805046.
ASH_PUBLIC_EXPORT extern const base::Feature kPersistentWindowBounds;
// Enables new system menu. // Enables new system menu.
ASH_PUBLIC_EXPORT extern const base::Feature kSystemTrayUnified; ASH_PUBLIC_EXPORT extern const base::Feature kSystemTrayUnified;
...@@ -45,6 +50,8 @@ ASH_PUBLIC_EXPORT bool IsKeyboardShortcutViewerEnabled(); ...@@ -45,6 +50,8 @@ ASH_PUBLIC_EXPORT bool IsKeyboardShortcutViewerEnabled();
ASH_PUBLIC_EXPORT bool IsNewOverviewAnimationsEnabled(); ASH_PUBLIC_EXPORT bool IsNewOverviewAnimationsEnabled();
ASH_PUBLIC_EXPORT bool IsPersistentWindowBoundsEnabled();
ASH_PUBLIC_EXPORT bool IsSystemTrayUnifiedEnabled(); ASH_PUBLIC_EXPORT bool IsSystemTrayUnifiedEnabled();
ASH_PUBLIC_EXPORT bool IsLockScreenNotificationsEnabled(); ASH_PUBLIC_EXPORT bool IsLockScreenNotificationsEnabled();
......
...@@ -59,11 +59,6 @@ const char kAshEnableNightLight[] = "ash-enable-night-light"; ...@@ -59,11 +59,6 @@ const char kAshEnableNightLight[] = "ash-enable-night-light";
const char kAshEnablePaletteOnAllDisplays[] = const char kAshEnablePaletteOnAllDisplays[] =
"ash-enable-palette-on-all-displays"; "ash-enable-palette-on-all-displays";
// Enables persistent window bounds in multi-displays scenario.
// TODO(warx): Remove this once the feature is launched. crbug.com/805046.
const char kAshEnablePersistentWindowBounds[] =
"ash-enable-persistent-window-bounds";
// Enables the sidebar. // Enables the sidebar.
const char kAshSidebarEnabled[] = "enable-ash-sidebar"; const char kAshSidebarEnabled[] = "enable-ash-sidebar";
const char kAshSidebarDisabled[] = "disable-ash-sidebar"; const char kAshSidebarDisabled[] = "disable-ash-sidebar";
......
...@@ -30,7 +30,6 @@ ASH_PUBLIC_EXPORT extern const char kAshEnableMagnifierKeyScroller[]; ...@@ -30,7 +30,6 @@ ASH_PUBLIC_EXPORT extern const char kAshEnableMagnifierKeyScroller[];
ASH_PUBLIC_EXPORT extern const char kAshEnableNewOverviewUi[]; ASH_PUBLIC_EXPORT extern const char kAshEnableNewOverviewUi[];
ASH_PUBLIC_EXPORT extern const char kAshEnableNightLight[]; ASH_PUBLIC_EXPORT extern const char kAshEnableNightLight[];
ASH_PUBLIC_EXPORT extern const char kAshEnablePaletteOnAllDisplays[]; ASH_PUBLIC_EXPORT extern const char kAshEnablePaletteOnAllDisplays[];
ASH_PUBLIC_EXPORT extern const char kAshEnablePersistentWindowBounds[];
ASH_PUBLIC_EXPORT extern const char kAshEnableScaleSettingsTray[]; ASH_PUBLIC_EXPORT extern const char kAshEnableScaleSettingsTray[];
ASH_PUBLIC_EXPORT extern const char kAshEnableTabletMode[]; ASH_PUBLIC_EXPORT extern const char kAshEnableTabletMode[];
ASH_PUBLIC_EXPORT extern const char kAshEnableWaylandServer[]; ASH_PUBLIC_EXPORT extern const char kAshEnableWaylandServer[];
......
...@@ -3594,7 +3594,7 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -3594,7 +3594,7 @@ const FeatureEntry kFeatureEntries[] = {
{"ash-enable-persistent-window-bounds", {"ash-enable-persistent-window-bounds",
flag_descriptions::kAshEnablePersistentWindowBoundsName, flag_descriptions::kAshEnablePersistentWindowBoundsName,
flag_descriptions::kAshEnablePersistentWindowBoundsDescription, kOsCrOS, flag_descriptions::kAshEnablePersistentWindowBoundsDescription, kOsCrOS,
SINGLE_VALUE_TYPE(ash::switches::kAshEnablePersistentWindowBounds)}, FEATURE_VALUE_TYPE(ash::features::kPersistentWindowBounds)},
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
{"clipboard-content-setting", {"clipboard-content-setting",
......
...@@ -26909,7 +26909,9 @@ from previous Chrome versions. ...@@ -26909,7 +26909,9 @@ from previous Chrome versions.
<int value="1075637651" label="disable-tablet-splitview"/> <int value="1075637651" label="disable-tablet-splitview"/>
<int value="1079032226" label="ParallelDownloading:enabled"/> <int value="1079032226" label="ParallelDownloading:enabled"/>
<int value="1081546525" label="ash-enable-docked-windows"/> <int value="1081546525" label="ash-enable-docked-windows"/>
<int value="1082054180" label="PersistentWindowBounds:disabled"/>
<int value="1082405724" label="AutofillUpstreamUseGooglePayBranding:enabled"/> <int value="1082405724" label="AutofillUpstreamUseGooglePayBranding:enabled"/>
<int value="1083201516" label="PersistentWindowBounds:enabled"/>
<int value="1087235172" label="file-manager-enable-new-audio-player"/> <int value="1087235172" label="file-manager-enable-new-audio-player"/>
<int value="1090377940" label="enable-quic-https"/> <int value="1090377940" label="enable-quic-https"/>
<int value="1092896354" label="EnableFullscreenAppList:disabled"/> <int value="1092896354" label="EnableFullscreenAppList:disabled"/>
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