Index: ash/wm/power_button_controller.h |
diff --git a/ash/wm/power_button_controller.h b/ash/wm/power_button_controller.h |
index 19f26fe5f70416ad7dcda2c9c2b3043aac0c833f..8ed9d51bd372b77d0c0d5daf0b1a3352f0baaf38 100644 |
--- a/ash/wm/power_button_controller.h |
+++ b/ash/wm/power_button_controller.h |
@@ -7,6 +7,8 @@ |
#pragma once |
#include "ash/ash_export.h" |
+#include "ash/shell.h" |
+#include "ash/shell_observer.h" |
#include "base/basictypes.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/time.h" |
@@ -38,7 +40,8 @@ class ASH_EXPORT PowerButtonControllerDelegate { |
// Displays onscreen animations and locks or suspends the system in response to |
// the power button being pressed or released. |
-class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver { |
+class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver, |
+ public ShellObserver { |
public: |
// Animations that can be applied to groups of containers. |
// Exposed here for TestApi::ContainerGroupIsAnimated(). |
@@ -135,16 +138,6 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver { |
has_legacy_power_button_ = legacy; |
} |
- // Called when the user logs in. |
- void OnLoginStateChange(bool logged_in, bool is_guest); |
- |
- // Called when the application is exiting. |
- void OnExit(); |
- |
- // Called when the screen is locked (after the lock window is visible) or |
- // unlocked. |
- void OnLockStateChange(bool locked); |
- |
// Called when Chrome gets a request to display the lock screen. |
void OnStartingLock(); |
@@ -159,6 +152,11 @@ class ASH_EXPORT PowerButtonController : public aura::RootWindowObserver { |
virtual void OnRootWindowResized(const aura::RootWindow* root, |
const gfx::Size& old_size) OVERRIDE; |
+ // ShellObserver overrides: |
+ virtual void OnLoginStateChanged(Shell::LoginStatus status) OVERRIDE; |
+ virtual void OnAppTerminating() OVERRIDE; |
+ virtual void OnLockStateChanged(bool locked) OVERRIDE; |
+ |
private: |
bool logged_in_as_non_guest() const { return logged_in_ && !is_guest_; } |