Commit 765bd749 authored by Qiang Xu's avatar Qiang Xu Committed by Commit Bot

cros: remove ash-enable-display-move-window-accels flag

Feature is landed in M66. Now we can remove the flag in M69.

Bug: 778438
Test: manual
Cq-Include-Trybots: luci.chromium.try:closure_compilation
Change-Id: Icd56cda2c4cd61677f4724c11ccf4b946eae24ae
Reviewed-on: https://chromium-review.googlesource.com/1113077Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Qiang Xu <warx@google.com>
Cr-Commit-Position: refs/heads/master@{#570284}
parent 32c040d6
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <array> #include <array>
#include "ash/accessibility/accessibility_controller.h" #include "ash/accessibility/accessibility_controller.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/wm/mru_window_tracker.h" #include "ash/wm/mru_window_tracker.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
...@@ -47,8 +46,6 @@ aura::Window* GetTargetWindow() { ...@@ -47,8 +46,6 @@ aura::Window* GetTargetWindow() {
} // namespace } // namespace
bool CanHandleMoveActiveWindowBetweenDisplays() { bool CanHandleMoveActiveWindowBetweenDisplays() {
if (!features::IsDisplayMoveWindowAccelsEnabled())
return false;
display::DisplayManager* display_manager = Shell::Get()->display_manager(); display::DisplayManager* display_manager = Shell::Get()->display_manager();
// Accelerators to move window between displays on unified desktop mode and // Accelerators to move window between displays on unified desktop mode and
// mirror mode is disabled. // mirror mode is disabled.
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "ash/accelerators/accelerator_table.h" #include "ash/accelerators/accelerator_table.h"
#include "ash/accessibility/accessibility_controller.h" #include "ash/accessibility/accessibility_controller.h"
#include "ash/accessibility/test_accessibility_controller_client.h" #include "ash/accessibility/test_accessibility_controller_client.h"
#include "ash/public/cpp/ash_features.h"
#include "ash/root_window_controller.h" #include "ash/root_window_controller.h"
#include "ash/screen_util.h" #include "ash/screen_util.h"
#include "ash/shelf/shelf_constants.h" #include "ash/shelf/shelf_constants.h"
...@@ -20,7 +19,6 @@ ...@@ -20,7 +19,6 @@
#include "ash/wm/wm_event.h" #include "ash/wm/wm_event.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/test/scoped_feature_list.h"
#include "ui/aura/test/test_windows.h" #include "ui/aura/test/test_windows.h"
#include "ui/display/display.h" #include "ui/display/display.h"
#include "ui/display/display_layout.h" #include "ui/display/display_layout.h"
...@@ -69,24 +67,7 @@ void PerformMoveWindowAccel() { ...@@ -69,24 +67,7 @@ void PerformMoveWindowAccel() {
} // namespace } // namespace
class DisplayMoveWindowUtilTest : public AshTestBase { using DisplayMoveWindowUtilTest = AshTestBase;
protected:
DisplayMoveWindowUtilTest() = default;
~DisplayMoveWindowUtilTest() override = default;
// AshTestBase:
void SetUp() override {
// Explicitly enable the display move window accels feature for the tests.
scoped_feature_list_.InitAndEnableFeature(
features::kDisplayMoveWindowAccels);
AshTestBase::SetUp();
}
private:
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(DisplayMoveWindowUtilTest);
};
TEST_F(DisplayMoveWindowUtilTest, SingleDisplay) { TEST_F(DisplayMoveWindowUtilTest, SingleDisplay) {
aura::Window* window = aura::Window* window =
......
...@@ -27,11 +27,9 @@ class PersistentWindowControllerTest : public AshTestBase { ...@@ -27,11 +27,9 @@ class PersistentWindowControllerTest : public AshTestBase {
// AshTestBase: // AshTestBase:
void SetUp() override { void SetUp() override {
// Explicitly enable persistent window bounds and displays move window // Explicitly enable persistent window bounds feature for the tests.
// accels features for the tests. scoped_feature_list_.InitAndEnableFeature(
scoped_feature_list_.InitWithFeatures( features::kPersistentWindowBounds);
{features::kPersistentWindowBounds, features::kDisplayMoveWindowAccels},
{});
AshTestBase::SetUp(); AshTestBase::SetUp();
} }
......
...@@ -10,9 +10,6 @@ ...@@ -10,9 +10,6 @@
namespace ash { namespace ash {
namespace features { namespace features {
const base::Feature kDisplayMoveWindowAccels{"DisplayMoveWindowAccels",
base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kDockedMagnifier{"DockedMagnifier", const base::Feature kDockedMagnifier{"DockedMagnifier",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
...@@ -50,10 +47,6 @@ const base::Feature kTrilinearFiltering{"TrilinearFiltering", ...@@ -50,10 +47,6 @@ const base::Feature kTrilinearFiltering{"TrilinearFiltering",
const base::Feature kViewsLogin{"ViewsLogin", base::FEATURE_ENABLED_BY_DEFAULT}; const base::Feature kViewsLogin{"ViewsLogin", base::FEATURE_ENABLED_BY_DEFAULT};
bool IsDisplayMoveWindowAccelsEnabled() {
return base::FeatureList::IsEnabled(kDisplayMoveWindowAccels);
}
bool IsDockedMagnifierEnabled() { bool IsDockedMagnifierEnabled() {
return base::FeatureList::IsEnabled(kDockedMagnifier); return base::FeatureList::IsEnabled(kDockedMagnifier);
} }
......
...@@ -11,11 +11,6 @@ ...@@ -11,11 +11,6 @@
namespace ash { namespace ash {
namespace features { namespace features {
// Enables the keyboard shortcut to move active window between displays.
// TODO(warx): Remove this after the feature is fully launched.
// https://crbug.com/773749.
ASH_PUBLIC_EXPORT extern const base::Feature kDisplayMoveWindowAccels;
// Enables the docked (a.k.a. picture-in-picture) magnifier. // Enables the docked (a.k.a. picture-in-picture) magnifier.
// TODO(afakhry): Remove this after the feature is fully launched. // TODO(afakhry): Remove this after the feature is fully launched.
// https://crbug.com/709824. // https://crbug.com/709824.
...@@ -69,8 +64,6 @@ ASH_PUBLIC_EXPORT extern const base::Feature kTrilinearFiltering; ...@@ -69,8 +64,6 @@ ASH_PUBLIC_EXPORT extern const base::Feature kTrilinearFiltering;
// Enables views login. // Enables views login.
ASH_PUBLIC_EXPORT extern const base::Feature kViewsLogin; ASH_PUBLIC_EXPORT extern const base::Feature kViewsLogin;
ASH_PUBLIC_EXPORT bool IsDisplayMoveWindowAccelsEnabled();
ASH_PUBLIC_EXPORT bool IsDockedMagnifierEnabled(); ASH_PUBLIC_EXPORT bool IsDockedMagnifierEnabled();
ASH_PUBLIC_EXPORT bool IsKeyboardShortcutViewerEnabled(); ASH_PUBLIC_EXPORT bool IsKeyboardShortcutViewerEnabled();
......
...@@ -59,7 +59,6 @@ ASH_PUBLIC_EXPORT extern const char kShowWebUiLogin[]; ...@@ -59,7 +59,6 @@ ASH_PUBLIC_EXPORT extern const char kShowWebUiLogin[];
ASH_PUBLIC_EXPORT extern const char kSuppressMessageCenterPopups[]; ASH_PUBLIC_EXPORT extern const char kSuppressMessageCenterPopups[];
ASH_PUBLIC_EXPORT extern const char kTouchscreenUsableWhileScreenOff[]; ASH_PUBLIC_EXPORT extern const char kTouchscreenUsableWhileScreenOff[];
ASH_PUBLIC_EXPORT bool IsDisplayMoveWindowAccelsEnabled();
ASH_PUBLIC_EXPORT bool IsSidebarEnabled(); ASH_PUBLIC_EXPORT bool IsSidebarEnabled();
ASH_PUBLIC_EXPORT bool IsTrilinearFilteringEnabled(); ASH_PUBLIC_EXPORT bool IsTrilinearFilteringEnabled();
ASH_PUBLIC_EXPORT bool IsUsingViewsLock(); ASH_PUBLIC_EXPORT bool IsUsingViewsLock();
......
...@@ -3515,11 +3515,6 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -3515,11 +3515,6 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(features::kStopInBackground)}, FEATURE_VALUE_TYPE(features::kStopInBackground)},
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
{"ash-enable-display-move-window-accels",
flag_descriptions::kAshEnableDisplayMoveWindowAccelsName,
flag_descriptions::kAshEnableDisplayMoveWindowAccelsDescription, kOsCrOS,
FEATURE_VALUE_TYPE(ash::features::kDisplayMoveWindowAccels)},
{"ash-enable-keyboard-shortcut-viewer", {"ash-enable-keyboard-shortcut-viewer",
flag_descriptions::kAshEnableKeyboardShortcutViewerName, flag_descriptions::kAshEnableKeyboardShortcutViewerName,
flag_descriptions::kAshEnableKeyboardShortcutViewerDescription, kOsCrOS, flag_descriptions::kAshEnableKeyboardShortcutViewerDescription, kOsCrOS,
......
...@@ -289,15 +289,6 @@ function isVoiceInteractionEnabled() { ...@@ -289,15 +289,6 @@ function isVoiceInteractionEnabled() {
return loadTimeData.getBoolean('voiceInteractionEnabled'); return loadTimeData.getBoolean('voiceInteractionEnabled');
} }
/**
* Tests if accelerators for moving window between displays are enabled.
* @return {boolean} True if accelerators for moving window between displays
* feature is enabled.
*/
function isDisplayMoveWindowAccelsEnabled() {
return loadTimeData.getBoolean('displayMoveWindowAccelsEnabled');
}
/** /**
* Converts a single hex number to a character. * Converts a single hex number to a character.
* @param {string} hex Hexadecimal string. * @param {string} hex Hexadecimal string.
...@@ -615,14 +606,6 @@ function update(modifiers, normModifiers) { ...@@ -615,14 +606,6 @@ function update(modifiers, normModifiers) {
if (shortcutId == 'keyboardOverlayToggleDictation') if (shortcutId == 'keyboardOverlayToggleDictation')
continue; continue;
if ((shortcutId == 'keyboardOverlayMoveWindowToBelowDisplay' ||
shortcutId == 'keyboardOverlayMoveWindowToLeftDisplay' ||
shortcutId == 'keyboardOverlayMoveWindowToRightDisplay' ||
shortcutId == 'keyboardOverlayMoveWindowToAboveDisplay') &&
!isDisplayMoveWindowAccelsEnabled()) {
continue;
}
if (shortcutId) { if (shortcutId) {
classes.push('is-shortcut'); classes.push('is-shortcut');
classes.push('keyboard-overlay-shortcut-key-background'); classes.push('keyboard-overlay-shortcut-key-background');
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <memory> #include <memory>
#include "ash/public/cpp/ash_features.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/bind_helpers.h" #include "base/bind_helpers.h"
...@@ -341,8 +340,6 @@ content::WebUIDataSource* CreateKeyboardOverlayUIHTMLSource(Profile* profile) { ...@@ -341,8 +340,6 @@ content::WebUIDataSource* CreateKeyboardOverlayUIHTMLSource(Profile* profile) {
TopRowKeysAreFunctionKeys(profile)); TopRowKeysAreFunctionKeys(profile));
source->AddBoolean("voiceInteractionEnabled", source->AddBoolean("voiceInteractionEnabled",
chromeos::switches::IsVoiceInteractionEnabled()); chromeos::switches::IsVoiceInteractionEnabled());
source->AddBoolean("displayMoveWindowAccelsEnabled",
ash::features::IsDisplayMoveWindowAccelsEnabled());
source->AddBoolean("keyboardOverlayUsesLayout2", source->AddBoolean("keyboardOverlayUsesLayout2",
ui::DeviceUsesKeyboardLayout2()); ui::DeviceUsesKeyboardLayout2());
ash::Shell* shell = ash::Shell::Get(); ash::Shell* shell = ash::Shell::Get();
......
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