OLD | NEW |
---|---|
(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 | |
OLD | NEW |