| 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..707878458d73507cc44954ec6c58585b8f68bd51 100644
|
| --- a/components/mus/public/cpp/lib/window.cc
|
| +++ b/components/mus/public/cpp/lib/window.cc
|
| @@ -346,6 +346,15 @@ void Window::RemoveTransientWindow(Window* transient_window) {
|
| tree_client()->RemoveTransientWindowFromParent(transient_window);
|
| }
|
|
|
| +void Window::SetModal() {
|
| + if (is_modal_)
|
| + return;
|
| +
|
| + LocalSetModal();
|
| + if (connection_)
|
| + tree_client()->SetModal(this);
|
| +}
|
| +
|
| Window* Window::GetChildById(Id id) {
|
| if (id == id_)
|
| return this;
|
| @@ -493,6 +502,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 +598,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);
|
|
|