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

Unified Diff: mojo/public/cpp/bindings/lib/interface_ptr_internal.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/interface_ptr_internal.h
diff --git a/mojo/public/cpp/bindings/lib/interface_ptr_internal.h b/mojo/public/cpp/bindings/lib/interface_ptr_internal.h
index e88084fe324a3f557f48595f44b22dec0f4a079d..5ef6742847b4634622e100ad87f32ba97439b1c2 100644
--- a/mojo/public/cpp/bindings/lib/interface_ptr_internal.h
+++ b/mojo/public/cpp/bindings/lib/interface_ptr_internal.h
@@ -7,6 +7,7 @@
#include <algorithm> // For |std::swap()|.
+#include "mojo/public/cpp/bindings/callback.h"
#include "mojo/public/cpp/bindings/interface_ptr_info.h"
#include "mojo/public/cpp/bindings/lib/control_message_proxy.h"
#include "mojo/public/cpp/bindings/lib/filter_chain.h"
@@ -111,11 +112,11 @@ class InterfacePtrState {
return router_ ? router_->encountered_error() : false;
}
- void set_error_handler(ErrorHandler* error_handler) {
+ void set_connection_error_handler(const Closure& error_handler) {
ConfigureProxyIfNecessary();
MOJO_DCHECK(router_);
- router_->set_error_handler(error_handler);
+ router_->set_connection_error_handler(error_handler);
}
Router* router_for_testing() {

Powered by Google App Engine
This is Rietveld 408576698