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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/ShellMojoTestUtils.java

Issue 2191033002: Split ServiceRegistryAndroid into InterfaceRegistryAndroid and InterfaceProviderAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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/shell/android/java/src/org/chromium/content_shell/ShellMojoTestUtils.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/ShellMojoTestUtils.java b/content/shell/android/java/src/org/chromium/content_shell/ShellMojoTestUtils.java
index b50e1a7ab25d245531f64390feeb1a167148bfef..853094e0989a54aa714145fee0126d1ff4761022 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/ShellMojoTestUtils.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/ShellMojoTestUtils.java
@@ -6,11 +6,13 @@ package org.chromium.content_shell;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
-import org.chromium.content.browser.ServiceRegistry;
+import org.chromium.content.browser.InterfaceProvider;
+import org.chromium.content.browser.InterfaceRegistry;
import org.chromium.mojo.system.Pair;
/**
- * Test hooks for Mojo service support in the browser. See http://crbug.com/415945.
+ * Test hooks for shell InterfaceRegistry/Provider support in the browser.
+ * See http://crbug.com/415945.
*/
@JNINamespace("content")
public class ShellMojoTestUtils {
@@ -23,15 +25,15 @@ public class ShellMojoTestUtils {
}
/**
- * Yields two ServiceRegistries bound to each other.
+ * Returns an InterfaceRegistry and an InterfaceProvider bound to it.
*/
- public static Pair<ServiceRegistry, ServiceRegistry> createServiceRegistryPair(
+ public static Pair<InterfaceRegistry, InterfaceProvider> createInterfaceRegistryAndProvider(
long testEnvironment) {
- // Declaring parametrized return type for nativeCreateServiceRegistryPair() breaks the JNI
- // generator. TODO(ppi): support parametrized return types in the JNI generator.
+ // Declaring parametrized return type for nativeCreateInterfaceRegistryAndProvider() breaks
+ // the JNI generator. TODO(ppi): support parametrized return types in the JNI generator.
@SuppressWarnings("unchecked")
- Pair<ServiceRegistry, ServiceRegistry> pair =
- nativeCreateServiceRegistryPair(testEnvironment);
+ Pair<InterfaceRegistry, InterfaceProvider> pair =
+ nativeCreateInterfaceRegistryAndProvider(testEnvironment);
return pair;
}
@@ -40,13 +42,12 @@ public class ShellMojoTestUtils {
}
@CalledByNative
- public static Pair makePair(ServiceRegistry serviceRegistryA,
- ServiceRegistry serviceRegistryB) {
- return new Pair<ServiceRegistry, ServiceRegistry>(serviceRegistryA, serviceRegistryB);
+ public static Pair makePair(InterfaceRegistry registry, InterfaceProvider provider) {
+ return new Pair<InterfaceRegistry, InterfaceProvider>(registry, provider);
}
private static native long nativeSetupTestEnvironment();
private static native void nativeTearDownTestEnvironment(long testEnvironment);
- private static native Pair nativeCreateServiceRegistryPair(long testEnvironment);
+ private static native Pair nativeCreateInterfaceRegistryAndProvider(long testEnvironment);
private static native void nativeRunLoop(long timeoutMs);
}
« no previous file with comments | « content/public/browser/android/service_registry_android.h ('k') | content/shell/browser/shell_mojo_test_utils_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698