OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/login/ui/lock_screen.h" | 5 #include "ash/login/ui/lock_screen.h" |
6 | 6 |
7 #include "ash/login/ui/lock_contents_view.h" | 7 #include "ash/login/ui/lock_contents_view.h" |
| 8 #include "ash/login/ui/lock_window.h" |
| 9 #include "ui/display/display.h" |
| 10 #include "ui/display/screen.h" |
8 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
9 | 12 |
10 namespace ash { | 13 namespace ash { |
11 | 14 |
12 void ShowLockScreenInWidget(views::Widget* widget) { | 15 bool ShowLockScreen() { |
| 16 LockWindow* window = new LockWindow(); |
| 17 window->SetBounds(display::Screen::GetScreen()->GetPrimaryDisplay().bounds()); |
| 18 |
13 views::View* contents = new LockContentsView(); | 19 views::View* contents = new LockContentsView(); |
14 widget->SetContentsView(contents); | 20 window->SetContentsView(contents); |
15 widget->Show(); | 21 window->Show(); |
| 22 |
| 23 return true; |
16 } | 24 } |
17 | 25 |
18 } // namespace ash | 26 } // namespace ash |
OLD | NEW |