Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: content/common/power_monitor_message_broadcaster.h

Issue 17074009: Created multi-process-friendly PowerMonitor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Uber-refactor Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_COMMON_POWER_MONITOR_MESSAGE_BROADCASTER_H_
6 #define CONTENT_COMMON_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
12 #include "content/common/content_export.h"
13
14 namespace IPC {
15 class Sender;
16 }
17
18 namespace content {
19
20 // A class used to monitor the power state change and notify the observers about
vandebo (ex-Chrome) 2013/06/26 21:40:33 nit: update comment re ...notify the observers...
21 // the change event.
22 class CONTENT_EXPORT PowerMonitorMessageBroadcaster
23 : public base::PowerObserver {
24 public:
25 PowerMonitorMessageBroadcaster(IPC::Sender* sender);
26 virtual ~PowerMonitorMessageBroadcaster();
27
28 // Implement PowerObserver.
29 virtual void OnPowerStateChange(bool on_battery_power) OVERRIDE;
30 virtual void OnSuspend() OVERRIDE;
31 virtual void OnResume() OVERRIDE;
32
33 private:
34 IPC::Sender* sender_;
35
36 DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageBroadcaster);
37 };
38
39 } // namespace base
40
41 #endif // CONTENT_COMMON_POWER_MONITOR_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698