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

Unified Diff: components/memory_coordinator/android/component_jni_registrar.cc

Issue 2259743002: Add MemoryStateListenerAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: native 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/android/component_jni_registrar.cc
diff --git a/components/memory_coordinator/android/component_jni_registrar.cc b/components/memory_coordinator/android/component_jni_registrar.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b3c147d1f0aed3522b99c9dd72464341326a6bf1
--- /dev/null
+++ b/components/memory_coordinator/android/component_jni_registrar.cc
@@ -0,0 +1,27 @@
+// 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.
+
+#include "components/memory_coordinator/android/component_jni_registrar.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "base/macros.h"
+#include "components/memory_coordinator/android/memory_state_listener_android.h"
+
+namespace memory_coordinator {
+namespace android {
+
+static base::android::RegistrationMethod kMemoryCoordinatorRegisteredMethods[] =
+ {
+ {"MemoryStateListener", MemoryStateListenerAndroid::Register},
+};
+
+bool RegisterJni(JNIEnv* env) {
+ return base::android::RegisterNativeMethods(
+ env, kMemoryCoordinatorRegisteredMethods,
+ arraysize(kMemoryCoordinatorRegisteredMethods));
+}
+
+} // namespace android
+} // namespace memory_coordinator

Powered by Google App Engine
This is Rietveld 408576698