Move login windows to/from unified desktop. This is necessary because in Unified desktop mode, the WTF for primary display gets recreated.

A few cleanups:
* Removed DisplayManager::multi_display_mode() and use IsInUnifiedMode() instead. It simply meant that it will use UNIFIED mode when there are two displays, and it's hard to use it correctly.

* Moved software_mirroring_enabled() to private, and changed clients to use SoftwareMirroringEnable() instead.

* Moved SetDefaultMultiDisplayMode to test api

* Removed unused function decl and unnecessary comment.

BUG=365662
TEST=RootWindowControllerTest.MoveWindows_LockWindowsInUnified

Review URL: https://codereview.chromium.org/1120563002

Cr-Commit-Position: refs/heads/master@{#327842}
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 3bb279b..bbe4210 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -162,9 +162,24 @@
       kShellWindowId_SystemModalContainer,
       kShellWindowId_LockSystemModalContainer,
       kShellWindowId_UnparentedControlContainer,
-      kShellWindowId_OverlayContainer, };
-  for (size_t i = 0; i < arraysize(kContainerIdsToMove); i++) {
-    int id = kContainerIdsToMove[i];
+      kShellWindowId_OverlayContainer,
+  };
+  const int kExtraContainerIdsToMoveInUnifiedMode[] = {
+      kShellWindowId_LockScreenContainer,
+      kShellWindowId_LockScreenBackgroundContainer,
+  };
+  std::vector<int> container_ids(
+      kContainerIdsToMove,
+      kContainerIdsToMove + arraysize(kContainerIdsToMove));
+  // Check the default_multi_display_mode because this is also necessary
+  // in trasition between mirror <-> unified mode.
+  if (Shell::GetInstance()->display_manager()->default_multi_display_mode() ==
+      DisplayManager::UNIFIED) {
+    for (int id : kExtraContainerIdsToMoveInUnifiedMode)
+      container_ids.push_back(id);
+  }
+
+  for (int id : container_ids) {
     aura::Window* src_container = Shell::GetContainer(src, id);
     aura::Window* dst_container = Shell::GetContainer(dst, id);
     while (!src_container->children().empty()) {