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 "chrome/browser/chromeos/login/lock_window_aura.h" | 5 #include "chrome/browser/chromeos/login/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" | |
11 #include "chrome/common/chrome_switches.h" | |
12 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
13 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
14 | 12 |
15 namespace chromeos { | 13 namespace chromeos { |
16 | 14 |
17 LockWindow* LockWindow::Create() { | 15 LockWindow* LockWindow::Create() { |
18 return new LockWindowAura(); | 16 return new LockWindowAura(); |
19 } | 17 } |
20 | 18 |
21 //////////////////////////////////////////////////////////////////////////////// | 19 //////////////////////////////////////////////////////////////////////////////// |
(...skipping 15 matching lines...) Expand all Loading... |
37 Init(); | 35 Init(); |
38 } | 36 } |
39 | 37 |
40 LockWindowAura::~LockWindowAura() { | 38 LockWindowAura::~LockWindowAura() { |
41 } | 39 } |
42 | 40 |
43 void LockWindowAura::Init() { | 41 void LockWindowAura::Init() { |
44 views::Widget::InitParams params( | 42 views::Widget::InitParams params( |
45 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 43 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
46 params.show_state = ui::SHOW_STATE_FULLSCREEN; | 44 params.show_state = ui::SHOW_STATE_FULLSCREEN; |
47 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableNewOobe)) | |
48 params.transparent = true; | |
49 // TODO(oshima): move the lock screen harness to ash. | 45 // TODO(oshima): move the lock screen harness to ash. |
50 params.parent = | 46 params.parent = |
51 ash::Shell::GetContainer( | 47 ash::Shell::GetContainer( |
52 ash::Shell::GetPrimaryRootWindow(), | 48 ash::Shell::GetPrimaryRootWindow(), |
53 ash::internal::kShellWindowId_LockScreenContainer); | 49 ash::internal::kShellWindowId_LockScreenContainer); |
54 views::Widget::Init(params); | 50 views::Widget::Init(params); |
55 ash::SetWindowVisibilityAnimationTransition(GetNativeView(), | 51 ash::SetWindowVisibilityAnimationTransition(GetNativeView(), |
56 ash::ANIMATE_NONE); | 52 ash::ANIMATE_NONE); |
57 } | 53 } |
58 | 54 |
59 } // namespace chromeos | 55 } // namespace chromeos |
OLD | NEW |