Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_ | |
| 6 #define CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/memory/ref_counted.h" | |
| 10 #include "base/power_monitor/power_observer.h" | |
| 11 #include "content/common/content_export.h" | |
| 12 #include "content/public/browser/browser_message_filter.h" | |
| 13 #include "content/public/browser/browser_thread.h" | |
| 14 | |
| 15 | |
| 16 namespace IPC { | |
| 17 class Sender; | |
|
jam
2013/07/30 23:52:00
nit: no need, since you're including browser_messa
| |
| 18 } | |
| 19 | |
| 20 namespace content { | |
| 21 | |
| 22 // A class used to monitor the power state change and communicate it to child | |
| 23 // processes via IPC. All interaction with this class must be done on the UI | |
| 24 // thread. | |
|
jam
2013/07/30 23:52:00
when you say all interactions, do you mean also co
| |
| 25 class CONTENT_EXPORT PowerMonitorMessageBroadcaster | |
| 26 : public base::PowerObserver { | |
| 27 public: | |
|
jam
2013/07/30 23:52:00
nit: here and below, space before public
| |
| 28 explicit PowerMonitorMessageBroadcaster(IPC::Sender* sender); | |
| 29 virtual ~PowerMonitorMessageBroadcaster(); | |
| 30 | |
| 31 // Implement PowerObserver. | |
| 32 virtual void OnPowerStateChange(bool on_battery_power) OVERRIDE; | |
| 33 virtual void OnSuspend() OVERRIDE; | |
| 34 virtual void OnResume() OVERRIDE; | |
| 35 | |
| 36 private: | |
| 37 IPC::Sender* sender_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcaster); | |
| 40 }; | |
| 41 | |
| 42 } // namespace base | |
| 43 | |
| 44 #endif // CONTENT_BROWSER_POWER_MONITOR_MESSAGE_BROADCASTER_H_ | |
| OLD | NEW |