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

Unified Diff: components/mus/public/cpp/lib/window.cc

Issue 1784573002: mus: Client-side implementation of modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b548402_modal_windows_server
Patch Set: Created 4 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: 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, &notifier);
« no previous file with comments | « components/mus/public/cpp/lib/in_flight_change.h ('k') | components/mus/public/cpp/lib/window_tree_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698