Chromium Code Reviews| 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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 901 default_container->SetProperty(kUsesScreenCoordinatesKey, true); | 901 default_container->SetProperty(kUsesScreenCoordinatesKey, true); |
| 902 wm::SetChildrenUseExtendedHitRegionForWindow(default_container); | 902 wm::SetChildrenUseExtendedHitRegionForWindow(default_container); |
| 903 | 903 |
| 904 aura::Window* always_on_top_container = | 904 aura::Window* always_on_top_container = |
| 905 CreateContainer(kShellWindowId_AlwaysOnTopContainer, | 905 CreateContainer(kShellWindowId_AlwaysOnTopContainer, |
| 906 "AlwaysOnTopContainer", non_lock_screen_containers); | 906 "AlwaysOnTopContainer", non_lock_screen_containers); |
| 907 ::wm::SetChildWindowVisibilityChangesAnimated(always_on_top_container); | 907 ::wm::SetChildWindowVisibilityChangesAnimated(always_on_top_container); |
| 908 wm::SetSnapsChildrenToPhysicalPixelBoundary(always_on_top_container); | 908 wm::SetSnapsChildrenToPhysicalPixelBoundary(always_on_top_container); |
| 909 always_on_top_container->SetProperty(kUsesScreenCoordinatesKey, true); | 909 always_on_top_container->SetProperty(kUsesScreenCoordinatesKey, true); |
| 910 | 910 |
| 911 aura::Window* app_list_container = | |
| 912 CreateContainer(kShellWindowId_AppListContainer, "AppListContainer", | |
|
sky
2017/05/31 15:04:17
shell_window_ids is meant to contain the relative
newcomer
2017/06/01 01:42:54
Done.
| |
| 913 non_lock_screen_containers); | |
| 914 wm::SetSnapsChildrenToPhysicalPixelBoundary(app_list_container); | |
| 915 app_list_container->SetProperty(kUsesScreenCoordinatesKey, true); | |
| 916 | |
| 911 aura::Window* shelf_container = | 917 aura::Window* shelf_container = |
| 912 CreateContainer(kShellWindowId_ShelfContainer, "ShelfContainer", | 918 CreateContainer(kShellWindowId_ShelfContainer, "ShelfContainer", |
| 913 non_lock_screen_containers); | 919 non_lock_screen_containers); |
| 914 wm::SetSnapsChildrenToPhysicalPixelBoundary(shelf_container); | 920 wm::SetSnapsChildrenToPhysicalPixelBoundary(shelf_container); |
| 915 shelf_container->SetProperty(kUsesScreenCoordinatesKey, true); | 921 shelf_container->SetProperty(kUsesScreenCoordinatesKey, true); |
| 916 shelf_container->SetProperty(kLockedToRootKey, true); | 922 shelf_container->SetProperty(kLockedToRootKey, true); |
| 917 | 923 |
| 918 aura::Window* panel_container = | 924 aura::Window* panel_container = |
| 919 CreateContainer(kShellWindowId_PanelContainer, "PanelContainer", | 925 CreateContainer(kShellWindowId_PanelContainer, "PanelContainer", |
| 920 non_lock_screen_containers); | 926 non_lock_screen_containers); |
| 921 wm::SetSnapsChildrenToPhysicalPixelBoundary(panel_container); | 927 wm::SetSnapsChildrenToPhysicalPixelBoundary(panel_container); |
| 922 panel_container->SetProperty(kUsesScreenCoordinatesKey, true); | 928 panel_container->SetProperty(kUsesScreenCoordinatesKey, true); |
| 923 | 929 |
| 924 aura::Window* shelf_bubble_container = | 930 aura::Window* shelf_bubble_container = |
| 925 CreateContainer(kShellWindowId_ShelfBubbleContainer, | 931 CreateContainer(kShellWindowId_ShelfBubbleContainer, |
| 926 "ShelfBubbleContainer", non_lock_screen_containers); | 932 "ShelfBubbleContainer", non_lock_screen_containers); |
| 927 wm::SetSnapsChildrenToPhysicalPixelBoundary(shelf_bubble_container); | 933 wm::SetSnapsChildrenToPhysicalPixelBoundary(shelf_bubble_container); |
| 928 shelf_bubble_container->SetProperty(kUsesScreenCoordinatesKey, true); | 934 shelf_bubble_container->SetProperty(kUsesScreenCoordinatesKey, true); |
| 929 shelf_bubble_container->SetProperty(kLockedToRootKey, true); | 935 shelf_bubble_container->SetProperty(kLockedToRootKey, true); |
| 930 | 936 |
| 931 aura::Window* app_list_container = | |
| 932 CreateContainer(kShellWindowId_AppListContainer, "AppListContainer", | |
| 933 non_lock_screen_containers); | |
| 934 wm::SetSnapsChildrenToPhysicalPixelBoundary(app_list_container); | |
| 935 app_list_container->SetProperty(kUsesScreenCoordinatesKey, true); | |
| 936 | |
| 937 aura::Window* modal_container = | 937 aura::Window* modal_container = |
| 938 CreateContainer(kShellWindowId_SystemModalContainer, | 938 CreateContainer(kShellWindowId_SystemModalContainer, |
| 939 "SystemModalContainer", non_lock_screen_containers); | 939 "SystemModalContainer", non_lock_screen_containers); |
| 940 wm::SetSnapsChildrenToPhysicalPixelBoundary(modal_container); | 940 wm::SetSnapsChildrenToPhysicalPixelBoundary(modal_container); |
| 941 ::wm::SetChildWindowVisibilityChangesAnimated(modal_container); | 941 ::wm::SetChildWindowVisibilityChangesAnimated(modal_container); |
| 942 modal_container->SetProperty(kUsesScreenCoordinatesKey, true); | 942 modal_container->SetProperty(kUsesScreenCoordinatesKey, true); |
| 943 wm::SetChildrenUseExtendedHitRegionForWindow(modal_container); | 943 wm::SetChildrenUseExtendedHitRegionForWindow(modal_container); |
| 944 | 944 |
| 945 // TODO(beng): Figure out if we can make this use | 945 // TODO(beng): Figure out if we can make this use |
| 946 // SystemModalContainerEventFilter instead of stops_event_propagation. | 946 // SystemModalContainerEventFilter instead of stops_event_propagation. |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1082 EnableTouchHudProjection(); | 1082 EnableTouchHudProjection(); |
| 1083 else | 1083 else |
| 1084 DisableTouchHudProjection(); | 1084 DisableTouchHudProjection(); |
| 1085 } | 1085 } |
| 1086 | 1086 |
| 1087 RootWindowController* GetRootWindowController(const aura::Window* root_window) { | 1087 RootWindowController* GetRootWindowController(const aura::Window* root_window) { |
| 1088 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; | 1088 return root_window ? GetRootWindowSettings(root_window)->controller : nullptr; |
| 1089 } | 1089 } |
| 1090 | 1090 |
| 1091 } // namespace ash | 1091 } // namespace ash |
| OLD | NEW |