OLD | NEW |
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 #ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 5 #ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/shell_observer.h" | 9 #include "ash/shell_observer.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // Called when the power or lock buttons are pressed or released. | 150 // Called when the power or lock buttons are pressed or released. |
151 void OnPowerButtonEvent(bool down, const base::TimeTicks& timestamp); | 151 void OnPowerButtonEvent(bool down, const base::TimeTicks& timestamp); |
152 void OnLockButtonEvent(bool down, const base::TimeTicks& timestamp); | 152 void OnLockButtonEvent(bool down, const base::TimeTicks& timestamp); |
153 | 153 |
154 // Displays the shutdown animation and requests shutdown when it's done. | 154 // Displays the shutdown animation and requests shutdown when it's done. |
155 void RequestShutdown(); | 155 void RequestShutdown(); |
156 | 156 |
157 // aura::RootWindowObserver overrides: | 157 // aura::RootWindowObserver overrides: |
158 virtual void OnRootWindowResized(const aura::RootWindow* root, | 158 virtual void OnRootWindowResized(const aura::RootWindow* root, |
159 const gfx::Size& old_size) OVERRIDE; | 159 const gfx::Size& old_size) OVERRIDE; |
| 160 virtual void OnRootWindowHostClosed(const aura::RootWindow* root) OVERRIDE; |
160 | 161 |
161 // ShellObserver overrides: | 162 // ShellObserver overrides: |
162 virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE; | 163 virtual void OnLoginStateChanged(user::LoginStatus status) OVERRIDE; |
163 virtual void OnAppTerminating() OVERRIDE; | 164 virtual void OnAppTerminating() OVERRIDE; |
164 virtual void OnLockStateChanged(bool locked) OVERRIDE; | 165 virtual void OnLockStateChanged(bool locked) OVERRIDE; |
165 | 166 |
166 private: | 167 private: |
167 bool LoggedInAsNonGuest() const; | 168 bool LoggedInAsNonGuest() const; |
168 | 169 |
169 // Requests that the screen be locked and starts |lock_fail_timer_|. | 170 // Requests that the screen be locked and starts |lock_fail_timer_|. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // |background_layer_|, as the desktop background is now covering the whole | 254 // |background_layer_|, as the desktop background is now covering the whole |
254 // screen. | 255 // screen. |
255 base::OneShotTimer<PowerButtonController> hide_background_layer_timer_; | 256 base::OneShotTimer<PowerButtonController> hide_background_layer_timer_; |
256 | 257 |
257 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); | 258 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); |
258 }; | 259 }; |
259 | 260 |
260 } // namespace ash | 261 } // namespace ash |
261 | 262 |
262 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 263 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
OLD | NEW |