Skip to content

Commit

Permalink
overview: Remove swipe to close windows flag.
Browse files Browse the repository at this point in the history
It has been on by default since M69.

Test: none
Bug: 828646
Change-Id: I1be9d8b588e4b42767ae09e81364e6262c7cf156
Reviewed-on: https://chromium-review.googlesource.com/c/1334507
Reviewed-by: Xiaoqian Dai <xdai@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608170}
  • Loading branch information
sammiequon71 authored and Commit Bot committed Nov 14, 2018
1 parent 3ca8119 commit 122355f
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 51 deletions.
3 changes: 0 additions & 3 deletions ash/public/cpp/ash_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ const base::Feature kNotificationExpansionAnimation{
const base::Feature kNotificationScrollBar{"NotificationScrollBar",
base::FEATURE_DISABLED_BY_DEFAULT};

const base::Feature kOverviewSwipeToClose{"OverviewSwipeToClose",
base::FEATURE_ENABLED_BY_DEFAULT};

const base::Feature kTrilinearFiltering{"TrilinearFiltering",
base::FEATURE_DISABLED_BY_DEFAULT};

Expand Down
5 changes: 0 additions & 5 deletions ash/public/cpp/ash_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ ASH_PUBLIC_EXPORT extern const base::Feature kNotificationExpansionAnimation;
// Enables notification scroll bar in UnifiedSystemTray.
ASH_PUBLIC_EXPORT extern const base::Feature kNotificationScrollBar;

// Enables swipe to close in overview mode.
// TODO(sammiequon): Remove this after the feature is fully launched.
// https://crbug.com/828646.
ASH_PUBLIC_EXPORT extern const base::Feature kOverviewSwipeToClose;

// Enables trilinear filtering.
ASH_PUBLIC_EXPORT extern const base::Feature kTrilinearFiltering;

Expand Down
4 changes: 0 additions & 4 deletions ash/wm/overview/overview_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ bool CanCoverAvailableWorkspace(aura::Window* window) {
return wm::GetWindowState(window)->IsMaximizedOrFullscreenOrPinned();
}

bool IsOverviewSwipeToCloseEnabled() {
return base::FeatureList::IsEnabled(features::kOverviewSwipeToClose);
}

void FadeInWidgetAndMaybeSlideOnEnter(views::Widget* widget,
OverviewAnimationType animation_type,
bool slide) {
Expand Down
2 changes: 0 additions & 2 deletions ash/wm/overview/overview_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ namespace ash {
// Returns true if |window| can cover available workspace.
bool CanCoverAvailableWorkspace(aura::Window* window);

bool IsOverviewSwipeToCloseEnabled();

// Fades |widget| to opacity one with the enter overview settings. Additionally
// place |widget| closer to the top of screen and slide it down if |slide| is
// true.
Expand Down
3 changes: 1 addition & 2 deletions ash/wm/overview/overview_window_drag_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ void OverviewWindowDragController::Drag(const gfx::Point& location_in_screen) {
return;
}

if (IsOverviewSwipeToCloseEnabled() &&
std::abs(distance.x()) < std::abs(distance.y())) {
if (std::abs(distance.x()) < std::abs(distance.y())) {
current_drag_behavior_ = DragBehavior::kDragToClose;
original_opacity_ = item_->GetOpacity();
window_selector_->GetGridWithRootWindow(item_->root_window())
Expand Down
19 changes: 0 additions & 19 deletions ash/wm/overview/window_selector_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/test/scoped_feature_list.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/focus_client.h"
#include "ui/aura/client/window_types.h"
Expand Down Expand Up @@ -3573,9 +3572,6 @@ TEST_F(SplitViewWindowSelectorTest, Dragging) {
TEST_F(SplitViewWindowSelectorTest, OverviewDragControllerBehavior) {
Shell::Get()->aura_env()->set_throttle_input_on_resize_for_testing(false);

base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(features::kOverviewSwipeToClose);

std::unique_ptr<aura::Window> window1 = CreateTestWindow();
std::unique_ptr<aura::Window> window2 = CreateTestWindow();

Expand Down Expand Up @@ -3617,9 +3613,6 @@ TEST_F(SplitViewWindowSelectorTest, OverviewDragControllerBehavior) {
// Verify that if the window item has been dragged enough vertically, the window
// will be closed.
TEST_F(SplitViewWindowSelectorTest, DragToClose) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(features::kOverviewSwipeToClose);

// This test requires a widget.
const gfx::Rect bounds(400, 400);
std::unique_ptr<views::Widget> widget1(CreateWindowWidget(bounds));
Expand Down Expand Up @@ -3651,9 +3644,6 @@ TEST_F(SplitViewWindowSelectorTest, DragToClose) {
// Verify that if the window item has been flung enough vertically, the window
// will be closed.
TEST_F(SplitViewWindowSelectorTest, FlingToClose) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(features::kOverviewSwipeToClose);

// This test requires a widget.
const gfx::Rect bounds(400, 400);
std::unique_ptr<views::Widget> widget1(CreateWindowWidget(bounds));
Expand Down Expand Up @@ -3694,9 +3684,6 @@ TEST_F(SplitViewWindowSelectorTest, FlingToClose) {
// we still only have one row, so the other items should nudge while the item is
// being dragged.
TEST_F(SplitViewWindowSelectorTest, BasicNudging) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(features::kOverviewSwipeToClose);

// Set up three equal windows, which take up one row on the overview grid.
// When one of them is deleted we are still left with all the windows on one
// row.
Expand Down Expand Up @@ -3741,9 +3728,6 @@ TEST_F(SplitViewWindowSelectorTest, BasicNudging) {
// if the item to be deleted results in the overview grid to change number of
// rows.
TEST_F(SplitViewWindowSelectorTest, NoNudgingWhenNumRowsChange) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(features::kOverviewSwipeToClose);

// Set up four equal windows, which would split into two rows in overview
// mode. Removing one window would leave us with three windows, which only
// takes a single row in overview.
Expand Down Expand Up @@ -3779,9 +3763,6 @@ TEST_F(SplitViewWindowSelectorTest, NoNudgingWhenNumRowsChange) {
// from the previous row to drop down to the current row, thus causing the items
// to the right of the item to be shifted right, which is visually unacceptable.
TEST_F(SplitViewWindowSelectorTest, NoNudgingWhenLastItemOnPreviousRowDrops) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitAndEnableFeature(features::kOverviewSwipeToClose);

// Set up five equal windows, which would split into two rows in overview
// mode. Removing one window would cause the rows to rearrange, with the third
// item dropping down from the first row to the second row. Create the windows
Expand Down
7 changes: 0 additions & 7 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4092,13 +4092,6 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kExperimentalProductivityFeaturesDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kExperimentalProductivityFeatures)},

#if defined(OS_CHROMEOS)
{"enable-overview-swipe-to-close",
flag_descriptions::kEnableOverviewSwipeToCloseName,
flag_descriptions::kEnableOverviewSwipeToCloseDescription, kOsCrOS,
FEATURE_VALUE_TYPE(ash::features::kOverviewSwipeToClose)},
#endif // OS_CHROMEOS

#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
{"ntp-backgrounds", flag_descriptions::kNtpBackgroundsName,
flag_descriptions::kNtpBackgroundsDescription, kOsDesktop,
Expand Down
6 changes: 0 additions & 6 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -700,12 +700,6 @@ const char kEnableOutOfBlinkCORSName[] = "Out of blink CORS";
const char kEnableOutOfBlinkCORSDescription[] =
"CORS handling logic is moved out of blink.";

const char kEnableOverviewSwipeToCloseName[] =
"Enable overview swipe to close.";
const char kEnableOverviewSwipeToCloseDescription[] =
"Enables closing of items in overview mode by dragging or flinging "
"vertically.";

const char kExperimentalAccessibilityFeaturesName[] =
"Experimental accessibility features";
const char kExperimentalAccessibilityFeaturesDescription[] =
Expand Down
3 changes: 0 additions & 3 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,6 @@ extern const char kEnableOptimizationHintsDescription[];
extern const char kEnableOutOfBlinkCORSName[];
extern const char kEnableOutOfBlinkCORSDescription[];

extern const char kEnableOverviewSwipeToCloseName[];
extern const char kEnableOverviewSwipeToCloseDescription[];

extern const char kVizDisplayCompositorName[];
extern const char kVizDisplayCompositorDescription[];

Expand Down

0 comments on commit 122355f

Please sign in to comment.