| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ |
| 6 #define CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ | 6 #define CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "content/public/browser/android/service_registry_android.h" | 11 #include "content/public/browser/android/service_registry_android.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class ServiceRegistryAndroidImpl : public ServiceRegistryAndroid { | 15 class ServiceRegistryAndroidImpl : public ServiceRegistryAndroid { |
| 16 public: | 16 public: |
| 17 static bool Register(JNIEnv* env); | 17 static bool Register(JNIEnv* env); |
| 18 | 18 |
| 19 ~ServiceRegistryAndroidImpl() override; | 19 ~ServiceRegistryAndroidImpl() override; |
| 20 | 20 |
| 21 private: | 21 private: |
| 22 friend class ServiceRegistryAndroid; | 22 friend class ServiceRegistryAndroid; |
| 23 | 23 |
| 24 // Use ServiceRegistryAndroid::Create() to create an instance. | 24 // Use ServiceRegistryAndroid::Create() to create an instance. |
| 25 ServiceRegistryAndroidImpl(shell::InterfaceRegistry* interface_registry, | 25 ServiceRegistryAndroidImpl(shell::InterfaceRegistry* interface_registry, |
| 26 shell::InterfaceProvider* remote_interfaces); | 26 shell::InterfaceProvider* remote_interfaces); |
| 27 explicit ServiceRegistryAndroidImpl(ServiceRegistry* service_registry); | |
| 28 | 27 |
| 29 // ServiceRegistryAndroid implementation: | 28 // ServiceRegistryAndroid implementation: |
| 30 void AddService( | 29 void AddService( |
| 31 JNIEnv* env, | 30 JNIEnv* env, |
| 32 const base::android::JavaParamRef<jobject>& j_service_registry, | 31 const base::android::JavaParamRef<jobject>& j_service_registry, |
| 33 const base::android::JavaParamRef<jobject>& j_manager, | 32 const base::android::JavaParamRef<jobject>& j_manager, |
| 34 const base::android::JavaParamRef<jobject>& j_factory, | 33 const base::android::JavaParamRef<jobject>& j_factory, |
| 35 const base::android::JavaParamRef<jstring>& j_name) override; | 34 const base::android::JavaParamRef<jstring>& j_name) override; |
| 36 void RemoveService( | 35 void RemoveService( |
| 37 JNIEnv* env, | 36 JNIEnv* env, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 48 shell::InterfaceRegistry* interface_registry_ = nullptr; | 47 shell::InterfaceRegistry* interface_registry_ = nullptr; |
| 49 shell::InterfaceProvider* remote_interfaces_ = nullptr; | 48 shell::InterfaceProvider* remote_interfaces_ = nullptr; |
| 50 base::android::ScopedJavaGlobalRef<jobject> obj_; | 49 base::android::ScopedJavaGlobalRef<jobject> obj_; |
| 51 | 50 |
| 52 DISALLOW_COPY_AND_ASSIGN(ServiceRegistryAndroidImpl); | 51 DISALLOW_COPY_AND_ASSIGN(ServiceRegistryAndroidImpl); |
| 53 }; | 52 }; |
| 54 | 53 |
| 55 } // namespace content | 54 } // namespace content |
| 56 | 55 |
| 57 #endif // CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ | 56 #endif // CONTENT_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_IMPL_H_ |
| OLD | NEW |