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