Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: ash/login/ui/lock_contents_view.cc

Issue 2896093003: cros: Make sure views-based lock screen is destroyed after it is dismissed. (Closed)
Patch Set: Address comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/login/mock_lock_screen_client.cc ('k') | ash/login/ui/lock_screen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_contents_view.h" 5 #include "ash/login/ui/lock_contents_view.h"
6 6
7 #include "ash/login/lock_screen_controller.h" 7 #include "ash/login/lock_screen_controller.h"
8 #include "ash/login/ui/lock_screen.h"
8 #include "ash/public/interfaces/user_info.mojom.h" 9 #include "ash/public/interfaces/user_info.mojom.h"
9 #include "ash/session/session_controller.h" 10 #include "ash/session/session_controller.h"
10 #include "ash/shell.h" 11 #include "ash/shell.h"
11 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
12 #include "ui/gfx/geometry/insets.h" 13 #include "ui/gfx/geometry/insets.h"
13 #include "ui/views/background.h" 14 #include "ui/views/background.h"
14 #include "ui/views/border.h" 15 #include "ui/views/border.h"
15 #include "ui/views/layout/box_layout.h" 16 #include "ui/views/layout/box_layout.h"
16 17
17 namespace ash { 18 namespace ash {
(...skipping 20 matching lines...) Expand all
38 const ui::Event& event) { 39 const ui::Event& event) {
39 DCHECK(unlock_button_ == sender); 40 DCHECK(unlock_button_ == sender);
40 41
41 // TODO: user index shouldn't be hard coded here. Complete the implementation 42 // TODO: user index shouldn't be hard coded here. Complete the implementation
42 // below. 43 // below.
43 const int user_index = 0; 44 const int user_index = 0;
44 const mojom::UserSession* const user_session = 45 const mojom::UserSession* const user_session =
45 Shell::Get()->session_controller()->GetUserSession(user_index); 46 Shell::Get()->session_controller()->GetUserSession(user_index);
46 Shell::Get()->lock_screen_controller()->AuthenticateUser( 47 Shell::Get()->lock_screen_controller()->AuthenticateUser(
47 user_session->user_info->account_id, std::string(), 48 user_session->user_info->account_id, std::string(),
48 false /* authenticated_by_pin */); 49 false /* authenticated_by_pin */, base::BindOnce([](bool success) {
50 if (success)
51 DestroyLockScreen();
52 }));
49 } 53 }
50 54
51 } // namespace ash 55 } // namespace ash
OLDNEW
« no previous file with comments | « ash/login/mock_lock_screen_client.cc ('k') | ash/login/ui/lock_screen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698