Remove --ash-enable-mirrored-screen flag

Bug: 924322
Test: None
Change-Id: Ief0e8239031f82984c48f08dbf332584f67c5b48
Reviewed-on: https://chromium-review.googlesource.com/c/1428839
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625385}
diff --git a/ash/display/root_window_transformers.cc b/ash/display/root_window_transformers.cc
index 0e0bd29..54c4932 100644
--- a/ash/display/root_window_transformers.cc
+++ b/ash/display/root_window_transformers.cc
@@ -55,13 +55,6 @@
   return transform;
 }
 
-gfx::Transform CreateMirrorTransform(const display::Display& display) {
-  gfx::Transform transform;
-  transform.matrix().set3x3(-1, 0, 0, 0, 1, 0, 0, 0, 1);
-  transform.Translate(-display.size().width(), 0);
-  return transform;
-}
-
 // RootWindowTransformer for ash environment.
 class AshRootWindowTransformer : public RootWindowTransformer {
  public:
@@ -75,14 +68,6 @@
         CreateInsetsAndScaleTransform(host_insets_,
                                       display.device_scale_factor()) *
         CreateRootWindowRotationTransform(root, display);
-    if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-            switches::kAshEnableMirroredScreen)) {
-      // Apply the transform that flips the screen image horizontally so that
-      // the screen looks normal when reflected on a mirror.
-      root_window_bounds_transform_ =
-          root_window_bounds_transform_ * CreateMirrorTransform(display);
-    }
-
     transform_ = root_window_bounds_transform_;
     MagnificationController* magnifier =
         Shell::Get()->magnification_controller();
diff --git a/ash/public/cpp/ash_switches.cc b/ash/public/cpp/ash_switches.cc
index 75002f7..e4c1dbb 100644
--- a/ash/public/cpp/ash_switches.cc
+++ b/ash/public/cpp/ash_switches.cc
@@ -53,9 +53,6 @@
 // Enable the wayland server.
 const char kAshEnableWaylandServer[] = "enable-wayland-server";
 
-// Enables mirrored screen.
-const char kAshEnableMirroredScreen[] = "ash-enable-mirrored-screen";
-
 // Enables the stylus tools next to the status area.
 const char kAshForceEnableStylusTools[] = "force-enable-stylus-tools";
 
diff --git a/ash/public/cpp/ash_switches.h b/ash/public/cpp/ash_switches.h
index fa95f8d..76ae978 100644
--- a/ash/public/cpp/ash_switches.h
+++ b/ash/public/cpp/ash_switches.h
@@ -27,7 +27,6 @@
 ASH_PUBLIC_EXPORT extern const char kAshEnablePaletteOnAllDisplays[];
 ASH_PUBLIC_EXPORT extern const char kAshEnableTabletMode[];
 ASH_PUBLIC_EXPORT extern const char kAshEnableWaylandServer[];
-ASH_PUBLIC_EXPORT extern const char kAshEnableMirroredScreen[];
 ASH_PUBLIC_EXPORT extern const char kAshForceEnableStylusTools[];
 ASH_PUBLIC_EXPORT extern const char kAshPowerButtonPosition[];
 ASH_PUBLIC_EXPORT extern const char kAshUiMode[];
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index a6b700c..2477982 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1636,13 +1636,6 @@
         kOsAll,
         SINGLE_VALUE_TYPE(ash::switches::kAshDebugShortcuts),
     },
-    {
-        "ash-enable-mirrored-screen",
-        flag_descriptions::kAshEnableMirroredScreenName,
-        flag_descriptions::kAshEnableMirroredScreenDescription,
-        kOsCrOS,
-        SINGLE_VALUE_TYPE(ash::switches::kAshEnableMirroredScreen),
-    },
     {"ash-shelf-color", flag_descriptions::kAshShelfColorName,
      flag_descriptions::kAshShelfColorDescription, kOsCrOS,
      MULTI_VALUE_TYPE(kAshShelfColorChoices)},
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index 91b5314..a24a1f5 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -168,11 +168,6 @@
     "expiry_milestone": 76
   },
   {
-    "name": "ash-enable-mirrored-screen",
-    // "owners": [ "your-team" ],
-    "expiry_milestone": 76
-  },
-  {
     "name": "ash-enable-night-light",
     // "owners": [ "your-team" ],
     "expiry_milestone": 76
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 1eca30c..648de18 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3107,11 +3107,6 @@
 const char kAshEnableDisplayMoveWindowAccelsDescription[] =
     "Enable shortcuts for moving window between displays.";
 
-const char kAshEnableMirroredScreenName[] = "Enable mirrored screen mode.";
-const char kAshEnableMirroredScreenDescription[] =
-    "Enable the mirrored screen mode. This mode flips the screen image "
-    "horizontally.";
-
 const char kAshEnablePersistentWindowBoundsName[] =
     "Enable persistent window bounds in multi-displays scenario.";
 const char kAshEnablePersistentWindowBoundsDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index efb270b..3138fd9 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1861,9 +1861,6 @@
 extern const char kAshEnableDisplayMoveWindowAccelsName[];
 extern const char kAshEnableDisplayMoveWindowAccelsDescription[];
 
-extern const char kAshEnableMirroredScreenName[];
-extern const char kAshEnableMirroredScreenDescription[];
-
 extern const char kAshEnablePersistentWindowBoundsName[];
 extern const char kAshEnablePersistentWindowBoundsDescription[];