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

Unified Diff: mojo/public/cpp/bindings/disconnect_reason.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/disconnect_reason.h
diff --git a/mojo/public/cpp/bindings/disconnect_reason.h b/mojo/public/cpp/bindings/disconnect_reason.h
new file mode 100644
index 0000000000000000000000000000000000000000..c04e8ada538c18b6525b9997b5c069e9067ebbef
--- /dev/null
+++ b/mojo/public/cpp/bindings/disconnect_reason.h
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MOJO_PUBLIC_CPP_BINDINGS_DISCONNECT_REASON_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_DISCONNECT_REASON_H_
+
+#include <stdint.h>
+
+#include <string>
+
+namespace mojo {
+
+struct DisconnectReason {
+ public:
+ DisconnectReason(uint32_t in_custom_reason, const std::string& in_description)
+ : custom_reason(in_custom_reason), description(in_description) {}
+
+ uint32_t custom_reason;
+ std::string description;
+};
+
+} // namespace mojo
+
+#endif // MOJO_PUBLIC_CPP_BINDINGS_DISCONNECT_REASON_H_

Powered by Google App Engine
This is Rietveld 408576698