aboutsummaryrefslogtreecommitdiff
path: root/mojo/public/cpp/bindings/connection_error_callback.h
diff options
context:
space:
mode:
authorJay Civelli <jcivelli@google.com>2017-03-29 16:17:00 -0700
committerJay Civelli <jcivelli@google.com>2017-07-24 13:31:43 -0700
commit8ac9103e05b66812c25348943383f9365d1ce3e0 (patch)
tree63a61c9698e719de1a24de6fca21e29401f92842 /mojo/public/cpp/bindings/connection_error_callback.h
parent24543f227908c2e949bb9a15b40276f59fcc9a0a (diff)
downloadlibmojo-8ac9103e05b66812c25348943383f9365d1ce3e0.tar.gz
libmojo: Uprev the library to r456626 from Chromium
Pulled the latest and greatest version of libmojo from Chromium. The merge was done against r456626 which corresponds to git commit 08266b3fca707804065a2cfd60331722ade41969 of Mar 14, 2017 Notable changes are: - generated binding files are now split in 2 files, interface.mojom.h and interface.mojom-shared.h Change-Id: Idcfd27310e2c9d3c452b671c7ff7a755c3963618
Diffstat (limited to 'mojo/public/cpp/bindings/connection_error_callback.h')
-rw-r--r--mojo/public/cpp/bindings/connection_error_callback.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/mojo/public/cpp/bindings/connection_error_callback.h b/mojo/public/cpp/bindings/connection_error_callback.h
new file mode 100644
index 0000000..306e99e
--- /dev/null
+++ b/mojo/public/cpp/bindings/connection_error_callback.h
@@ -0,0 +1,21 @@
+// Copyright 2016 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_CONNECTION_ERROR_CALLBACK_H_
+#define MOJO_PUBLIC_CPP_BINDINGS_CONNECTION_ERROR_CALLBACK_H_
+
+#include "base/callback.h"
+
+namespace mojo {
+
+// This callback type accepts user-defined disconnect reason and description. If
+// the other side specifies a reason on closing the connection, it will be
+// passed to the error handler.
+using ConnectionErrorWithReasonCallback =
+ base::Callback<void(uint32_t /* custom_reason */,
+ const std::string& /* description */)>;
+
+} // namespace mojo
+
+#endif // MOJO_PUBLIC_CPP_BINDINGS_CONNECTION_ERROR_CALLBACK_H_