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" |
11 #include "ui/aura/window.h" | 11 #include "ui/aura/window.h" |
12 #include "ui/aura/window_event_dispatcher.h" | 12 #include "ui/aura/window_event_dispatcher.h" |
13 | 13 |
14 #if defined(USE_ATHENA) | |
15 #include "athena/screen/public/screen_manager.h" | |
16 #include "athena/util/container_priorities.h" | |
17 #include "athena/util/fill_layout_manager.h" | |
18 #endif | |
19 | |
14 namespace chromeos { | 20 namespace chromeos { |
15 | 21 |
16 LockWindow* LockWindow::Create() { | 22 LockWindow* LockWindow::Create() { |
17 LockWindowAura* lock_window = new LockWindowAura(); | 23 LockWindowAura* lock_window = new LockWindowAura(); |
18 // Cancel existing touch events when screen is locked. | 24 // Cancel existing touch events when screen is locked. |
19 ui::GestureRecognizer::Get()->TransferEventsTo( | 25 ui::GestureRecognizer::Get()->TransferEventsTo( |
20 lock_window->GetNativeWindow(), NULL); | 26 lock_window->GetNativeWindow(), NULL); |
21 return lock_window; | 27 return lock_window; |
22 } | 28 } |
23 | 29 |
(...skipping 27 matching lines...) Expand all Loading... | |
51 } | 57 } |
52 | 58 |
53 LockWindowAura::~LockWindowAura() { | 59 LockWindowAura::~LockWindowAura() { |
54 } | 60 } |
55 | 61 |
56 void LockWindowAura::Init() { | 62 void LockWindowAura::Init() { |
57 views::Widget::InitParams params( | 63 views::Widget::InitParams params( |
58 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); | 64 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); |
59 params.delegate = this; | 65 params.delegate = this; |
60 params.show_state = ui::SHOW_STATE_FULLSCREEN; | 66 params.show_state = ui::SHOW_STATE_FULLSCREEN; |
67 #if defined(USE_ATHENA) | |
68 // Don't set TRANSLUCENT_WINDOW because we don't have wallpaper manager yet. | |
Nikita (slow)
2014/10/10 10:53:06
But currently login screen works just fine being t
Dmitry Polukhin
2014/10/10 11:30:01
Added link to the bug about move wallpaper manager
| |
69 athena::ScreenManager::ContainerParams container_params( | |
70 "LoginScreen", athena::CP_LOGIN_SCREEN); | |
71 container_params.can_activate_children = true; | |
72 container_params.grab_inputs = true; | |
73 lock_screen_container_.reset( | |
74 athena::ScreenManager::Get()->CreateContainer(container_params)); | |
75 params.parent = lock_screen_container_.get(); | |
76 lock_screen_container_->SetLayoutManager( | |
77 new athena::FillLayoutManager(lock_screen_container_.get())); | |
78 #else | |
61 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 79 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
62 // TODO(oshima): move the lock screen harness to ash. | 80 // TODO(oshima): move the lock screen harness to ash. |
63 params.parent = | 81 params.parent = |
64 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), | 82 ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), |
65 ash::kShellWindowId_LockScreenContainer); | 83 ash::kShellWindowId_LockScreenContainer); |
84 #endif | |
66 views::Widget::Init(params); | 85 views::Widget::Init(params); |
67 wm::SetWindowVisibilityAnimationTransition( | 86 wm::SetWindowVisibilityAnimationTransition( |
68 GetNativeView(), wm::ANIMATE_NONE); | 87 GetNativeView(), wm::ANIMATE_NONE); |
69 } | 88 } |
70 | 89 |
71 } // namespace chromeos | 90 } // namespace chromeos |
OLD | NEW |