Index: base/power_monitor/power_observer.h |
diff --git a/base/time/default_clock.h b/base/power_monitor/power_observer.h |
similarity index 27% |
copy from base/time/default_clock.h |
copy to base/power_monitor/power_observer.h |
index 2022d5cdbab50f5651c8513ee4a6b8eda79f1426..6be70bba9d5368dfa0cf7a4f145247a1334430ec 100644 |
--- a/base/time/default_clock.h |
+++ b/base/power_monitor/power_observer.h |
@@ -1,25 +1,31 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef BASE_DEFAULT_CLOCK_H_ |
-#define BASE_DEFAULT_CLOCK_H_ |
+#ifndef BASE_POWER_MONITOR_POWER_OBSERVER_H_ |
+#define BASE_POWER_MONITOR_POWER_OBSERVER_H_ |
#include "base/base_export.h" |
#include "base/compiler_specific.h" |
-#include "base/time/clock.h" |
namespace base { |
-// DefaultClock is a Clock implementation that uses Time::Now(). |
-class BASE_EXPORT DefaultClock : public Clock { |
+class BASE_EXPORT PowerObserver { |
public: |
- virtual ~DefaultClock(); |
+ // Notification of a change in power status of the computer, such |
+ // as from switching between battery and A/C power. |
+ virtual void OnPowerStateChange(bool on_battery_power) {}; |
- // Simply returns Time::Now(). |
- virtual Time Now() OVERRIDE; |
+ // Notification that the system is suspending. |
+ virtual void OnSuspend() {} |
+ |
+ // Notification that the system is resuming. |
+ virtual void OnResume() {} |
+ |
+ protected: |
+ virtual ~PowerObserver() {} |
}; |
} // namespace base |
-#endif // BASE_DEFAULT_CLOCK_H_ |
+#endif // BASE_POWER_MONITOR_POWER_OBSERVER_H_ |