Chromium Code Reviews| Index: content/common/power_monitor_message_broadcaster.h |
| diff --git a/content/common/power_monitor_message_broadcaster.h b/content/common/power_monitor_message_broadcaster.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..fe0b72a5f9407f4009b3567fed8bc732dd2be1b6 |
| --- /dev/null |
| +++ b/content/common/power_monitor_message_broadcaster.h |
| @@ -0,0 +1,41 @@ |
| +// 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 CONTENT_COMMON_POWER_MONITOR_MESSAGE_BROADCASTER_H_ |
| +#define CONTENT_COMMON_POWER_MONITOR_MESSAGE_BROADCASTER_H_ |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/ref_counted.h" |
| +#include "base/power_monitor/power_observer.h" |
| + |
| +#include "content/common/content_export.h" |
| + |
| +namespace IPC { |
| + class Sender; |
| +} |
| + |
| +namespace content { |
| + |
| +// A class used to monitor the power state change and communicate it to child |
| +// processes via IPC. |
| +class CONTENT_EXPORT PowerMonitorMessageBroadcaster |
| + : public base::PowerObserver { |
| +public: |
| + PowerMonitorMessageBroadcaster(IPC::Sender* sender); |
|
apatrick_chromium
2013/07/01 23:59:58
Constructor should be explicit
|
| + virtual ~PowerMonitorMessageBroadcaster(); |
| + |
| + // Implement PowerObserver. |
| + virtual void OnPowerStateChange(bool on_battery_power) OVERRIDE; |
| + virtual void OnSuspend() OVERRIDE; |
| + virtual void OnResume() OVERRIDE; |
| + |
| +private: |
| + IPC::Sender* sender_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcaster); |
| +}; |
| + |
| +} // namespace base |
| + |
| +#endif // CONTENT_COMMON_POWER_MONITOR_CLIENT_H_ |
|
Ken Russell (switch to Gerrit)
2013/07/02 09:05:15
Wrong name in #include guard.
|