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

Unified Diff: content/browser/mojo/service_registrar_android.cc

Issue 641703002: Rewrite the Android implementation of BatteryMonitor directly in Java. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@battery-status-api-to-mojo
Patch Set: Address Torne's comment. Created 6 years 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
« no previous file with comments | « content/browser/mojo/service_registrar_android.h ('k') | content/browser/mojo/service_registry_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/service_registrar_android.cc
diff --git a/content/browser/mojo/service_registrar_android.cc b/content/browser/mojo/service_registrar_android.cc
new file mode 100644
index 0000000000000000000000000000000000000000..768312eff998d0aef88d8973d5fe36c70d106bd2
--- /dev/null
+++ b/content/browser/mojo/service_registrar_android.cc
@@ -0,0 +1,26 @@
+// Copyright 2014 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 "content/browser/mojo/service_registrar_android.h"
+
+#include "base/android/jni_android.h"
+#include "content/browser/mojo/service_registry_android.h"
+#include "jni/ServiceRegistrar_jni.h"
+
+namespace content {
+
+// static
+bool ServiceRegistrarAndroid::Register(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+// static
+void ServiceRegistrarAndroid::RegisterProcessHostServices(
+ ServiceRegistryAndroid* registry) {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ Java_ServiceRegistrar_registerProcessHostServices(env,
+ registry->GetObj().obj());
+}
+
+} // namespace content
« no previous file with comments | « content/browser/mojo/service_registrar_android.h ('k') | content/browser/mojo/service_registry_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698