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

Unified Diff: mojo/public/cpp/bindings/lib/control_message_handler.cc

Issue 2318793002: Mojo C++ bindings: support disconnect with a reason. (Closed)
Patch Set: . Created 4 years, 3 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/control_message_handler.cc
diff --git a/mojo/public/cpp/bindings/lib/control_message_handler.cc b/mojo/public/cpp/bindings/lib/control_message_handler.cc
index b112489475bd29e525495a1fec9af93c54d6c8a9..bfd785df087a2135482251916840f9d7716d52e4 100644
--- a/mojo/public/cpp/bindings/lib/control_message_handler.cc
+++ b/mojo/public/cpp/bindings/lib/control_message_handler.cc
@@ -141,6 +141,13 @@ bool ControlMessageHandler::RunOrClosePipe(Message* message) {
auto& input = *params_ptr->input;
if (input.is_require_version())
return interface_version_ >= input.get_require_version()->version;
+ else if (input.is_send_disconnect_reason()) {
+ disconnect_custom_reason_ =
+ input.get_send_disconnect_reason()->custom_reason;
+ disconnect_description_ =
+ std::move(input.get_send_disconnect_reason()->description);
+ return true;
+ }
return false;
}
« no previous file with comments | « mojo/public/cpp/bindings/lib/control_message_handler.h ('k') | mojo/public/cpp/bindings/lib/control_message_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698