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

Unified Diff: content/common/memory_messages.h

Issue 1362233003: Add architecture for simulating memory pressure notifications in all processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nasko's comments 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
« no previous file with comments | « content/child/memory/child_memory_message_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/memory_messages.h
diff --git a/content/common/memory_messages.h b/content/common/memory_messages.h
index a81eaf871491fb2e8bbf1af62e69dcaca94afd3d..6ae158a39681103203a987e41d748189e99eb5d0 100644
--- a/content/common/memory_messages.h
+++ b/content/common/memory_messages.h
@@ -8,6 +8,7 @@
// Multiply-included message header, no traditional include guard.
+#include "base/memory/memory_pressure_listener.h"
#include "ipc/ipc_message_macros.h"
#include "content/common/content_export.h"
@@ -16,7 +17,17 @@
#define IPC_MESSAGE_START MemoryMsgStart
-// Sent to all child processes to enable/disable suppressing memory
+IPC_ENUM_TRAITS_VALIDATE(
+ base::MemoryPressureListener::MemoryPressureLevel,
+ (value == base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE ||
+ value == base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL))
+
+// Sent to all child processes to enable/disable suppressing memory pressure
// notifications.
IPC_MESSAGE_CONTROL1(MemoryMsg_SetPressureNotificationsSuppressed,
bool /* suppressed */)
+
+// Sent to all child processes to simulate a memory pressure notification.
+IPC_MESSAGE_CONTROL1(
+ MemoryMsg_SimulatePressureNotification,
+ base::MemoryPressureListener::MemoryPressureLevel /* level */)
« no previous file with comments | « content/child/memory/child_memory_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698