Index: ui/display/display_list.cc |
diff --git a/ui/views/mus/display_list.cc b/ui/display/display_list.cc |
similarity index 93% |
rename from ui/views/mus/display_list.cc |
rename to ui/display/display_list.cc |
index 5be844ca52f3043b3fdaa37f8882e8798d7c6c74..7b0f8d755ef94ffc9594c584b140e3964cd7de64 100644 |
--- a/ui/views/mus/display_list.cc |
+++ b/ui/display/display_list.cc |
@@ -2,12 +2,11 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "ui/views/mus/display_list.h" |
+#include "ui/display/display_list.h" |
-#include "ui/display/display_finder.h" |
#include "ui/display/display_observer.h" |
-namespace views { |
+namespace display { |
DisplayList::DisplayList() {} |
@@ -93,8 +92,8 @@ void DisplayList::RemoveDisplay(int64_t id) { |
auto iter = FindDisplayById(id); |
DCHECK(displays_.end() != iter); |
if (primary_display_index_ == static_cast<int>(iter - displays_.begin())) { |
- // We expect the primary to change before removing it. The only case we |
- // allow removal of the primary is if it is the list display. |
+ // The primary display can only be removed if it is the last display. |
+ // Users must choose a new primary before removing an old primary display. |
DCHECK_EQ(1u, displays_.size()); |
primary_display_index_ = -1; |
} else if (primary_display_index_ > |
@@ -106,4 +105,4 @@ void DisplayList::RemoveDisplay(int64_t id) { |
FOR_EACH_OBSERVER(display::DisplayObserver, observers_, |
OnDisplayRemoved(display)); |
} |
-} // namespace views |
+} // namespace display |