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

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

Issue 2260433006: Add delegate and factory function for ChildMemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: export Created 4 years, 4 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
new file mode 100644
index 0000000000000000000000000000000000000000..2cdc8f57528e27bf8b808ba2d453fbd8af1b70d8
--- /dev/null
+++ b/components/memory_coordinator/child/child_memory_coordinator_impl_android.h
@@ -0,0 +1,30 @@
+// Copyright 2016 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 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/child/child_memory_coordinator_impl.h"
+
+namespace memory_coordinator {
+
+class MEMORY_COORDINATOR_EXPORT ChildMemoryCoordinatorImplAndroid
+ : public ChildMemoryCoordinatorImpl {
+ 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);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ChildMemoryCoordinatorImplAndroid);
+};
+
+} // namespace memory_coordinator
+
+#endif // COMPONENTS_MEMORY_COORDINATOR_CHILD_CHILD_MEMORY_COORDINATOR_IMPL_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698