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

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

Issue 2649573004: Mojo bindings: merge the control messages of sending disconnect reason and notifying endpoint close… (Closed)
Patch Set: Created 3 years, 11 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/pipe_control_message_proxy.h
diff --git a/mojo/public/cpp/bindings/pipe_control_message_proxy.h b/mojo/public/cpp/bindings/pipe_control_message_proxy.h
index f5da26b7493a2f23daec6b1b0ab22dc11a2e0128..24005c2f93ff209bd69f1467e6b6328192a84ad6 100644
--- a/mojo/public/cpp/bindings/pipe_control_message_proxy.h
+++ b/mojo/public/cpp/bindings/pipe_control_message_proxy.h
@@ -6,9 +6,12 @@
#define MOJO_PUBLIC_CPP_BINDINGS_PIPE_CONTROL_MESSAGE_PROXY_H_
#include "base/macros.h"
+#include "base/optional.h"
#include "mojo/public/cpp/bindings/bindings_export.h"
+#include "mojo/public/cpp/bindings/disconnect_reason.h"
#include "mojo/public/cpp/bindings/interface_id.h"
#include "mojo/public/cpp/bindings/lib/serialization_context.h"
+#include "mojo/public/cpp/bindings/message.h"
namespace mojo {
@@ -23,9 +26,14 @@ class MOJO_CPP_BINDINGS_EXPORT PipeControlMessageProxy {
// be used from multiple threads, |receiver| must be thread-safe.
explicit PipeControlMessageProxy(MessageReceiver* receiver);
- void NotifyPeerEndpointClosed(InterfaceId id);
+ void NotifyPeerEndpointClosed(InterfaceId id,
+ const base::Optional<DisconnectReason>& reason);
void NotifyEndpointClosedBeforeSent(InterfaceId id);
+ static Message ConstructPeerEndpointClosedMessage(
+ InterfaceId id,
+ const base::Optional<DisconnectReason>& reason);
+
private:
// Not owned.
MessageReceiver* receiver_;

Powered by Google App Engine
This is Rietveld 408576698