| 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/aura/wm_window_aura.h" | 5 #include "ash/aura/wm_window_aura.h" |
| 6 | 6 |
| 7 #include "ash/ash_constants.h" | 7 #include "ash/ash_constants.h" |
| 8 #include "ash/aura/aura_layout_manager_adapter.h" | 8 #include "ash/aura/aura_layout_manager_adapter.h" |
| 9 #include "ash/aura/wm_root_window_controller_aura.h" | 9 #include "ash/aura/wm_root_window_controller_aura.h" |
| 10 #include "ash/aura/wm_shell_aura.h" | 10 #include "ash/aura/wm_shell_aura.h" |
| 11 #include "ash/common/shell_window_ids.h" |
| 11 #include "ash/common/wm/window_state.h" | 12 #include "ash/common/wm/window_state.h" |
| 12 #include "ash/common/wm_layout_manager.h" | 13 #include "ash/common/wm_layout_manager.h" |
| 13 #include "ash/common/wm_window_observer.h" | 14 #include "ash/common/wm_window_observer.h" |
| 14 #include "ash/common/wm_window_property.h" | 15 #include "ash/common/wm_window_property.h" |
| 15 #include "ash/screen_util.h" | 16 #include "ash/screen_util.h" |
| 16 #include "ash/shelf/shelf_util.h" | 17 #include "ash/shelf/shelf_util.h" |
| 17 #include "ash/shell.h" | 18 #include "ash/shell.h" |
| 18 #include "ash/wm/resize_shadow_controller.h" | 19 #include "ash/wm/resize_shadow_controller.h" |
| 19 #include "ash/wm/window_animations.h" | 20 #include "ash/wm/window_animations.h" |
| 20 #include "ash/wm/window_properties.h" | 21 #include "ash/wm/window_properties.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 #include "ui/wm/core/easy_resize_window_targeter.h" | 38 #include "ui/wm/core/easy_resize_window_targeter.h" |
| 38 #include "ui/wm/core/visibility_controller.h" | 39 #include "ui/wm/core/visibility_controller.h" |
| 39 #include "ui/wm/core/window_util.h" | 40 #include "ui/wm/core/window_util.h" |
| 40 | 41 |
| 41 DECLARE_WINDOW_PROPERTY_TYPE(ash::WmWindowAura*); | 42 DECLARE_WINDOW_PROPERTY_TYPE(ash::WmWindowAura*); |
| 42 | 43 |
| 43 namespace ash { | 44 namespace ash { |
| 44 | 45 |
| 45 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::WmWindowAura, kWmWindowKey, nullptr); | 46 DEFINE_OWNED_WINDOW_PROPERTY_KEY(ash::WmWindowAura, kWmWindowKey, nullptr); |
| 46 | 47 |
| 48 static_assert(aura::Window::kInitialId == kShellWindowId_Invalid, |
| 49 "ids must match"); |
| 50 |
| 47 namespace { | 51 namespace { |
| 48 | 52 |
| 49 // A tentative class to set the bounds on the window. | 53 // A tentative class to set the bounds on the window. |
| 50 // TODO(oshima): Once all logic is cleaned up, move this to the real layout | 54 // TODO(oshima): Once all logic is cleaned up, move this to the real layout |
| 51 // manager with proper friendship. | 55 // manager with proper friendship. |
| 52 class BoundsSetter : public aura::LayoutManager { | 56 class BoundsSetter : public aura::LayoutManager { |
| 53 public: | 57 public: |
| 54 BoundsSetter() {} | 58 BoundsSetter() {} |
| 55 ~BoundsSetter() override {} | 59 ~BoundsSetter() override {} |
| 56 | 60 |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 bool visible) { | 662 bool visible) { |
| 659 FOR_EACH_OBSERVER(WmWindowObserver, observers_, | 663 FOR_EACH_OBSERVER(WmWindowObserver, observers_, |
| 660 OnWindowVisibilityChanging(this, visible)); | 664 OnWindowVisibilityChanging(this, visible)); |
| 661 } | 665 } |
| 662 | 666 |
| 663 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { | 667 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { |
| 664 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); | 668 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); |
| 665 } | 669 } |
| 666 | 670 |
| 667 } // namespace ash | 671 } // namespace ash |
| OLD | NEW |