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/wm/stacking_controller.h" | 5 #include "ash/wm/stacking_controller.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/session_state_delegate.h" | |
9 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/shell_delegate.h" |
10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
11 #include "ash/wm/always_on_top_controller.h" | 11 #include "ash/wm/always_on_top_controller.h" |
12 #include "ash/wm/coordinate_conversion.h" | 12 #include "ash/wm/coordinate_conversion.h" |
13 #include "ash/wm/window_properties.h" | 13 #include "ash/wm/window_properties.h" |
14 #include "ui/aura/client/aura_constants.h" | 14 #include "ui/aura/client/aura_constants.h" |
15 #include "ui/aura/root_window.h" | 15 #include "ui/aura/root_window.h" |
16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
17 #include "ui/base/ui_base_types.h" | 17 #include "ui/base/ui_base_types.h" |
18 | 18 |
19 namespace ash { | 19 namespace ash { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 //////////////////////////////////////////////////////////////////////////////// | 112 //////////////////////////////////////////////////////////////////////////////// |
113 // StackingController, private: | 113 // StackingController, private: |
114 | 114 |
115 aura::Window* StackingController::GetSystemModalContainer( | 115 aura::Window* StackingController::GetSystemModalContainer( |
116 aura::RootWindow* root, | 116 aura::RootWindow* root, |
117 aura::Window* window) const { | 117 aura::Window* window) const { |
118 DCHECK(IsSystemModal(window)); | 118 DCHECK(IsSystemModal(window)); |
119 | 119 |
120 // If screen lock is not active and user session is active, | 120 // If screen lock is not active and user session is active, |
121 // all modal windows are placed into the normal modal container. | 121 // all modal windows are placed into the normal modal container. |
122 if (!Shell::GetInstance()->session_state_delegate()->IsScreenLocked() && | 122 if (!Shell::GetInstance()->delegate()->IsScreenLocked() && |
123 Shell::GetInstance()->session_state_delegate()-> | 123 Shell::GetInstance()->delegate()->IsSessionStarted()) { |
124 IsActiveUserSessionStarted()) { | |
125 return GetContainerById(root, | 124 return GetContainerById(root, |
126 internal::kShellWindowId_SystemModalContainer); | 125 internal::kShellWindowId_SystemModalContainer); |
127 } | 126 } |
128 | 127 |
129 // Otherwise those that originate from LockScreen container and above are | 128 // Otherwise those that originate from LockScreen container and above are |
130 // placed in the screen lock modal container. | 129 // placed in the screen lock modal container. |
131 aura::Window* lock_container = | 130 aura::Window* lock_container = |
132 GetContainerById(root, internal::kShellWindowId_LockScreenContainer); | 131 GetContainerById(root, internal::kShellWindowId_LockScreenContainer); |
133 int lock_container_id = lock_container->id(); | 132 int lock_container_id = lock_container->id(); |
134 int window_container_id = window->transient_parent()->parent()->id(); | 133 int window_container_id = window->transient_parent()->parent()->id(); |
(...skipping 20 matching lines...) Expand all Loading... |
155 controller->SetAlwaysOnTopContainer( | 154 controller->SetAlwaysOnTopContainer( |
156 root_window->GetChildById( | 155 root_window->GetChildById( |
157 internal::kShellWindowId_AlwaysOnTopContainer)); | 156 internal::kShellWindowId_AlwaysOnTopContainer)); |
158 // RootWindow owns the AlwaysOnTopController object. | 157 // RootWindow owns the AlwaysOnTopController object. |
159 root_window->SetProperty(internal::kAlwaysOnTopControllerKey, controller); | 158 root_window->SetProperty(internal::kAlwaysOnTopControllerKey, controller); |
160 } | 159 } |
161 return controller; | 160 return controller; |
162 } | 161 } |
163 | 162 |
164 } // namespace ash | 163 } // namespace ash |
OLD | NEW |