Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: ash/wm/stacking_controller.cc

Issue 14295008: Add ash SessionStateDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
8 #include "ash/shell.h" 9 #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
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()->delegate()->IsScreenLocked() && 122 if (!Shell::GetInstance()->session_state_delegate()->IsScreenLocked() &&
123 Shell::GetInstance()->delegate()->IsSessionStarted()) { 123 Shell::GetInstance()->session_state_delegate()->
124 IsActiveUserSessionStarted()) {
124 return GetContainerById(root, 125 return GetContainerById(root,
125 internal::kShellWindowId_SystemModalContainer); 126 internal::kShellWindowId_SystemModalContainer);
126 } 127 }
127 128
128 // Otherwise those that originate from LockScreen container and above are 129 // Otherwise those that originate from LockScreen container and above are
129 // placed in the screen lock modal container. 130 // placed in the screen lock modal container.
130 aura::Window* lock_container = 131 aura::Window* lock_container =
131 GetContainerById(root, internal::kShellWindowId_LockScreenContainer); 132 GetContainerById(root, internal::kShellWindowId_LockScreenContainer);
132 int lock_container_id = lock_container->id(); 133 int lock_container_id = lock_container->id();
133 int window_container_id = window->transient_parent()->parent()->id(); 134 int window_container_id = window->transient_parent()->parent()->id();
(...skipping 20 matching lines...) Expand all
154 controller->SetAlwaysOnTopContainer( 155 controller->SetAlwaysOnTopContainer(
155 root_window->GetChildById( 156 root_window->GetChildById(
156 internal::kShellWindowId_AlwaysOnTopContainer)); 157 internal::kShellWindowId_AlwaysOnTopContainer));
157 // RootWindow owns the AlwaysOnTopController object. 158 // RootWindow owns the AlwaysOnTopController object.
158 root_window->SetProperty(internal::kAlwaysOnTopControllerKey, controller); 159 root_window->SetProperty(internal::kAlwaysOnTopControllerKey, controller);
159 } 160 }
160 return controller; 161 return controller;
161 } 162 }
162 163
163 } // namespace ash 164 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/session_state_controller_impl2_unittest.cc ('k') | ash/wm/system_modal_container_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698