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

Unified Diff: content/public/browser/android/service_registry_android.h

Issue 1831173002: Scaffolding for Android implementation of PaymentRequest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo
Patch Set: Cleanup 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/public/browser/android/service_registry_android.h
diff --git a/content/browser/mojo/service_registry_android.h b/content/public/browser/android/service_registry_android.h
similarity index 64%
rename from content/browser/mojo/service_registry_android.h
rename to content/public/browser/android/service_registry_android.h
index 17d2cb07bdc632333e81bea4d62afe1e7ac85131..a137cf61740b785a065c3640e4ba96e2aa2736e0 100644
--- a/content/browser/mojo/service_registry_android.h
+++ b/content/public/browser/android/service_registry_android.h
@@ -2,28 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_MOJO_SERVICE_REGISTRY_ANDROID_H_
-#define CONTENT_BROWSER_MOJO_SERVICE_REGISTRY_ANDROID_H_
+#ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_H_
+#define CONTENT_PUBLIC_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_H_
#include <jni.h>
#include "base/android/scoped_java_ref.h"
#include "base/macros.h"
#include "content/common/content_export.h"
+#include "content/public/common/service_registry.h"
namespace content {
-class ServiceRegistryImpl;
-
-// Android wrapper over ServiceRegistryImpl, allowing the browser services in
-// Java to register with ServiceRegistry.java (and abstracting away the JNI
-// calls).
-class CONTENT_EXPORT ServiceRegistryAndroid {
+// Android wrapper over ServiceRegistry, allowing the browser services in Java
+// to register with ServiceRegistry.java (and abstracting away the JNI calls).
+class CONTENT_EXPORT ServiceRegistryAndroid : private ServiceRegistry::Data {
ncarter (slow) 2016/04/05 18:22:40 content/public contains only interfaces & structs,
public:
static bool Register(JNIEnv* env);
+ static ServiceRegistryAndroid* From(ServiceRegistry* registry);
- explicit ServiceRegistryAndroid(ServiceRegistryImpl* service_registry);
- virtual ~ServiceRegistryAndroid();
+ ~ServiceRegistryAndroid() override;
// Methods called from Java.
void AddService(
@@ -45,7 +43,9 @@ class CONTENT_EXPORT ServiceRegistryAndroid {
const base::android::ScopedJavaGlobalRef<jobject>& GetObj() { return obj_; }
private:
- ServiceRegistryImpl* service_registry_;
+ explicit ServiceRegistryAndroid(ServiceRegistry* service_registry);
+
+ ServiceRegistry* service_registry_;
base::android::ScopedJavaGlobalRef<jobject> obj_;
DISALLOW_COPY_AND_ASSIGN(ServiceRegistryAndroid);
@@ -53,4 +53,4 @@ class CONTENT_EXPORT ServiceRegistryAndroid {
} // namespace content
-#endif // CONTENT_BROWSER_MOJO_SERVICE_REGISTRY_ANDROID_H_
+#endif // CONTENT_PUBLIC_BROWSER_ANDROID_SERVICE_REGISTRY_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698