Index: content/browser/android/service_registry_android_impl.h |
diff --git a/content/browser/android/service_registry_android_impl.h b/content/browser/android/service_registry_android_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2620313c801369cd22330a81e73c15c869bba124 |
--- /dev/null |
+++ b/content/browser/android/service_registry_android_impl.h |
@@ -0,0 +1,53 @@ |
+// 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 CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ |
+#define CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ |
+ |
+#include <jni.h> |
+ |
+#include "base/macros.h" |
+#include "content/public/browser/android/service_registry_android.h" |
+ |
+namespace content { |
+ |
+class ServiceRegistryAndroidImpl : public ServiceRegistryAndroid { |
+ public: |
+ static bool Register(JNIEnv* env); |
+ |
+ ~ServiceRegistryAndroidImpl() override; |
+ |
+ private: |
+ friend class ServiceRegistryAndroid; |
+ |
+ // Use ServiceRegistryAndroid::Create() to create an instance. |
+ explicit ServiceRegistryAndroidImpl(ServiceRegistry* service_registry); |
+ |
+ // ServiceRegistryAndroid implementation: |
+ void AddService( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& j_service_registry, |
+ const base::android::JavaParamRef<jobject>& j_manager, |
+ const base::android::JavaParamRef<jobject>& j_factory, |
+ const base::android::JavaParamRef<jstring>& j_name) override; |
+ void RemoveService( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& j_service_registry, |
+ const base::android::JavaParamRef<jstring>& j_name) override; |
+ void ConnectToRemoteService( |
+ JNIEnv* env, |
+ const base::android::JavaParamRef<jobject>& j_service_registry, |
+ const base::android::JavaParamRef<jstring>& j_name, |
+ jint handle) override; |
+ const base::android::ScopedJavaGlobalRef<jobject>& GetObj() override; |
+ |
+ ServiceRegistry* service_registry_; |
+ base::android::ScopedJavaGlobalRef<jobject> obj_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ServiceRegistryAndroidImpl); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ |