Roll breakpad to r1408 to bring in DWARF 4 dump_syms fix for PNaCl
[chromium-blink-merge.git] / content / browser / power_monitor_message_broadcaster.h
blob3221fadc690f110f7f877ba726afa5326302273d
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_
6 #define CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_
8 #include "base/basictypes.h"
9 #include "base/power_monitor/power_observer.h"
10 #include "content/common/content_export.h"
12 namespace IPC {
13 class Sender;
16 namespace content {
18 // A class used to monitor the power state change and communicate it to child
19 // processes via IPC.
20 class CONTENT_EXPORT PowerMonitorMessageBroadcaster
21 : public base::PowerObserver {
22 public:
23 explicit PowerMonitorMessageBroadcaster(IPC::Sender* sender);
24 ~PowerMonitorMessageBroadcaster() override;
26 // Implement PowerObserver.
27 void OnPowerStateChange(bool on_battery_power) override;
28 void OnSuspend() override;
29 void OnResume() override;
31 void Init();
33 private:
34 IPC::Sender* sender_;
36 DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcaster);
39 } // namespace content
41 #endif // CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_