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

Unified Diff: mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java

Issue 1457383005: Require an explicit ServiceName annotation for interfaces in Java (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Follow review Created 5 years, 1 month 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: mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java
diff --git a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java
index 3167e87dc2b78362757a09506376bbe2d482c85f..38d8114fc1ccb47a5e0dac12d31c5a1e7d313efd 100644
--- a/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java
+++ b/mojo/public/java/bindings/src/org/chromium/mojo/bindings/Interface.java
@@ -333,12 +333,6 @@ public interface Interface extends ConnectionErrorHandler, Closeable {
abstract class Manager<I extends Interface, P extends Proxy> {
/**
- * Returns the name of the interface. This is an opaque (but human readable) identifier used
- * by the service provider to identify services.
- */
- public abstract String getName();
-
- /**
* Returns the version of the managed interface.
*/
public abstract int getVersion();
@@ -440,4 +434,15 @@ public interface Interface extends ConnectionErrorHandler, Closeable {
protected abstract P buildProxy(Core core, MessageReceiverWithResponder messageReceiver);
}
+
+ /**
+ * The |Manager| object for interfaces having an associated service name in the bindings.
+ */
+ abstract class NamedManager<I extends Interface, P extends Proxy> extends Manager<I, P> {
+ /**
+ * Returns the name of the service. This is an opaque (but human readable) identifier used
+ * by the service provider to identify services.
+ */
+ public abstract String getName();
+ }
}

Powered by Google App Engine
This is Rietveld 408576698