Index: content/browser/memory/memory_message_filter.cc |
diff --git a/content/browser/memory/memory_message_filter.cc b/content/browser/memory/memory_message_filter.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b386717789ea162798019087a797fc22258c309c |
--- /dev/null |
+++ b/content/browser/memory/memory_message_filter.cc |
@@ -0,0 +1,34 @@ |
+// 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. |
+ |
+#include "content/browser/memory/memory_message_filter.h" |
+ |
+#include "content/browser/memory/memory_pressure_controller.h" |
+#include "content/common/memory_messages.h" |
+ |
+namespace content { |
+ |
+MemoryMessageFilter::MemoryMessageFilter() |
+ : BrowserMessageFilter(MemoryMsgStart) {} |
+ |
+MemoryMessageFilter::~MemoryMessageFilter() {} |
+ |
+void MemoryMessageFilter::OnFilterAdded(IPC::Sender* sender) { |
+ MemoryPressureController::GetInstance()->OnMemoryMessageFilterAdded(this); |
+} |
+ |
+void MemoryMessageFilter::OnChannelClosing() { |
+ MemoryPressureController::GetInstance()->OnMemoryMessageFilterRemoved(this); |
+} |
+ |
+bool MemoryMessageFilter::OnMessageReceived(const IPC::Message& message) { |
+ return false; |
+} |
+ |
+void MemoryMessageFilter::SendSetPressureNotificationsSuppressed( |
+ bool suppressed) { |
+ Send(new MemoryMsg_SetPressureNotificationsSuppressed(suppressed)); |
+} |
+ |
+} // namespace content |