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 BASE_POWER_MONITOR_POWER_MONITOR_SOURCE_H_ | 5 #ifndef BASE_POWER_MONITOR_POWER_MONITOR_SOURCE_H_ |
6 #define BASE_POWER_MONITOR_POWER_MONITOR_SOURCE_H_ | 6 #define BASE_POWER_MONITOR_POWER_MONITOR_SOURCE_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/observer_list_threadsafe.h" | 11 #include "base/observer_list_threadsafe.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 | 15 |
16 class PowerMonitor; | 16 class PowerMonitor; |
17 | 17 |
18 // Communicates power state changes to the power monitor. | 18 // Communicates power state changes to the power monitor. |
19 class BASE_EXPORT PowerMonitorSource { | 19 class BASE_EXPORT PowerMonitorSource { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // This lock guards access to on_battery_power_, to ensure that | 56 // This lock guards access to on_battery_power_, to ensure that |
57 // IsOnBatteryPower can be called from any thread. | 57 // IsOnBatteryPower can be called from any thread. |
58 Lock battery_lock_; | 58 Lock battery_lock_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(PowerMonitorSource); | 60 DISALLOW_COPY_AND_ASSIGN(PowerMonitorSource); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace base | 63 } // namespace base |
64 | 64 |
65 #endif // BASE_POWER_MONITOR_POWER_MONITOR_SOURCE_H_ | 65 #endif // BASE_POWER_MONITOR_POWER_MONITOR_SOURCE_H_ |
OLD | NEW |