Chromium Code Reviews| Index: ash/aura/wm_window_aura.cc |
| diff --git a/ash/aura/wm_window_aura.cc b/ash/aura/wm_window_aura.cc |
| index 68ea03acac6d95fe48629e9f08b351ef67a34b5f..56b3c700d6e27f2794d135d7a831d8fb876ffa8d 100644 |
| --- a/ash/aura/wm_window_aura.cc |
| +++ b/ash/aura/wm_window_aura.cc |
| @@ -26,6 +26,7 @@ |
| #include "ash/wm/window_util.h" |
| #include "base/memory/ptr_util.h" |
| #include "ui/aura/client/aura_constants.h" |
| +#include "ui/aura/client/focus_client.h" |
| #include "ui/aura/client/window_tree_client.h" |
| #include "ui/aura/layout_manager.h" |
| #include "ui/aura/window.h" |
| @@ -368,7 +369,7 @@ void WmWindowAura::AddChild(WmWindow* window) { |
| window_->AddChild(GetAuraWindow(window)); |
| } |
| -WmWindow* WmWindowAura::GetParent() { |
| +const WmWindow* WmWindowAura::GetParent() const { |
| return Get(window_->parent()); |
| } |
| @@ -554,6 +555,10 @@ void WmWindowAura::SetLockedToRoot(bool value) { |
| window_->SetProperty(kStayInSameRootWindowKey, value); |
| } |
| +bool WmWindowAura::IsLockedToRoot() const { |
| + return window_->GetProperty(kStayInSameRootWindowKey); |
|
James Cook
2016/09/15 16:31:40
It's a little weird that many of the functions are
sky
2016/09/15 17:35:03
I went with LockedToRoot everywhere.
|
| +} |
| + |
| void WmWindowAura::SetCapture() { |
| window_->SetCapture(); |
| } |
| @@ -627,6 +632,10 @@ void WmWindowAura::CloseWidget() { |
| GetInternalWidget()->Close(); |
| } |
| +void WmWindowAura::SetFocused() { |
| + aura::client::GetFocusClient(window_)->FocusWindow(window_); |
| +} |
| + |
| bool WmWindowAura::IsFocused() const { |
| return window_->HasFocus(); |
| } |
| @@ -720,10 +729,6 @@ void WmWindowAura::SetChildrenUseExtendedHitRegion() { |
| window_, mouse_extend, touch_extend)); |
| } |
| -void WmWindowAura::SetDescendantsStayInSameRootWindow(bool value) { |
| - window_->SetProperty(kStayInSameRootWindowKey, true); |
| -} |
| - |
| std::unique_ptr<views::View> WmWindowAura::CreateViewWithRecreatedLayers() { |
| return base::MakeUnique<wm::WindowMirrorView>(this); |
| } |