OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/browser/memory/memory_message_filter.h" |
| 6 |
| 7 #include "content/browser/memory/memory_pressure_controller.h" |
| 8 #include "content/common/memory_messages.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 MemoryMessageFilter::MemoryMessageFilter() |
| 13 : BrowserMessageFilter(MemoryMsgStart) {} |
| 14 |
| 15 MemoryMessageFilter::~MemoryMessageFilter() {} |
| 16 |
| 17 void MemoryMessageFilter::OnFilterAdded(IPC::Sender* sender) { |
| 18 MemoryPressureController::GetInstance()->OnMemoryMessageFilterAdded(this); |
| 19 } |
| 20 |
| 21 void MemoryMessageFilter::OnChannelClosing() { |
| 22 MemoryPressureController::GetInstance()->OnMemoryMessageFilterRemoved(this); |
| 23 } |
| 24 |
| 25 bool MemoryMessageFilter::OnMessageReceived(const IPC::Message& message) { |
| 26 return false; |
| 27 } |
| 28 |
| 29 void MemoryMessageFilter::SendSetPressureNotificationsSuppressed( |
| 30 bool suppressed) { |
| 31 Send(new MemoryMsg_SetPressureNotificationsSuppressed(suppressed)); |
| 32 } |
| 33 |
| 34 } // namespace content |
OLD | NEW |