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

Side by Side Diff: ash/root_window_controller.cc

Issue 19945004: Modal window in user session not blocks user adding screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/root_window_controller_unittest.cc » ('j') | ash/session_state_delegate.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 RootWindowController::GetSystemModalLayoutManager(aura::Window* window) { 251 RootWindowController::GetSystemModalLayoutManager(aura::Window* window) {
252 aura::Window* container = NULL; 252 aura::Window* container = NULL;
253 if (window) { 253 if (window) {
254 if (window->parent() && 254 if (window->parent() &&
255 window->parent()->id() >= kShellWindowId_LockScreenContainer) { 255 window->parent()->id() >= kShellWindowId_LockScreenContainer) {
256 container = GetContainer(kShellWindowId_LockSystemModalContainer); 256 container = GetContainer(kShellWindowId_LockSystemModalContainer);
257 } else { 257 } else {
258 container = GetContainer(kShellWindowId_SystemModalContainer); 258 container = GetContainer(kShellWindowId_SystemModalContainer);
259 } 259 }
260 } else { 260 } else {
261 user::LoginStatus login = Shell::GetInstance()->system_tray_delegate() ? 261 int modal_window_id = Shell::GetInstance()->session_state_delegate()
262 Shell::GetInstance()->system_tray_delegate()->GetUserLoginStatus() : 262 ->IsUserSessionBlocked() ? kShellWindowId_LockSystemModalContainer :
263 user::LOGGED_IN_NONE; 263 kShellWindowId_SystemModalContainer;
264 int modal_window_id = (login == user::LOGGED_IN_LOCKED ||
265 login == user::LOGGED_IN_NONE) ?
266 kShellWindowId_LockSystemModalContainer :
267 kShellWindowId_SystemModalContainer;
268 container = GetContainer(modal_window_id); 264 container = GetContainer(modal_window_id);
269 } 265 }
270 return container ? static_cast<SystemModalContainerLayoutManager*>( 266 return container ? static_cast<SystemModalContainerLayoutManager*>(
271 container->layout_manager()) : NULL; 267 container->layout_manager()) : NULL;
272 } 268 }
273 269
274 aura::Window* RootWindowController::GetContainer(int container_id) { 270 aura::Window* RootWindowController::GetContainer(int container_id) {
275 return root_window_->GetChildById(container_id); 271 return root_window_->GetChildById(container_id);
276 } 272 }
277 273
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 721
726 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) { 722 void RootWindowController::OnTouchHudProjectionToggled(bool enabled) {
727 if (enabled) 723 if (enabled)
728 EnableTouchHudProjection(); 724 EnableTouchHudProjection();
729 else 725 else
730 DisableTouchHudProjection(); 726 DisableTouchHudProjection();
731 } 727 }
732 728
733 } // namespace internal 729 } // namespace internal
734 } // namespace ash 730 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/root_window_controller_unittest.cc » ('j') | ash/session_state_delegate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698