| 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
|
|
|