| 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/wm/aura/wm_window_aura.h" | 5 #include "ash/wm/aura/wm_window_aura.h" |
| 6 | 6 |
| 7 #include "ash/screen_util.h" | 7 #include "ash/screen_util.h" |
| 8 #include "ash/wm/aura/wm_globals_aura.h" | 8 #include "ash/wm/aura/wm_globals_aura.h" |
| 9 #include "ash/wm/aura/wm_root_window_controller_aura.h" | 9 #include "ash/wm/aura/wm_root_window_controller_aura.h" |
| 10 #include "ash/wm/common/wm_window_observer.h" | 10 #include "ash/wm/common/wm_window_observer.h" |
| 11 #include "ash/wm/common/wm_window_property.h" | 11 #include "ash/wm/common/wm_window_property.h" |
| 12 #include "ash/wm/window_animations.h" | 12 #include "ash/wm/window_animations.h" |
| 13 #include "ash/wm/window_properties.h" | 13 #include "ash/wm/window_properties.h" |
| 14 #include "ash/wm/window_state.h" | 14 #include "ash/wm/window_state.h" |
| 15 #include "ash/wm/window_state_aura.h" | 15 #include "ash/wm/window_state_aura.h" |
| 16 #include "ash/wm/window_util.h" | 16 #include "ash/wm/window_util.h" |
| 17 #include "ui/aura/client/aura_constants.h" | 17 #include "ui/aura/client/aura_constants.h" |
| 18 #include "ui/aura/client/window_tree_client.h" |
| 18 #include "ui/aura/layout_manager.h" | 19 #include "ui/aura/layout_manager.h" |
| 19 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
| 20 #include "ui/aura/window_delegate.h" | 21 #include "ui/aura/window_delegate.h" |
| 21 #include "ui/aura/window_property.h" | 22 #include "ui/aura/window_property.h" |
| 22 #include "ui/base/hit_test.h" | 23 #include "ui/base/hit_test.h" |
| 23 #include "ui/compositor/layer_tree_owner.h" | 24 #include "ui/compositor/layer_tree_owner.h" |
| 24 #include "ui/compositor/scoped_layer_animation_settings.h" | 25 #include "ui/compositor/scoped_layer_animation_settings.h" |
| 25 #include "ui/gfx/screen.h" | 26 #include "ui/gfx/screen.h" |
| 26 #include "ui/wm/core/coordinate_conversion.h" | 27 #include "ui/wm/core/coordinate_conversion.h" |
| 27 #include "ui/wm/core/window_util.h" | 28 #include "ui/wm/core/window_util.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 } | 184 } |
| 184 | 185 |
| 185 const WindowState* WmWindowAura::GetWindowState() const { | 186 const WindowState* WmWindowAura::GetWindowState() const { |
| 186 return ash::wm::GetWindowState(window_); | 187 return ash::wm::GetWindowState(window_); |
| 187 } | 188 } |
| 188 | 189 |
| 189 WmWindow* WmWindowAura::GetToplevelWindow() { | 190 WmWindow* WmWindowAura::GetToplevelWindow() { |
| 190 return Get(window_->GetToplevelWindow()); | 191 return Get(window_->GetToplevelWindow()); |
| 191 } | 192 } |
| 192 | 193 |
| 194 void WmWindowAura::SetParentUsingContext(WmWindow* context, |
| 195 const gfx::Rect& screen_bounds) { |
| 196 aura::client::ParentWindowWithContext(window_, GetAuraWindow(context), |
| 197 screen_bounds); |
| 198 } |
| 199 |
| 193 void WmWindowAura::AddChild(WmWindow* window) { | 200 void WmWindowAura::AddChild(WmWindow* window) { |
| 194 window_->AddChild(GetAuraWindow(window)); | 201 window_->AddChild(GetAuraWindow(window)); |
| 195 } | 202 } |
| 196 | 203 |
| 197 WmWindow* WmWindowAura::GetParent() { | 204 WmWindow* WmWindowAura::GetParent() { |
| 198 return Get(window_->parent()); | 205 return Get(window_->parent()); |
| 199 } | 206 } |
| 200 | 207 |
| 201 WmWindow* WmWindowAura::GetTransientParent() { | 208 WmWindow* WmWindowAura::GetTransientParent() { |
| 202 return Get(::wm::GetTransientParent(window_)); | 209 return Get(::wm::GetTransientParent(window_)); |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 490 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
| 484 OnWindowBoundsChanged(this, old_bounds, new_bounds)); | 491 OnWindowBoundsChanged(this, old_bounds, new_bounds)); |
| 485 } | 492 } |
| 486 | 493 |
| 487 void WmWindowAura::OnWindowDestroying(aura::Window* window) { | 494 void WmWindowAura::OnWindowDestroying(aura::Window* window) { |
| 488 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); | 495 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowDestroying(this)); |
| 489 } | 496 } |
| 490 | 497 |
| 491 } // namespace wm | 498 } // namespace wm |
| 492 } // namespace ash | 499 } // namespace ash |
| OLD | NEW |