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

Side by Side Diff: content/common/power_monitor_service.cc

Issue 17074009: Created multi-process-friendly PowerMonitor interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.
scottmg 2013/06/22 00:11:24 it seems like this file should be in content/brows
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/common/power_monitor_service.h"
6
7 #include "content/common/power_monitor_messages.h"
8 #include "ipc/ipc_sender.h"
9
10 namespace content {
11
12 PowerMonitorService::PowerMonitorService(IPC::Sender* sender)
13 : sender_(sender) {
14
15 }
16
17 PowerMonitorService::~PowerMonitorService() {
18 }
19
20 void PowerMonitorService::OnPowerStateChange(bool on_battery_power) {
21 sender_->Send(new PowerMonitorMsg_PowerStateChange(on_battery_power));
22 }
23
24 void PowerMonitorService::OnSuspend() {
25 sender_->Send(new PowerMonitorMsg_Suspend());
26 }
27
28 void PowerMonitorService::OnResume() {
29 sender_->Send(new PowerMonitorMsg_Resume());
30 }
31
32 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698