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

Side by Side Diff: base/system_monitor.h

Issue 179028: Revert "Fix a ton of compiler warnings." (Closed)
Patch Set: Created 11 years, 3 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 unified diff | Download patch
« no previous file with comments | « base/stats_table_unittest.cc ('k') | base/task.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 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_SYSTEM_MONITOR_H_ 5 #ifndef BASE_SYSTEM_MONITOR_H_
6 #define BASE_SYSTEM_MONITOR_H_ 6 #define BASE_SYSTEM_MONITOR_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 // Windows HiRes timers drain the battery faster so we need to know the battery 10 // Windows HiRes timers drain the battery faster so we need to know the battery
11 // status. This isn't true for other platforms. 11 // status. This isn't true for other platforms.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 public: 65 public:
66 // Notification of a change in power status of the computer, such 66 // Notification of a change in power status of the computer, such
67 // as from switching between battery and A/C power. 67 // as from switching between battery and A/C power.
68 virtual void OnPowerStateChange(SystemMonitor*) = 0; 68 virtual void OnPowerStateChange(SystemMonitor*) = 0;
69 69
70 // Notification that the system is suspending. 70 // Notification that the system is suspending.
71 virtual void OnSuspend(SystemMonitor*) = 0; 71 virtual void OnSuspend(SystemMonitor*) = 0;
72 72
73 // Notification that the system is resuming. 73 // Notification that the system is resuming.
74 virtual void OnResume(SystemMonitor*) = 0; 74 virtual void OnResume(SystemMonitor*) = 0;
75
76 protected:
77 ~PowerObserver() {}
78 }; 75 };
79 76
80 // Add a new observer. 77 // Add a new observer.
81 // Can be called from any thread. 78 // Can be called from any thread.
82 // Must not be called from within a notification callback. 79 // Must not be called from within a notification callback.
83 void AddObserver(PowerObserver* obs); 80 void AddObserver(PowerObserver* obs);
84 81
85 // Remove an existing observer. 82 // Remove an existing observer.
86 // Can be called from any thread. 83 // Can be called from any thread.
87 // Must not be called from within a notification callback. 84 // Must not be called from within a notification callback.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #if defined(ENABLE_BATTERY_MONITORING) 120 #if defined(ENABLE_BATTERY_MONITORING)
124 base::OneShotTimer<SystemMonitor> delayed_battery_check_; 121 base::OneShotTimer<SystemMonitor> delayed_battery_check_;
125 #endif 122 #endif
126 123
127 DISALLOW_COPY_AND_ASSIGN(SystemMonitor); 124 DISALLOW_COPY_AND_ASSIGN(SystemMonitor);
128 }; 125 };
129 126
130 } 127 }
131 128
132 #endif // BASE_SYSTEM_MONITOR_H_ 129 #endif // BASE_SYSTEM_MONITOR_H_
OLDNEW
« no previous file with comments | « base/stats_table_unittest.cc ('k') | base/task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698