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

Unified Diff: mojo/public/cpp/bindings/lib/router.h

Issue 1174073002: C++ bindings: support using a callback as connection error handler. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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/lib/router.h
diff --git a/mojo/public/cpp/bindings/lib/router.h b/mojo/public/cpp/bindings/lib/router.h
index cc67b3b8a9cbe8cbb5b3670fd85596316514fba2..729a5faf87aeac761b0f795467cb4960ddc45609 100644
--- a/mojo/public/cpp/bindings/lib/router.h
+++ b/mojo/public/cpp/bindings/lib/router.h
@@ -7,6 +7,7 @@
#include <map>
+#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/public/cpp/bindings/lib/connector.h"
#include "mojo/public/cpp/bindings/lib/filter_chain.h"
#include "mojo/public/cpp/bindings/lib/shared_data.h"
@@ -30,8 +31,8 @@ class Router : public MessageReceiverWithResponder {
// Sets the error handler to receive notifications when an error is
// encountered while reading from the pipe or waiting to read from the pipe.
- void set_error_handler(ErrorHandler* error_handler) {
- connector_.set_error_handler(error_handler);
+ void set_connection_error_handler(const Closure& error_handler) {
+ connector_.set_connection_error_handler(error_handler);
}
// Returns true if an error was encountered while reading from the pipe or

Powered by Google App Engine
This is Rietveld 408576698