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

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

Issue 1755223002: Adds WindowManagerManager to mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge and WindowManagerState 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_manager_access_policy.cc
diff --git a/components/mus/ws/window_manager_access_policy.cc b/components/mus/ws/window_manager_access_policy.cc
index b69a53fb1e0906e1ade9b98b53083b716e0f6c79..ccc5868b4b48cd1314582bec1dff1df568aad071 100644
--- a/components/mus/ws/window_manager_access_policy.cc
+++ b/components/mus/ws/window_manager_access_policy.cc
@@ -71,9 +71,11 @@ bool WindowManagerAccessPolicy::CanEmbed(const ServerWindow* window,
bool WindowManagerAccessPolicy::CanChangeWindowVisibility(
const ServerWindow* window) const {
- // The WindowManager can change the visibility of the root too.
- return window->id().connection_id == connection_id_ ||
- (window->GetRoot() == window);
+ if (window->id().connection_id == connection_id_)
+ return true;
+ // The WindowManager can change the visibility of the WindowManager root.
+ const ServerWindow* root = window->GetRoot();
+ return root && window->parent() == root;
}
bool WindowManagerAccessPolicy::CanSetWindowSurface(
« no previous file with comments | « components/mus/ws/connection_manager_delegate.h ('k') | components/mus/ws/window_manager_factory_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698