Chromium Code Reviews| Index: base/android/memory_pressure_handler_android.h |
| diff --git a/base/android/memory_pressure_handler_android.h b/base/android/memory_pressure_handler_android.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..22b2e18b3b0833e90c75d3c96b4f6bce71115ca5 |
| --- /dev/null |
| +++ b/base/android/memory_pressure_handler_android.h |
| @@ -0,0 +1,30 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_ANDROID_MEMORY_PRESSURE_HANDLER_ANDROID_H_ |
| +#define CHROME_BROWSER_ANDROID_MEMORY_PRESSURE_HANDLER_ANDROID_H_ |
|
joth
2013/06/05 19:28:58
is this guy still a 'handler' ?
bulach
2013/06/06 09:28:30
renamed to memory_pressure_android (and fixed the
|
| + |
| +#include "base/android/jni_android.h" |
| + |
| +namespace base { |
| +namespace android { |
| + |
| +// Implements the C++ counter part of MemoryPressureHandler.java |
| +class MemoryPressureHandlerAndroid { |
| + public: |
| + static bool Register(JNIEnv* env); |
| + |
| + static void RegisterSystemCallback(JNIEnv* env); |
|
joth
2013/06/05 19:28:58
rather than require embedder to call this, we coul
joth
2013/06/05 19:49:48
but nead caution if we do this as we (probably) wa
bulach
2013/06/06 09:28:30
I'd rather keep it simple for the time being.. onc
|
| + |
| + // Called by JNI. |
| + static void OnMemoryPressure(int memory_pressure_type); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(MemoryPressureHandlerAndroid); |
| +}; |
| + |
| +} // namespace android |
| +} // namespace base |
| + |
| +#endif // CHROME_BROWSER_ANDROID_MEMORY_PRESSURE_HANDLER_ANDROID_H_ |