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

Side by Side Diff: chrome/browser/chromeos/power/session_state_controller_delegate_chromeos.cc

Issue 11185006: Revert 162140 - ash : Decouple power button controller and session state controller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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 "chrome/browser/chromeos/power/session_state_controller_delegate_chrome os.h"
6
7 #include "base/logging.h"
8 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
9 #include "chrome/browser/lifetime/application_lifetime.h"
10 #include "chromeos/dbus/dbus_thread_manager.h"
11 #include "chromeos/dbus/power_manager_client.h"
12 #include "chromeos/dbus/session_manager_client.h"
13
14 namespace chromeos {
15
16 void SessionStateControllerDelegateChromeos::RequestLockScreen() {
17 // If KioskMode is enabled, if the user attempts to lock the screen via
18 // the power button, we instead want to log the user out. This seemed to
19 // be the most acceptable replacement for the lock action of the power
20 // button for Kiosk mode users.
21 if (KioskModeSettings::Get()->IsKioskModeEnabled()) {
22 browser::AttemptUserExit();
23 return;
24 }
25
26 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen();
27 }
28
29 void SessionStateControllerDelegateChromeos::RequestShutdown() {
30 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
31 }
32
33 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698