| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "ash/system/tray/system_tray_delegate.h" | 33 #include "ash/system/tray/system_tray_delegate.h" |
| 34 #include "ash/touch/touch_hud_debug.h" | 34 #include "ash/touch/touch_hud_debug.h" |
| 35 #include "ash/touch/touch_hud_projection.h" | 35 #include "ash/touch/touch_hud_projection.h" |
| 36 #include "ash/touch/touch_observer_hud.h" | 36 #include "ash/touch/touch_observer_hud.h" |
| 37 #include "ash/wallpaper/wallpaper_delegate.h" | 37 #include "ash/wallpaper/wallpaper_delegate.h" |
| 38 #include "ash/wallpaper/wallpaper_widget_controller.h" | 38 #include "ash/wallpaper/wallpaper_widget_controller.h" |
| 39 #include "ash/wm/always_on_top_controller.h" | 39 #include "ash/wm/always_on_top_controller.h" |
| 40 #include "ash/wm/boot_splash_screen_chromeos.h" | 40 #include "ash/wm/boot_splash_screen_chromeos.h" |
| 41 #include "ash/wm/container_finder.h" | 41 #include "ash/wm/container_finder.h" |
| 42 #include "ash/wm/fullscreen_window_finder.h" | 42 #include "ash/wm/fullscreen_window_finder.h" |
| 43 #include "ash/wm/lock_action_handler_layout_manager.h" |
| 43 #include "ash/wm/lock_layout_manager.h" | 44 #include "ash/wm/lock_layout_manager.h" |
| 44 #include "ash/wm/panels/attached_panel_window_targeter.h" | 45 #include "ash/wm/panels/attached_panel_window_targeter.h" |
| 45 #include "ash/wm/panels/panel_layout_manager.h" | 46 #include "ash/wm/panels/panel_layout_manager.h" |
| 46 #include "ash/wm/panels/panel_window_event_handler.h" | 47 #include "ash/wm/panels/panel_window_event_handler.h" |
| 47 #include "ash/wm/root_window_layout_manager.h" | 48 #include "ash/wm/root_window_layout_manager.h" |
| 48 #include "ash/wm/stacking_controller.h" | 49 #include "ash/wm/stacking_controller.h" |
| 49 #include "ash/wm/switchable_windows.h" | 50 #include "ash/wm/switchable_windows.h" |
| 50 #include "ash/wm/system_modal_container_layout_manager.h" | 51 #include "ash/wm/system_modal_container_layout_manager.h" |
| 51 #include "ash/wm/system_wallpaper_controller.h" | 52 #include "ash/wm/system_wallpaper_controller.h" |
| 52 #include "ash/wm/window_properties.h" | 53 #include "ash/wm/window_properties.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 void ReparentAllWindows(aura::Window* src, aura::Window* dst) { | 201 void ReparentAllWindows(aura::Window* src, aura::Window* dst) { |
| 201 // Set of windows to move. | 202 // Set of windows to move. |
| 202 const int kContainerIdsToMove[] = { | 203 const int kContainerIdsToMove[] = { |
| 203 kShellWindowId_DefaultContainer, | 204 kShellWindowId_DefaultContainer, |
| 204 kShellWindowId_PanelContainer, | 205 kShellWindowId_PanelContainer, |
| 205 kShellWindowId_AlwaysOnTopContainer, | 206 kShellWindowId_AlwaysOnTopContainer, |
| 206 kShellWindowId_SystemModalContainer, | 207 kShellWindowId_SystemModalContainer, |
| 207 kShellWindowId_LockSystemModalContainer, | 208 kShellWindowId_LockSystemModalContainer, |
| 208 kShellWindowId_UnparentedControlContainer, | 209 kShellWindowId_UnparentedControlContainer, |
| 209 kShellWindowId_OverlayContainer, | 210 kShellWindowId_OverlayContainer, |
| 211 kShellWindowId_LockActionHandlerContainer, |
| 210 }; | 212 }; |
| 211 const int kExtraContainerIdsToMoveInUnifiedMode[] = { | 213 const int kExtraContainerIdsToMoveInUnifiedMode[] = { |
| 212 kShellWindowId_LockScreenContainer, | 214 kShellWindowId_LockScreenContainer, |
| 213 kShellWindowId_LockScreenWallpaperContainer, | 215 kShellWindowId_LockScreenWallpaperContainer, |
| 214 }; | 216 }; |
| 215 std::vector<int> container_ids( | 217 std::vector<int> container_ids( |
| 216 kContainerIdsToMove, | 218 kContainerIdsToMove, |
| 217 kContainerIdsToMove + arraysize(kContainerIdsToMove)); | 219 kContainerIdsToMove + arraysize(kContainerIdsToMove)); |
| 218 // Check the display mode as this is also necessary when trasitioning between | 220 // Check the display mode as this is also necessary when trasitioning between |
| 219 // mirror and unified mode. | 221 // mirror and unified mode. |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 GetContainer(kShellWindowId_SystemModalContainer); | 789 GetContainer(kShellWindowId_SystemModalContainer); |
| 788 modal_container->SetLayoutManager( | 790 modal_container->SetLayoutManager( |
| 789 new SystemModalContainerLayoutManager(modal_container)); | 791 new SystemModalContainerLayoutManager(modal_container)); |
| 790 | 792 |
| 791 aura::Window* lock_modal_container = | 793 aura::Window* lock_modal_container = |
| 792 GetContainer(kShellWindowId_LockSystemModalContainer); | 794 GetContainer(kShellWindowId_LockSystemModalContainer); |
| 793 DCHECK(lock_modal_container); | 795 DCHECK(lock_modal_container); |
| 794 lock_modal_container->SetLayoutManager( | 796 lock_modal_container->SetLayoutManager( |
| 795 new SystemModalContainerLayoutManager(lock_modal_container)); | 797 new SystemModalContainerLayoutManager(lock_modal_container)); |
| 796 | 798 |
| 799 aura::Window* lock_action_handler_container = |
| 800 GetContainer(kShellWindowId_LockActionHandlerContainer); |
| 801 DCHECK(lock_action_handler_container); |
| 802 lock_action_handler_container->SetLayoutManager( |
| 803 new LockActionHandlerLayoutManager(lock_action_handler_container, |
| 804 shelf_.get())); |
| 805 |
| 797 aura::Window* lock_container = | 806 aura::Window* lock_container = |
| 798 GetContainer(kShellWindowId_LockScreenContainer); | 807 GetContainer(kShellWindowId_LockScreenContainer); |
| 799 DCHECK(lock_container); | 808 DCHECK(lock_container); |
| 800 lock_container->SetLayoutManager(new LockLayoutManager(lock_container)); | 809 lock_container->SetLayoutManager(new LockLayoutManager(lock_container)); |
| 801 | 810 |
| 802 aura::Window* always_on_top_container = | 811 aura::Window* always_on_top_container = |
| 803 GetContainer(kShellWindowId_AlwaysOnTopContainer); | 812 GetContainer(kShellWindowId_AlwaysOnTopContainer); |
| 804 DCHECK(always_on_top_container); | 813 DCHECK(always_on_top_container); |
| 805 always_on_top_controller_ = | 814 always_on_top_controller_ = |
| 806 base::MakeUnique<AlwaysOnTopController>(always_on_top_container); | 815 base::MakeUnique<AlwaysOnTopController>(always_on_top_container); |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 // TODO(beng): Figure out if we can make this use | 951 // TODO(beng): Figure out if we can make this use |
| 943 // SystemModalContainerEventFilter instead of stops_event_propagation. | 952 // SystemModalContainerEventFilter instead of stops_event_propagation. |
| 944 WmWindow* lock_container = | 953 WmWindow* lock_container = |
| 945 CreateContainer(kShellWindowId_LockScreenContainer, "LockScreenContainer", | 954 CreateContainer(kShellWindowId_LockScreenContainer, "LockScreenContainer", |
| 946 lock_screen_containers); | 955 lock_screen_containers); |
| 947 lock_container->SetSnapsChildrenToPhysicalPixelBoundary(); | 956 lock_container->SetSnapsChildrenToPhysicalPixelBoundary(); |
| 948 lock_container->SetBoundsInScreenBehaviorForChildren( | 957 lock_container->SetBoundsInScreenBehaviorForChildren( |
| 949 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); | 958 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); |
| 950 // TODO(beng): stopsevents | 959 // TODO(beng): stopsevents |
| 951 | 960 |
| 961 WmWindow* lock_action_handler_container = |
| 962 CreateContainer(kShellWindowId_LockActionHandlerContainer, |
| 963 "LockActionHandlerContainer", lock_screen_containers); |
| 964 lock_action_handler_container->SetSnapsChildrenToPhysicalPixelBoundary(); |
| 965 lock_action_handler_container->SetChildWindowVisibilityChangesAnimated(); |
| 966 lock_action_handler_container->SetBoundsInScreenBehaviorForChildren( |
| 967 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); |
| 968 |
| 952 WmWindow* lock_modal_container = | 969 WmWindow* lock_modal_container = |
| 953 CreateContainer(kShellWindowId_LockSystemModalContainer, | 970 CreateContainer(kShellWindowId_LockSystemModalContainer, |
| 954 "LockSystemModalContainer", lock_screen_containers); | 971 "LockSystemModalContainer", lock_screen_containers); |
| 955 lock_modal_container->SetSnapsChildrenToPhysicalPixelBoundary(); | 972 lock_modal_container->SetSnapsChildrenToPhysicalPixelBoundary(); |
| 956 lock_modal_container->SetChildWindowVisibilityChangesAnimated(); | 973 lock_modal_container->SetChildWindowVisibilityChangesAnimated(); |
| 957 lock_modal_container->SetBoundsInScreenBehaviorForChildren( | 974 lock_modal_container->SetBoundsInScreenBehaviorForChildren( |
| 958 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); | 975 WmWindow::BoundsInScreenBehavior::USE_SCREEN_COORDINATES); |
| 959 lock_modal_container->SetChildrenUseExtendedHitRegion(); | 976 lock_modal_container->SetChildrenUseExtendedHitRegion(); |
| 960 | 977 |
| 961 WmWindow* status_container = | 978 WmWindow* status_container = |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 EnableTouchHudProjection(); | 1096 EnableTouchHudProjection(); |
| 1080 else | 1097 else |
| 1081 DisableTouchHudProjection(); | 1098 DisableTouchHudProjection(); |
| 1082 } | 1099 } |
| 1083 | 1100 |
| 1084 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1101 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 1085 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1102 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 1086 } | 1103 } |
| 1087 | 1104 |
| 1088 } // namespace ash | 1105 } // namespace ash |
| OLD | NEW |