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

Unified Diff: athena/system/power_button_controller.cc

Issue 620663005: Lock screen for Chrome-Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed crash Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: athena/system/power_button_controller.cc
diff --git a/athena/system/power_button_controller.cc b/athena/system/power_button_controller.cc
index e1105b90e9ad458f4816dfc5d525aa5e4247813d..a96f015143b08a48fcaa52ac21a2a5ba9874887c 100644
--- a/athena/system/power_button_controller.cc
+++ b/athena/system/power_button_controller.cc
@@ -5,6 +5,7 @@
#include "athena/system/power_button_controller.h"
#include "athena/screen/public/screen_manager.h"
+#include "athena/screen_lock/public/screen_lock_manager.h"
#include "athena/strings/grit/athena_strings.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "ui/base/l10n/l10n_util.h"
@@ -44,6 +45,10 @@ PowerButtonController::~PowerButtonController() {
void PowerButtonController::ShowShutdownWarningDialog() {
state_ = STATE_SHUTDOWN_WARNING_VISIBLE;
+ // Lock screen manager exists inside user session only.
+ if (athena::ScreenLockManager::Get())
+ athena::ScreenLockManager::Get()->LockScreen();
Jun Mukai 2014/10/13 18:20:24 Return here? Otherwise normal shutdown process wi
Dmitry Polukhin 2014/10/14 11:20:33 No return here to show dialog that keeping power b
Jun Mukai 2014/10/14 18:27:25 Ah, I see.
+
shutdown_warning_message_.reset(new views::Widget);
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);

Powered by Google App Engine
This is Rietveld 408576698