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

Unified Diff: content/browser/android/service_registry_android_impl.h

Issue 1831173002: Scaffolding for Android implementation of PaymentRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo
Patch Set: thestig@ & esprehn@ comments Created 4 years, 8 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: 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_
« no previous file with comments | « content/browser/android/browser_jni_registrar.cc ('k') | content/browser/android/service_registry_android_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698