summaryrefslogtreecommitdiff
path: root/chromium/mojo/public/cpp/system/functions.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/mojo/public/cpp/system/functions.h')
-rw-r--r--chromium/mojo/public/cpp/system/functions.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/chromium/mojo/public/cpp/system/functions.h b/chromium/mojo/public/cpp/system/functions.h
index 31edf57ab54..4f45ecef20c 100644
--- a/chromium/mojo/public/cpp/system/functions.h
+++ b/chromium/mojo/public/cpp/system/functions.h
@@ -11,7 +11,11 @@
#ifndef MOJO_PUBLIC_CPP_SYSTEM_FUNCTIONS_H_
#define MOJO_PUBLIC_CPP_SYSTEM_FUNCTIONS_H_
+#include <string>
+
+#include "base/callback_forward.h"
#include "mojo/public/c/system/functions.h"
+#include "mojo/public/cpp/system/system_export.h"
namespace mojo {
@@ -21,6 +25,17 @@ inline MojoTimeTicks GetTimeTicksNow() {
return MojoGetTimeTicksNow();
}
+// Sets a callback to handle communication errors regarding peer processes whose
+// identity is not explicitly known by this process, i.e. processes that are
+// part of the same Mojo process network but which were not invited by this
+// process.
+//
+// This can be used to globally listen for reports of bad incoming IPCs.
+using DefaultProcessErrorHandler =
+ base::RepeatingCallback<void(const std::string& error)>;
+void MOJO_CPP_SYSTEM_EXPORT
+SetDefaultProcessErrorHandler(DefaultProcessErrorHandler handler);
+
} // namespace mojo
#endif // MOJO_PUBLIC_CPP_SYSTEM_FUNCTIONS_H_