Index: content/child/memory_pressure_message_filter.h |
diff --git a/content/child/memory_pressure_message_filter.h b/content/child/memory_pressure_message_filter.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e44947ad9a895977be6a35d702947eeb9be01250 |
--- /dev/null |
+++ b/content/child/memory_pressure_message_filter.h |
@@ -0,0 +1,34 @@ |
+// Copyright 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_CHILD_MEMORY_PRESSURE_MESSAGE_FILTER_H_ |
+#define CONTENT_CHILD_MEMORY_PRESSURE_MESSAGE_FILTER_H_ |
+ |
+#include "base/memory/memory_pressure_listener.h" |
+#include "ipc/ipc_channel_proxy.h" |
+ |
+struct MemoryPressureMsg; |
+ |
+namespace content { |
+ |
+class MemoryPressureMessageFilter : public IPC::ChannelProxy::MessageFilter { |
+ public: |
+ MemoryPressureMessageFilter(); |
+ |
+ // IPC::Listener implementation. |
+ virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
+ |
+ protected: |
+ virtual ~MemoryPressureMessageFilter(); |
+ |
+ private: |
+ void OnMemoryPressure( |
+ base::MemoryPressureListener::MemoryPressureLevel level); |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MemoryPressureMessageFilter); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_CHILD_MEMORY_PRESSURE_MESSAGE_FILTER_H_ |