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

Unified Diff: ash/wm/power_button_controller.h

Issue 10008074: Cancel partial screenshot UI when lock happens. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use enum 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 side-by-side diff with in-line comments
Download patch
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_; }

Powered by Google App Engine
This is Rietveld 408576698