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

Side by Side Diff: content/browser/memory/memory_message_filter.cc

Issue 1332583002: Architecture for cross-process memory notification suppressing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment explaining the use of scoped_ptr in the browser test matcher 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 unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « content/browser/memory/memory_message_filter.h ('k') | content/browser/memory/memory_pressure_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698