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/common/wm/system_modal_container_layout_manager.h" | 5 #include "ash/common/wm/system_modal_container_layout_manager.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
10 #include "ash/common/wm/container_finder.h" | 10 #include "ash/common/wm/container_finder.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 namespace test { | 41 namespace test { |
42 | 42 |
43 namespace { | 43 namespace { |
44 | 44 |
45 aura::Window* GetModalContainer() { | 45 aura::Window* GetModalContainer() { |
46 return Shell::GetPrimaryRootWindowController()->GetContainer( | 46 return Shell::GetPrimaryRootWindowController()->GetContainer( |
47 ash::kShellWindowId_SystemModalContainer); | 47 ash::kShellWindowId_SystemModalContainer); |
48 } | 48 } |
49 | 49 |
50 bool AllRootWindowsHaveModalBackgroundsForContainer(int container_id) { | 50 bool AllRootWindowsHaveModalBackgroundsForContainer(int container_id) { |
51 WmWindow::Windows containers = | 51 aura::Window::Windows containers = |
52 wm::GetContainersFromAllRootWindows(container_id); | 52 wm::GetContainersFromAllRootWindows(container_id); |
53 bool has_modal_screen = !containers.empty(); | 53 bool has_modal_screen = !containers.empty(); |
54 for (WmWindow* container : containers) { | 54 for (aura::Window* container : containers) { |
55 has_modal_screen &= static_cast<SystemModalContainerLayoutManager*>( | 55 has_modal_screen &= static_cast<SystemModalContainerLayoutManager*>( |
56 container->GetLayoutManager()) | 56 WmWindow::Get(container)->GetLayoutManager()) |
57 ->has_window_dimmer(); | 57 ->has_window_dimmer(); |
58 } | 58 } |
59 return has_modal_screen; | 59 return has_modal_screen; |
60 } | 60 } |
61 | 61 |
62 bool AllRootWindowsHaveLockedModalBackgrounds() { | 62 bool AllRootWindowsHaveLockedModalBackgrounds() { |
63 return AllRootWindowsHaveModalBackgroundsForContainer( | 63 return AllRootWindowsHaveModalBackgroundsForContainer( |
64 kShellWindowId_LockSystemModalContainer); | 64 kShellWindowId_LockSystemModalContainer); |
65 } | 65 } |
66 | 66 |
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 | 908 |
909 // Make sure that events are properly blocked in multi displays environment. | 909 // Make sure that events are properly blocked in multi displays environment. |
910 TEST_F(SystemModalContainerLayoutManagerTest, BlockEventsInMultiDisplays) { | 910 TEST_F(SystemModalContainerLayoutManagerTest, BlockEventsInMultiDisplays) { |
911 UpdateDisplay("500x500, 500x500"); | 911 UpdateDisplay("500x500, 500x500"); |
912 InputTestDelegate delegate; | 912 InputTestDelegate delegate; |
913 delegate.RunTest(this); | 913 delegate.RunTest(this); |
914 } | 914 } |
915 | 915 |
916 } // namespace test | 916 } // namespace test |
917 } // namespace ash | 917 } // namespace ash |
OLD | NEW |