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

Side by Side Diff: ash/login/views/lock_screen.cc

Issue 2859363003: cros: Initial structure for views-based lock. (Closed)
Patch Set: Initial upload Created 3 years, 7 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/views/lock_screen.h ('k') | chrome/browser/chromeos/login/lock/screen_locker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ash/login/views/lock_screen.h"
6
7 #include "ash/login/views/contents_view.h"
8 #include "ash/public/interfaces/constants.mojom.h"
9 #include "ash/public/interfaces/session_controller.mojom.h"
10 #include "ash/shell.h"
11 #include "ash/shell_delegate.h"
12 #include "services/service_manager/public/cpp/connector.h"
13 #include "ui/views/widget/widget.h"
14
15 namespace ash {
16
17 void ShowLockScreenInWidget(views::Widget* widget) {
18 views::View* contents = new ContentsView();
19 widget->SetContentsView(contents);
20 widget->Show();
21
22 // Lock screen has been displayed; upate session state so we do not timeout
23 // and crash.
24 ash::mojom::SessionInfoPtr info = ash::mojom::SessionInfo::New();
25 info->state = session_manager::SessionState::LOCKED;
26 ash::mojom::SessionControllerPtr session_controller;
27 ash::Shell::Get()->shell_delegate()->GetShellConnector()->BindInterface(
28 ash::mojom::kServiceName, &session_controller);
29 session_controller->SetSessionInfo(std::move(info));
xiyuan 2017/05/08 17:11:50 In current code, the session state code originates
jdufault 2017/05/08 20:46:51 Done; discussed offline. login will stay in ash wi
30 }
31
32 } // namespace ash
OLDNEW
« no previous file with comments | « ash/login/views/lock_screen.h ('k') | chrome/browser/chromeos/login/lock/screen_locker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698