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 #ifndef CONTENT_CHILD_MEMORY_CHILD_MEMORY_MESSAGE_FILTER_H_ | |
6 #define CONTENT_CHILD_MEMORY_CHILD_MEMORY_MESSAGE_FILTER_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/memory_pressure_listener.h" | |
10 #include "ipc/message_filter.h" | |
11 | |
12 namespace content { | |
13 | |
14 // This class receives memory messages in child processes. | |
15 // See also: memory_message_filter.h | |
16 class ChildMemoryMessageFilter : public IPC::MessageFilter { | |
17 public: | |
18 ChildMemoryMessageFilter(); | |
19 | |
20 // IPC::MessageFilter implementation. | |
21 bool OnMessageReceived(const IPC::Message& message) override; | |
22 | |
23 protected: | |
24 ~ChildMemoryMessageFilter() override; | |
25 | |
26 private: | |
27 void OnSetPressureNotificationsSuppressed(bool suppressed); | |
28 void OnSimulatePressureNotification( | |
29 base::MemoryPressureListener::MemoryPressureLevel level); | |
30 void OnPressureNotification( | |
31 base::MemoryPressureListener::MemoryPressureLevel level); | |
32 | |
33 DISALLOW_COPY_AND_ASSIGN(ChildMemoryMessageFilter); | |
34 }; | |
35 | |
36 } // namespace content | |
37 | |
38 #endif // CONTENT_CHILD_MEMORY_CHILD_MEMORY_MESSAGE_FILTER_H_ | |
OLD | NEW |