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

Unified Diff: content/child/memory_pressure_message_filter.h

Issue 17351006: MemoryPressure: sends the signal to the renderer. (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/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_

Powered by Google App Engine
This is Rietveld 408576698