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

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

Issue 275363002: Internalize ServiceConnector<> (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add OnConnectionEstablished() Created 6 years, 7 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_impl.h
diff --git a/mojo/public/cpp/bindings/interface_impl.h b/mojo/public/cpp/bindings/interface_impl.h
index a9d0947757d728bb773efe0538952ec1556a7151..92d16c75f87daf8828e223a218885c004f94faf4 100644
--- a/mojo/public/cpp/bindings/interface_impl.h
+++ b/mojo/public/cpp/bindings/interface_impl.h
@@ -14,17 +14,20 @@ namespace mojo {
// implementation. It may be bound to a pipe or a proxy, see BindToPipe and
// BindToProxy.
//
-// NOTE: A base class of WithErrorHandler<Interface> is used to avoid multiple
-// inheritance. This base class inserts the signature of ErrorHandler into the
-// inheritance chain.
+// NOTE: A base class of WithInterfaceImplBase<Interface> is used to avoid
+// multiple inheritance. This base class inserts the signature of
+// InterfaceImplBase into the inheritance chain.
template <typename Interface>
-class InterfaceImpl : public WithErrorHandler<Interface> {
+class InterfaceImpl : public internal::WithInterfaceImplBase<Interface> {
public:
typedef typename Interface::Client Client;
InterfaceImpl() : internal_state_(this) {}
virtual ~InterfaceImpl() {}
+ // Subclasses can override this to handle post connection initialization.
+ virtual void OnConnectionEstablished() {}
+
// Subclasses must handle connection errors.
virtual void OnConnectionError() = 0;

Powered by Google App Engine
This is Rietveld 408576698