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

Unified Diff: components/memory_coordinator/child/child_memory_coordinator_impl_android.h

Issue 2259743002: Add MemoryStateListenerAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: native Created 4 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
Index: components/memory_coordinator/child/child_memory_coordinator_impl_android.h
diff --git a/components/memory_coordinator/child/child_memory_coordinator_impl_android.h b/components/memory_coordinator/child/child_memory_coordinator_impl_android.h
index 2cdc8f57528e27bf8b808ba2d453fbd8af1b70d8..cf26cbeba1c847e42952097457b02df642121d0e 100644
--- a/components/memory_coordinator/child/child_memory_coordinator_impl_android.h
+++ b/components/memory_coordinator/child/child_memory_coordinator_impl_android.h
@@ -5,21 +5,21 @@
#ifndef COMPONENTS_MEMORY_COORDINATOR_CHILD_CHILD_MEMORY_COORDINATOR_IMPL_ANDROID_H_
#define COMPONENTS_MEMORY_COORDINATOR_CHILD_CHILD_MEMORY_COORDINATOR_IMPL_ANDROID_H_
+#include "components/memory_coordinator/android/memory_state_listener_android.h"
#include "components/memory_coordinator/child/child_memory_coordinator_impl.h"
namespace memory_coordinator {
class MEMORY_COORDINATOR_EXPORT ChildMemoryCoordinatorImplAndroid
- : public ChildMemoryCoordinatorImpl {
+ : public ChildMemoryCoordinatorImpl,
+ public MemoryStateListenerAndroidDelegate {
public:
ChildMemoryCoordinatorImplAndroid(mojom::MemoryCoordinatorHandlePtr parent,
ChildMemoryCoordinatorDelegate* delegate);
~ChildMemoryCoordinatorImplAndroid() override;
- // TODO(bashi): Add JNI bindings to listen to OnTrimMemory()
-
- // Android's ComponentCallback2.onTrimMemory() implementation.
- void OnTrimMemory(int level);
+ // MemoryStateListenerAndroidDelegate implementation.
+ void OnTrimMemory(int level) override;
private:
DISALLOW_COPY_AND_ASSIGN(ChildMemoryCoordinatorImplAndroid);

Powered by Google App Engine
This is Rietveld 408576698