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

Unified Diff: content/common/power_monitor_message_filter.h

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 side-by-side diff with in-line comments
Download patch
Index: content/common/power_monitor_message_filter.h
diff --git a/content/common/power_monitor_message_filter.h b/content/common/power_monitor_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..3d8a732fa576f1bdadfa14c8d87c62d900ede81b
--- /dev/null
+++ b/content/common/power_monitor_message_filter.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_POWER_MONITOR_MESSAGE_FILTER_H_
+#define CONTENT_COMMON_POWER_MONITOR_MESSAGE_FILTER_H_
+
+#include "ipc/ipc_channel.h"
+#include "ipc/ipc_channel_proxy.h"
+
+namespace content {
+
+class PowerMonitorClient;
+
+class PowerMonitorMessageFilter : public IPC::ChannelProxy::MessageFilter {
+ public:
+ PowerMonitorMessageFilter();
Ken Russell (switch to Gerrit) 2013/06/24 22:54:38 It seems confusing to me that the PowerMonitorMess
bajones 2013/06/25 18:33:34 I agree. This entire class is being removed, howev
+
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ private:
+ virtual ~PowerMonitorMessageFilter();
+
+ void OnPowerStateChange(bool on_battery_power);
+ void OnSuspend();
+ void OnResume();
+
+ PowerMonitorClient* client_;
+
+ DISALLOW_COPY_AND_ASSIGN(PowerMonitorMessageFilter);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_POWER_MONITOR_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698