Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: components/mus/ws/server_window.cc

Issue 1818333002: Reland: mus: Enable system modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned up comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/mus/ws/server_window.cc
diff --git a/components/mus/ws/server_window.cc b/components/mus/ws/server_window.cc
index eeb5d7d44929e0275c949faff176438dcd2b5b56..7ee5df9a0447233e4bff95a29b5c95d7e1056353 100644
--- a/components/mus/ws/server_window.cc
+++ b/components/mus/ws/server_window.cc
@@ -229,6 +229,9 @@ ServerWindow* ServerWindow::GetChildWindow(const WindowId& window_id) {
}
void ServerWindow::AddTransientWindow(ServerWindow* child) {
+ // A system modal window cannot become a transient child.
+ DCHECK(!child->is_modal() || child->transient_parent());
+
if (child->transient_parent())
child->transient_parent()->RemoveTransientWindow(child);

Powered by Google App Engine
This is Rietveld 408576698