| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/mus/bridge/wm_window_mus.h" | 5 #include "ash/mus/bridge/wm_window_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/wm/container_finder.h" | 7 #include "ash/common/wm/container_finder.h" |
| 8 #include "ash/common/wm/window_positioning_utils.h" | 8 #include "ash/common/wm/window_positioning_utils.h" |
| 9 #include "ash/common/wm/window_state.h" | 9 #include "ash/common/wm/window_state.h" |
| 10 #include "ash/common/wm_layout_manager.h" | 10 #include "ash/common/wm_layout_manager.h" |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 return WmShellMus::GetToplevelAncestor(window_); | 437 return WmShellMus::GetToplevelAncestor(window_); |
| 438 } | 438 } |
| 439 | 439 |
| 440 void WmWindowMus::SetParentUsingContext(WmWindow* context, | 440 void WmWindowMus::SetParentUsingContext(WmWindow* context, |
| 441 const gfx::Rect& screen_bounds) { | 441 const gfx::Rect& screen_bounds) { |
| 442 wm::GetDefaultParent(context, this, screen_bounds)->AddChild(this); | 442 wm::GetDefaultParent(context, this, screen_bounds)->AddChild(this); |
| 443 } | 443 } |
| 444 | 444 |
| 445 void WmWindowMus::AddChild(WmWindow* window) { | 445 void WmWindowMus::AddChild(WmWindow* window) { |
| 446 window_->AddChild(GetMusWindow(window)); | 446 window_->AddChild(GetMusWindow(window)); |
| 447 // If the child window does not have a native widget mus |
| 448 // (and thus does not have an aura window), then we create a layer with its |
| 449 // surface Id. |
| 447 } | 450 } |
| 448 | 451 |
| 449 void WmWindowMus::RemoveChild(WmWindow* child) { | 452 void WmWindowMus::RemoveChild(WmWindow* child) { |
| 450 window_->RemoveChild(GetMusWindow(child)); | 453 window_->RemoveChild(GetMusWindow(child)); |
| 451 } | 454 } |
| 452 | 455 |
| 453 const WmWindow* WmWindowMus::GetParent() const { | 456 const WmWindow* WmWindowMus::GetParent() const { |
| 454 return Get(window_->parent()); | 457 return Get(window_->parent()); |
| 455 } | 458 } |
| 456 | 459 |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 929 } | 932 } |
| 930 | 933 |
| 931 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, | 934 void WmWindowMus::OnTransientChildRemoved(ui::Window* window, |
| 932 ui::Window* transient) { | 935 ui::Window* transient) { |
| 933 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, | 936 FOR_EACH_OBSERVER(WmTransientWindowObserver, transient_observers_, |
| 934 OnTransientChildRemoved(this, Get(transient))); | 937 OnTransientChildRemoved(this, Get(transient))); |
| 935 } | 938 } |
| 936 | 939 |
| 937 } // namespace mus | 940 } // namespace mus |
| 938 } // namespace ash | 941 } // namespace ash |
| OLD | NEW |