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

Unified Diff: mojo/public/cpp/bindings/interface.h

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: snapshot Created 6 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: mojo/public/cpp/bindings/interface.h
diff --git a/mojo/public/cpp/bindings/interface.h b/mojo/public/cpp/bindings/interface.h
index bba8fef89fc685b0f6b46841363450f5cb321009..82d0bd41f8b8c3b6abc77757dc247fc58b7bce71 100644
--- a/mojo/public/cpp/bindings/interface.h
+++ b/mojo/public/cpp/bindings/interface.h
@@ -16,28 +16,39 @@ namespace mojo {
// NoInterface is for use in cases when a non-existent or empty interface is
// needed (e.g., when the Mojom "Peer" attribute is not present).
-class NoInterface;
+class NoInterfaceProxy;
+class NoInterfaceStub;
+
+class NoInterface {
+ public:
+ typedef NoInterfaceProxy Proxy_;
+ typedef NoInterfaceStub Stub_;
+ typedef NoInterface Client_;
+ virtual ~NoInterface() {}
+ virtual void SetClient(NoInterface* client) {}
+};
+
+class NoInterfaceProxy : public NoInterface {
+ public:
+ explicit NoInterfaceProxy(MessageReceiver* receiver) {}
+};
class NoInterfaceStub : public MessageReceiver {
public:
- NoInterfaceStub(NoInterface* unused) {}
+ NoInterfaceStub() {}
+ void set_sink(NoInterface* sink) {}
virtual bool Accept(Message* message) MOJO_OVERRIDE;
virtual bool AcceptWithResponder(Message* message, MessageReceiver* responder)
MOJO_OVERRIDE;
};
-class NoInterface {
- public:
- typedef NoInterfaceStub _Stub;
- typedef NoInterface _Peer;
-};
-
// AnyInterface is for use in cases where any interface would do (e.g., see the
// Shell::Connect method).
typedef NoInterface AnyInterface;
+#if 0
// InterfaceHandle<S>
@@ -83,6 +94,7 @@ class InterfacePipe {
typename Interface<S>::ScopedHandle handle_to_self;
typename Interface<P>::ScopedHandle handle_to_peer;
};
+#endif
// TODO(darin): Once we have the ability to use C++11 features, consider
// defining a template alias for ScopedInterfaceHandle<S>.

Powered by Google App Engine
This is Rietveld 408576698