Index: content/common/power_monitor_service.cc |
diff --git a/content/common/power_monitor_service.cc b/content/common/power_monitor_service.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2519458de896f57b7d5b02893dc2943a740fbaf7 |
--- /dev/null |
+++ b/content/common/power_monitor_service.cc |
@@ -0,0 +1,32 @@ |
+// 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
|
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/common/power_monitor_service.h" |
+ |
+#include "content/common/power_monitor_messages.h" |
+#include "ipc/ipc_sender.h" |
+ |
+namespace content { |
+ |
+PowerMonitorService::PowerMonitorService(IPC::Sender* sender) |
+ : sender_(sender) { |
+ |
+} |
+ |
+PowerMonitorService::~PowerMonitorService() { |
+} |
+ |
+void PowerMonitorService::OnPowerStateChange(bool on_battery_power) { |
+ sender_->Send(new PowerMonitorMsg_PowerStateChange(on_battery_power)); |
+} |
+ |
+void PowerMonitorService::OnSuspend() { |
+ sender_->Send(new PowerMonitorMsg_Suspend()); |
+} |
+ |
+void PowerMonitorService::OnResume() { |
+ sender_->Send(new PowerMonitorMsg_Resume()); |
+} |
+ |
+} // namespace content |