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

Unified Diff: content/child/memory/child_memory_message_filter.h

Issue 1332583002: Architecture for cross-process memory notification suppressing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split patch Created 5 years, 3 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/child_memory_message_filter.h
diff --git a/content/child/memory/child_memory_message_filter.h b/content/child/memory/child_memory_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..9293df946a31119a42fb11837c3d120a1f50450d
--- /dev/null
+++ b/content/child/memory/child_memory_message_filter.h
@@ -0,0 +1,38 @@
+// Copyright 2015 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_CHILD_MEMORY_MESSAGE_FILTER_H_
+#define CONTENT_CHILD_MEMORY_CHILD_MEMORY_MESSAGE_FILTER_H_
+
+#include "ipc/message_filter.h"
+
+namespace content {
+namespace memory {
+
+// This class sends and receives memory messages on child processes.
+// See also: memory_message_filter.h
+class ChildMemoryMessageFilter : public IPC::MessageFilter {
+ public:
+ ChildMemoryMessageFilter();
+
+ // IPC::MessageFilter implementation.
+ void OnFilterAdded(IPC::Sender* sender) override;
+ void OnFilterRemoved() override;
+ bool OnMessageReceived(const IPC::Message& message) override;
+
+ protected:
+ ~ChildMemoryMessageFilter() override;
+
+ private:
+ void OnSetPressureNotificationsSuppressed(bool suppressed);
+
+ IPC::Sender* sender_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChildMemoryMessageFilter);
+};
+
+} // namespace memory
+} // namespace content
+
+#endif // CONTENT_CHILD_MEMORY_CHILD_MEMORY_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698