Index: base/callback_handle.h |
diff --git a/base/power_monitor/power_monitor_device_source_posix.cc b/base/callback_handle.h |
similarity index 55% |
copy from base/power_monitor/power_monitor_device_source_posix.cc |
copy to base/callback_handle.h |
index f24e5b23f0a032b58c0fe19704fc12da97f5d6b5..9d6fc61c127bd603b0264b560dc28af07a00110d 100644 |
--- a/base/power_monitor/power_monitor_device_source_posix.cc |
+++ b/base/callback_handle.h |
@@ -2,13 +2,16 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "base/power_monitor/power_monitor_device_source.h" |
+#ifndef BASE_CALLBACK_HANDLE_H_ |
+#define BASE_CALLBACK_HANDLE_H_ |
namespace base { |
-bool PowerMonitorDeviceSource::IsOnBatteryPowerImpl() { |
- NOTIMPLEMENTED(); |
- return false; |
-} |
+class CallbackHandle { |
awong
2013/09/06 19:03:24
Are you expecting to forward declare this class?
Cait (Slow)
2013/09/06 19:18:37
I think it makes sense to have a top-level base-cl
awong
2013/09/06 19:31:02
Gotcha.
I'd still move it back into callback_regi
Cait (Slow)
2013/09/06 20:18:31
I don't think moving it into callback_registry.h w
|
+ public: |
+ virtual ~CallbackHandle() {} |
erikwright (departed)
2013/09/06 21:01:07
Add an '= 0' here to force this class to be derive
Bernhard Bauer
2013/09/06 21:08:58
That won't work. Every class needs to have a destr
awong
2013/09/06 23:49:30
I might be wrong, but I thought the pattern was to
erikwright (departed)
2013/09/09 16:09:38
You can define it but still mark it pure virtual:
Bernhard Bauer
2013/09/09 16:40:17
Oh, wow. TIL :)
|
+}; |
} // namespace base |
+ |
+#endif // BASE_CALLBACK_HANDLE_H_ |