OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_ |
6 #define ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_ | 6 #define ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "chromeos/dbus/power_manager_client.h" | 12 #include "chromeos/dbus/power_manager_client.h" |
13 #include "chromeos/dbus/session_manager_client.h" | 13 #include "chromeos/dbus/session_manager_client.h" |
14 | 14 |
15 namespace ash { | 15 namespace ash { |
16 namespace internal { | |
17 | 16 |
18 // A class that observes power-management-related events. | 17 // A class that observes power-management-related events. |
19 class ASH_EXPORT PowerEventObserver | 18 class ASH_EXPORT PowerEventObserver |
20 : public chromeos::PowerManagerClient::Observer, | 19 : public chromeos::PowerManagerClient::Observer, |
21 public chromeos::SessionManagerClient::Observer { | 20 public chromeos::SessionManagerClient::Observer { |
22 public: | 21 public: |
23 // This class registers/unregisters itself as an observer in ctor/dtor. | 22 // This class registers/unregisters itself as an observer in ctor/dtor. |
24 PowerEventObserver(); | 23 PowerEventObserver(); |
25 virtual ~PowerEventObserver(); | 24 virtual ~PowerEventObserver(); |
26 | 25 |
(...skipping 10 matching lines...) Expand all Loading... |
37 bool screen_locked_; | 36 bool screen_locked_; |
38 | 37 |
39 // If set, called when the lock screen has been shown to confirm that the | 38 // If set, called when the lock screen has been shown to confirm that the |
40 // system is ready to be suspended. | 39 // system is ready to be suspended. |
41 base::Closure screen_lock_callback_; | 40 base::Closure screen_lock_callback_; |
42 | 41 |
43 private: | 42 private: |
44 DISALLOW_COPY_AND_ASSIGN(PowerEventObserver); | 43 DISALLOW_COPY_AND_ASSIGN(PowerEventObserver); |
45 }; | 44 }; |
46 | 45 |
47 } // namespace internal | |
48 } // namespace chromeos | 46 } // namespace chromeos |
49 | 47 |
50 #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_ | 48 #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_EVENT_OBSERVER_H_ |
OLD | NEW |