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

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

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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/error_handler.h
diff --git a/mojo/public/cpp/bindings/error_handler.h b/mojo/public/cpp/bindings/error_handler.h
index 25c0d651b21b3ed8f72535676e8a57941961cf70..a6f0a4aa1529c4fa064053bcc3f822d3206c8507 100644
--- a/mojo/public/cpp/bindings/error_handler.h
+++ b/mojo/public/cpp/bindings/error_handler.h
@@ -7,10 +7,20 @@
namespace mojo {
+// This interface is used to report connection errors.
class ErrorHandler {
public:
virtual ~ErrorHandler() {}
- virtual void OnError() = 0;
+ virtual void OnConnectionError() = 0;
+};
+
+// Used when you'd like to extend a base class with the same method signature
+// as ErrorHandler.
+template <typename Base>
+class WithErrorHandler : public Base {
+ public:
+ virtual ~WithErrorHandler() {}
+ virtual void OnConnectionError() = 0;
};
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698