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

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

Issue 1759523002: mus: Server-side implementation of modal windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/window_tree_impl.cc
diff --git a/components/mus/ws/window_tree_impl.cc b/components/mus/ws/window_tree_impl.cc
index f144d3ad60930d06e3a3a554adb700ffdf16a8fb..b57cfd7ded361e705c599be51e1dba3b3a4c362d 100644
--- a/components/mus/ws/window_tree_impl.cc
+++ b/components/mus/ws/window_tree_impl.cc
@@ -228,6 +228,16 @@ bool WindowTreeImpl::AddTransientWindow(
return false;
}
+bool WindowTreeImpl::SetAsModal(const ClientWindowId& window_id) {
+ ServerWindow* window = GetWindowByClientId(window_id);
sky 2016/03/02 18:28:33 Add to the access policy where this operation is a
mohsen 2016/03/03 22:54:59 Added to the access policy. However, do we also ne
sky 2016/03/03 23:50:39 Seems like we want clients making any random windo
mohsen 2016/03/04 16:24:17 I see. I plan to implement modal systems in a foll
+ if (window) {
+ Operation op(this, connection_manager_, OperationType::SET_AS_MODAL);
sky 2016/03/02 18:28:33 As you don't send any sort of notification out you
mohsen 2016/03/03 22:54:59 Right. Removed.
+ window->SetAsModal();
+ return true;
+ }
+ return false;
+}
+
std::vector<const ServerWindow*> WindowTreeImpl::GetWindowTree(
const ClientWindowId& window_id) const {
const ServerWindow* window = GetWindowByClientId(window_id);
@@ -980,6 +990,10 @@ void WindowTreeImpl::RemoveTransientWindowFromParent(uint32_t change_id,
client_->OnChangeCompleted(change_id, success);
}
+void WindowTreeImpl::SetAsModal(uint32_t change_id, Id window_id) {
+ client_->OnChangeCompleted(change_id, SetAsModal(ClientWindowId(window_id)));
+}
+
void WindowTreeImpl::ReorderWindow(uint32_t change_id,
Id window_id,
Id relative_window_id,
« components/mus/ws/event_dispatcher.cc ('K') | « components/mus/ws/window_tree_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698