| 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_state.h" | 8 #include "ash/common/wm/window_state.h" |
| 9 #include "ash/common/wm_layout_manager.h" | 9 #include "ash/common/wm_layout_manager.h" |
| 10 #include "ash/common/wm_window_observer.h" | 10 #include "ash/common/wm_window_observer.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 const WmRootWindowControllerMus* WmWindowMus::GetRootWindowControllerMus() | 148 const WmRootWindowControllerMus* WmWindowMus::GetRootWindowControllerMus() |
| 149 const { | 149 const { |
| 150 return WmRootWindowControllerMus::Get(window_->GetRoot()); | 150 return WmRootWindowControllerMus::Get(window_->GetRoot()); |
| 151 } | 151 } |
| 152 | 152 |
| 153 bool WmWindowMus::ShouldUseExtendedHitRegion() const { | 153 bool WmWindowMus::ShouldUseExtendedHitRegion() const { |
| 154 const WmWindowMus* parent = Get(window_->parent()); | 154 const WmWindowMus* parent = Get(window_->parent()); |
| 155 return parent && parent->children_use_extended_hit_region_; | 155 return parent && parent->children_use_extended_hit_region_; |
| 156 } | 156 } |
| 157 | 157 |
| 158 bool WmWindowMus::IsContainer() const { |
| 159 return GetShellWindowId() != kShellWindowId_Invalid; |
| 160 } |
| 161 |
| 158 const WmWindow* WmWindowMus::GetRootWindow() const { | 162 const WmWindow* WmWindowMus::GetRootWindow() const { |
| 159 return Get(window_->GetRoot()); | 163 return Get(window_->GetRoot()); |
| 160 } | 164 } |
| 161 | 165 |
| 162 WmRootWindowController* WmWindowMus::GetRootWindowController() { | 166 WmRootWindowController* WmWindowMus::GetRootWindowController() { |
| 163 return GetRootWindowControllerMus(); | 167 return GetRootWindowControllerMus(); |
| 164 } | 168 } |
| 165 | 169 |
| 166 WmShell* WmWindowMus::GetShell() const { | 170 WmShell* WmWindowMus::GetShell() const { |
| 167 return WmShellMus::Get(); | 171 return WmShellMus::Get(); |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 void WmWindowMus::OnWindowDestroying(::mus::Window* window) { | 763 void WmWindowMus::OnWindowDestroying(::mus::Window* window) { |
| 760 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); | 764 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); |
| 761 } | 765 } |
| 762 | 766 |
| 763 void WmWindowMus::OnWindowDestroyed(::mus::Window* window) { | 767 void WmWindowMus::OnWindowDestroyed(::mus::Window* window) { |
| 764 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this)); | 768 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroyed(this)); |
| 765 } | 769 } |
| 766 | 770 |
| 767 } // namespace mus | 771 } // namespace mus |
| 768 } // namespace ash | 772 } // namespace ash |
| OLD | NEW |