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

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

Issue 1462123002: views/mus: Set-up transient windows correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month 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
« no previous file with comments | « components/mus/public/cpp/window_property.h ('k') | components/web_view/frame.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/default_access_policy.cc
diff --git a/components/mus/ws/default_access_policy.cc b/components/mus/ws/default_access_policy.cc
index 0a9cb241599f5832039db490b27f42fcffa3a0b2..ed10779bd6824267e9f537c39ee61106acff385d 100644
--- a/components/mus/ws/default_access_policy.cc
+++ b/components/mus/ws/default_access_policy.cc
@@ -37,18 +37,16 @@ bool DefaultAccessPolicy::CanAddWindow(const ServerWindow* parent,
bool DefaultAccessPolicy::CanAddTransientWindow(
const ServerWindow* parent,
const ServerWindow* child) const {
- return WasCreatedByThisConnection(child) &&
- (delegate_->IsRootForAccessPolicy(parent->id()) ||
- WasCreatedByThisConnection(parent));
+ return WasCreatedByThisConnection(child) ||
+ delegate_->IsRootForAccessPolicy(parent->id()) ||
sky 2015/11/19 20:32:10 Thsi policy, and remove, is too loose. In particul
sadrul 2015/11/19 20:43:58 In the window_type_launcher demo, trying to open a
sky 2015/11/19 21:27:14 That implies you're trying to use a window from on
+ WasCreatedByThisConnection(parent);
}
bool DefaultAccessPolicy::CanRemoveTransientWindowFromParent(
const ServerWindow* window) const {
- if (!WasCreatedByThisConnection(window))
- return false; // Can only unparent windows we created.
-
return delegate_->IsRootForAccessPolicy(window->transient_parent()->id()) ||
- WasCreatedByThisConnection(window->transient_parent());
+ WasCreatedByThisConnection(window->transient_parent()) ||
+ WasCreatedByThisConnection(window);
}
bool DefaultAccessPolicy::CanReorderWindow(
« no previous file with comments | « components/mus/public/cpp/window_property.h ('k') | components/web_view/frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698