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

Unified Diff: services/ui/ws/server_window.cc

Issue 2710023007: Make WindowTree::SetModal() take the type. (Closed)
Patch Set: Don't check for system modal when AddTransientWindow(). Created 3 years, 9 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: services/ui/ws/server_window.cc
diff --git a/services/ui/ws/server_window.cc b/services/ui/ws/server_window.cc
index 42bdcabe12da571c52464d0df497c47a9aa6b312..eec4a6b224bb0fc5bdb47bfd978f486ddca69ed1 100644
--- a/services/ui/ws/server_window.cc
+++ b/services/ui/ws/server_window.cc
@@ -30,7 +30,7 @@ ServerWindow::ServerWindow(ServerWindowDelegate* delegate,
parent_(nullptr),
stacking_target_(nullptr),
transient_parent_(nullptr),
- is_modal_(false),
+ modal_type_(MODAL_TYPE_NONE),
visible_(false),
// Default to POINTER as CURSOR_NULL doesn't change the cursor, it leaves
// the last non-null cursor.
@@ -228,10 +228,6 @@ ServerWindow* ServerWindow::GetChildWindow(const WindowId& window_id) {
}
bool ServerWindow::AddTransientWindow(ServerWindow* child) {
- // A system modal window cannot become a transient child.
- if (child->is_modal() && !child->transient_parent())
Hadi 2017/03/06 20:07:05 I am not sure if we should have retained this chec
- return false;
-
if (child->transient_parent())
child->transient_parent()->RemoveTransientWindow(child);
@@ -268,8 +264,8 @@ void ServerWindow::RemoveTransientWindow(ServerWindow* child) {
observer.OnTransientWindowRemoved(this, child);
}
-void ServerWindow::SetModal() {
- is_modal_ = true;
+void ServerWindow::SetModalType(ModalType modal_type) {
+ modal_type_ = modal_type;
}
bool ServerWindow::Contains(const ServerWindow* window) const {

Powered by Google App Engine
This is Rietveld 408576698