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

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

Issue 9838085: Move files inside chrome/browser/chromeos/dbus to chromeos/dbus (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 8 years, 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo s.h" 5 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo s.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
9 #include "chrome/browser/chromeos/dbus/power_manager_client.h"
10 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 8 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
11 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #include "chromeos/dbus/dbus_thread_manager.h"
11 #include "chromeos/dbus/power_manager_client.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 void PowerButtonControllerDelegateChromeos::RequestLockScreen() { 15 void PowerButtonControllerDelegateChromeos::RequestLockScreen() {
16 // If KioskMode is enabled, if the user attempts to lock the screen via 16 // If KioskMode is enabled, if the user attempts to lock the screen via
17 // the power button, we instead want to log the user out. This seemed to 17 // the power button, we instead want to log the user out. This seemed to
18 // be the most acceptable replacement for the lock action of the power 18 // be the most acceptable replacement for the lock action of the power
19 // button for Kiosk mode users. 19 // button for Kiosk mode users.
20 if (KioskModeSettings::Get()->IsKioskModeEnabled()) { 20 if (KioskModeSettings::Get()->IsKioskModeEnabled()) {
21 BrowserList::AttemptUserExit(); 21 BrowserList::AttemptUserExit();
22 return; 22 return;
23 } 23 }
24 24
25 DBusThreadManager::Get()->GetPowerManagerClient()-> 25 DBusThreadManager::Get()->GetPowerManagerClient()->
26 NotifyScreenLockRequested(); 26 NotifyScreenLockRequested();
27 } 27 }
28 28
29 void PowerButtonControllerDelegateChromeos::RequestShutdown() { 29 void PowerButtonControllerDelegateChromeos::RequestShutdown() {
30 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); 30 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown();
31 } 31 }
32 32
33 } // namespace chromeos 33 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/power/low_battery_observer.h ('k') | chrome/browser/chromeos/power/power_button_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698