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

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

Issue 2110543004: Move JNI bindings for url_formatter from chrome to //components/url_formatter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/url_formatter/android/component_jni_registrar.cc
diff --git a/components/url_formatter/android/component_jni_registrar.cc b/components/url_formatter/android/component_jni_registrar.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c62ec65d297c8d559f8f14a2e5d0fcbcf509335a
--- /dev/null
+++ b/components/url_formatter/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/url_formatter/android/component_jni_registrar.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_registrar.h"
+#include "components/url_formatter/url_formatter_android.h"
+
+namespace url_formatter {
+
+namespace android {
+
+bool RegisterUrlFormatter(JNIEnv* env) {
+ constexpr base::android::RegistrationMethod register_methods[] = {
+ {"UrlFormatter", url_formatter::android::RegisterUrlFormatterNatives},
+ };
+
+ return base::android::RegisterNativeMethods(
+ env, register_methods,
+ arraysize(register_methods));
+}
+
+} // namespace android
+
+} // namespace url_formatter

Powered by Google App Engine
This is Rietveld 408576698