OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/chromeos/login/ui/lock_window_aura.h" | 5 #include "chrome/browser/chromeos/login/ui/lock_window_aura.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/window_animations.h" | 9 #include "ash/wm/window_animations.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 views::Widget::InitParams params( | 63 views::Widget::InitParams params( |
64 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 64 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
65 params.delegate = this; | 65 params.delegate = this; |
66 params.show_state = ui::SHOW_STATE_FULLSCREEN; | 66 params.show_state = ui::SHOW_STATE_FULLSCREEN; |
67 #if defined(USE_ATHENA) | 67 #if defined(USE_ATHENA) |
68 // Don't set TRANSLUCENT_WINDOW because we don't have wallpaper manager yet. | 68 // Don't set TRANSLUCENT_WINDOW because we don't have wallpaper manager yet. |
69 // TODO(dpolukhin): fix this code when crbug.com/408734 fixed. | 69 // TODO(dpolukhin): fix this code when crbug.com/408734 fixed. |
70 athena::ScreenManager::ContainerParams container_params( | 70 athena::ScreenManager::ContainerParams container_params( |
71 "LoginScreen", athena::CP_LOGIN_SCREEN); | 71 "LoginScreen", athena::CP_LOGIN_SCREEN); |
72 container_params.can_activate_children = true; | 72 container_params.can_activate_children = true; |
73 container_params.block_events = true; | 73 container_params.grab_inputs = true; |
74 container_params.modal_container_priority = | |
75 athena::CP_LOGIN_SCREEN_SYSTEM_MODAL; | |
76 lock_screen_container_.reset( | 74 lock_screen_container_.reset( |
77 athena::ScreenManager::Get()->CreateContainer(container_params)); | 75 athena::ScreenManager::Get()->CreateContainer(container_params)); |
78 params.parent = lock_screen_container_.get(); | 76 params.parent = lock_screen_container_.get(); |
79 lock_screen_container_->SetLayoutManager( | 77 lock_screen_container_->SetLayoutManager( |
80 new athena::FillLayoutManager(lock_screen_container_.get())); | 78 new athena::FillLayoutManager(lock_screen_container_.get())); |
81 #else | 79 #else |
82 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 80 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
83 // TODO(oshima): move the lock screen harness to ash. | 81 // TODO(oshima): move the lock screen harness to ash. |
84 params.parent = | 82 params.parent = |
85 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), | 83 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), |
86 ash::kShellWindowId_LockScreenContainer); | 84 ash::kShellWindowId_LockScreenContainer); |
87 #endif | 85 #endif |
88 views::Widget::Init(params); | 86 views::Widget::Init(params); |
89 wm::SetWindowVisibilityAnimationTransition( | 87 wm::SetWindowVisibilityAnimationTransition( |
90 GetNativeView(), wm::ANIMATE_NONE); | 88 GetNativeView(), wm::ANIMATE_NONE); |
91 } | 89 } |
92 | 90 |
93 } // namespace chromeos | 91 } // namespace chromeos |
OLD | NEW |