Index: components/mus/public/cpp/lib/window.cc |
diff --git a/components/mus/public/cpp/lib/window.cc b/components/mus/public/cpp/lib/window.cc |
index 04dee4a4d47cd24aab391e551c4cc23d5aaeab9f..c2f459588c0a3a9f16e79e86c0990b3161641231 100644 |
--- a/components/mus/public/cpp/lib/window.cc |
+++ b/components/mus/public/cpp/lib/window.cc |
@@ -346,6 +346,12 @@ void Window::RemoveTransientWindow(Window* transient_window) { |
tree_client()->RemoveTransientWindowFromParent(transient_window); |
} |
+void Window::SetModal() { |
+ LocalSetModal(); |
sky
2016/03/10 00:21:43
Early out if already modal.
mohsen
2016/03/10 03:23:16
Done.
|
+ if (connection_) |
+ tree_client()->SetModal(this); |
+} |
+ |
Window* Window::GetChildById(Id id) { |
if (id == id_) |
return this; |
@@ -493,6 +499,7 @@ Window::Window(WindowTreeConnection* connection, Id id) |
parent_(nullptr), |
stacking_target_(nullptr), |
transient_parent_(nullptr), |
+ is_modal_(false), |
input_event_handler_(nullptr), |
viewport_metrics_(CreateEmptyViewportMetrics()), |
visible_(false), |
@@ -588,6 +595,10 @@ void Window::LocalRemoveTransientWindow(Window* transient_window) { |
// TODO(fsamuel): We might want a notification here. |
} |
+void Window::LocalSetModal() { |
+ is_modal_ = true; |
+} |
+ |
bool Window::LocalReorder(Window* relative, mojom::OrderDirection direction) { |
OrderChangedNotifier notifier(this, relative, direction); |
return ReorderImpl(this, relative, direction, ¬ifier); |