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); |