Skip to content

Commit

Permalink
Remove SwipingFromLeftEdgeToGoBack flag.
Browse files Browse the repository at this point in the history
Bug: 1111005
Change-Id: I29a8281cea3dc067904f708fe5049d3fd55766bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2330034
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Min Chen <minch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793248}
  • Loading branch information
minch authored and Commit Bot committed Jul 30, 2020
1 parent adc1394 commit 208e0ec
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 32 deletions.
7 changes: 0 additions & 7 deletions ash/public/cpp/ash_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ const base::Feature kSwapSideVolumeButtonsForOrientation{
const base::Feature kEnableBackgroundBlur{"EnableBackgroundBlur",
base::FEATURE_ENABLED_BY_DEFAULT};

const base::Feature kSwipingFromLeftEdgeToGoBack{
"SwipingFromLeftEdgeToGoBack", base::FEATURE_ENABLED_BY_DEFAULT};

const base::Feature kDragFromShelfToHomeOrOverview{
"DragFromShelfToHomeOrOverview", base::FEATURE_DISABLED_BY_DEFAULT};

Expand Down Expand Up @@ -220,10 +217,6 @@ bool IsBackgroundBlurEnabled() {
#endif
}

bool IsSwipingFromLeftEdgeToGoBackEnabled() {
return base::FeatureList::IsEnabled(kSwipingFromLeftEdgeToGoBack);
}

bool IsDragFromShelfToHomeOrOverviewEnabled() {
// The kDragFromShelfToHomeOrOverview feature is only enabled on the devices
// that have hotseat enabled (i.e., on Krane and on Dogfood devices) in M80.
Expand Down
6 changes: 0 additions & 6 deletions ash/public/cpp/ash_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ ASH_PUBLIC_EXPORT extern const base::Feature kShelfAppScaling;
// may have choppier app list animations while in this mode. crbug.com/765292.
ASH_PUBLIC_EXPORT extern const base::Feature kEnableBackgroundBlur;

// Enables going back to previous page while swiping from the left edge of the
// display. Only for tablet mode.
ASH_PUBLIC_EXPORT extern const base::Feature kSwipingFromLeftEdgeToGoBack;

// Enables dragging from shelf to enter home screen or overview feature.
// Only for tablet mode.
// TODO(https://crbug.com/992642): Remove this after this feature is fully
Expand Down Expand Up @@ -210,8 +206,6 @@ ASH_PUBLIC_EXPORT bool IsSwapSideVolumeButtonsForOrientationEnabled();

ASH_PUBLIC_EXPORT bool IsBackgroundBlurEnabled();

ASH_PUBLIC_EXPORT bool IsSwipingFromLeftEdgeToGoBackEnabled();

ASH_PUBLIC_EXPORT bool IsDragFromShelfToHomeOrOverviewEnabled();

ASH_PUBLIC_EXPORT bool IsReduceDisplayNotificationsEnabled();
Expand Down
6 changes: 2 additions & 4 deletions ash/shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1023,10 +1023,8 @@ void Shell::Init(
event_transformation_handler_.reset(new EventTransformationHandler);
AddPreTargetHandler(event_transformation_handler_.get());

if (features::IsSwipingFromLeftEdgeToGoBackEnabled()) {
back_gesture_event_handler_ = std::make_unique<BackGestureEventHandler>();
AddPreTargetHandler(back_gesture_event_handler_.get());
}
back_gesture_event_handler_ = std::make_unique<BackGestureEventHandler>();
AddPreTargetHandler(back_gesture_event_handler_.get());

toplevel_window_event_handler_ =
std::make_unique<ToplevelWindowEventHandler>();
Expand Down
3 changes: 0 additions & 3 deletions ash/wm/gestures/back_gesture/back_gesture_event_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ void BackGestureEventHandler::OnGestureEvent(GestureConsumer* consumer,
bool BackGestureEventHandler::MaybeHandleBackGesture(
ui::GestureEvent* event,
const gfx::Point& screen_location) {
DCHECK(features::IsSwipingFromLeftEdgeToGoBackEnabled());
switch (event->type()) {
case ui::ET_GESTURE_TAP_DOWN:
going_back_started_ = CanStartGoingBack(screen_location);
Expand Down Expand Up @@ -420,8 +419,6 @@ bool BackGestureEventHandler::MaybeHandleBackGesture(

bool BackGestureEventHandler::CanStartGoingBack(
const gfx::Point& screen_location) {
DCHECK(features::IsSwipingFromLeftEdgeToGoBackEnabled());

Shell* shell = Shell::Get();
if (!shell->tablet_mode_controller()->InTabletMode())
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "ash/home_screen/home_screen_controller.h"
#include "ash/keyboard/ui/keyboard_ui_controller.h"
#include "ash/keyboard/ui/test/keyboard_test_util.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/keyboard/keyboard_controller.h"
#include "ash/screen_util.h"
#include "ash/session/session_controller_impl.h"
Expand All @@ -33,7 +32,6 @@
#include "ash/wm/workspace/backdrop_controller.h"
#include "ash/wm/workspace/workspace_layout_manager.h"
#include "ash/wm/workspace_controller.h"
#include "base/test/scoped_feature_list.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/accelerators/test_accelerator_target.h"
Expand Down Expand Up @@ -62,7 +60,6 @@ class BackGestureEventHandlerTest : public AshTestBase {
}
AshTestBase::SetUp(std::move(delegate));

feature_list_.InitAndEnableFeature(features::kSwipingFromLeftEdgeToGoBack);
RecreateTopWindow(AppType::BROWSER);
TabletModeControllerTestApi().EnterTabletMode();
}
Expand Down Expand Up @@ -119,7 +116,6 @@ class BackGestureEventHandlerTest : public AshTestBase {

private:
bool can_go_back_;
base::test::ScopedFeatureList feature_list_;
std::unique_ptr<aura::Window> top_window_;
};

Expand Down
3 changes: 0 additions & 3 deletions ash/wm/window_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,6 @@ aura::Window* GetTopWindow() {
}

bool ShouldMinimizeTopWindowOnBack() {
if (!features::IsSwipingFromLeftEdgeToGoBackEnabled())
return false;

Shell* shell = Shell::Get();
if (!shell->tablet_mode_controller()->InTabletMode())
return false;
Expand Down
5 changes: 0 additions & 5 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4873,11 +4873,6 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAppServiceIntentHandlingDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kAppServiceIntentHandling)},

{"ash-swiping-from-left-edge-to-go-back",
flag_descriptions::kAshSwipingFromLeftEdgeToGoBackName,
flag_descriptions::kAshSwipingFromLeftEdgeToGoBackDescription, kOsCrOS,
FEATURE_VALUE_TYPE(ash::features::kSwipingFromLeftEdgeToGoBack)},

{"use-fake-device-for-media-stream",
flag_descriptions::kUseFakeDeviceForMediaStreamName,
flag_descriptions::kUseFakeDeviceForMediaStreamDescription, kOsCrOS,
Expand Down

0 comments on commit 208e0ec

Please sign in to comment.