blob: 0f5c8e95abbaa366146ced3c94ad0832bb70ef53 [file] [log] [blame]
Thiabaud Engelbrecht4b017c22024-02-22 18:25:461// Copyright 2024 The Chromium Authors
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 BASE_ANDROID_MEMORY_PURGE_MANAGER_ANDROID_H_
6#define BASE_ANDROID_MEMORY_PURGE_MANAGER_ANDROID_H_
7
8#include "base/android/jni_android.h"
9
10namespace base::android {
11
12class BASE_EXPORT MemoryPurgeManagerAndroid {
13 public:
14 static void Initialize(JNIEnv* env);
15
16 MemoryPurgeManagerAndroid(const MemoryPurgeManagerAndroid&) = delete;
17 MemoryPurgeManagerAndroid& operator=(const MemoryPurgeManagerAndroid&) =
18 delete;
19
20 // Called by JNI
21 static void PostDelayedPurgeTaskOnUiThread(int delay);
22
23 // Called by JNI
24 static bool IsOnPreFreezeMemoryTrimEnabled();
25};
26
27} // namespace base::android
28
29#endif // BASE_ANDROID_MEMORY_PURGE_MANAGER_ANDROID_H_