Chromium Code Reviews| 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( |