#ifndef CONTENT_CHILD_POWER_MONITOR_BROADCAST_SOURCE_H_
#define CONTENT_CHILD_POWER_MONITOR_BROADCAST_SOURCE_H_
#include "base/power_monitor/power_monitor_source.h"
#include "content/common/content_export.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_channel_proxy.h"
namespace content {
class PowerMessageFilter;
class CONTENT_EXPORT PowerMonitorBroadcastSource :
public base::PowerMonitorSource {
public:
explicit PowerMonitorBroadcastSource();
virtual ~PowerMonitorBroadcastSource();
IPC::ChannelProxy::MessageFilter* GetMessageFilter();
private:
friend class PowerMessageFilter;
virtual bool IsOnBatteryPowerImpl() OVERRIDE;
void OnPowerStateChange(bool on_battery_power);
void OnSuspend();
void OnResume();
bool last_reported_battery_power_state_;
scoped_refptr<PowerMessageFilter> message_filter_;
DISALLOW_COPY_AND_ASSIGN(PowerMonitorBroadcastSource);
};
}
#endif