From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- ipc/chromium/src/mojo/core/ports/message_filter.h | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 ipc/chromium/src/mojo/core/ports/message_filter.h (limited to 'ipc/chromium/src/mojo/core/ports/message_filter.h') diff --git a/ipc/chromium/src/mojo/core/ports/message_filter.h b/ipc/chromium/src/mojo/core/ports/message_filter.h new file mode 100644 index 0000000000..21f8c1c869 --- /dev/null +++ b/ipc/chromium/src/mojo/core/ports/message_filter.h @@ -0,0 +1,29 @@ +// 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_CORE_PORTS_MESSAGE_FILTER_H_ +#define MOJO_CORE_PORTS_MESSAGE_FILTER_H_ + +namespace mojo { +namespace core { +namespace ports { + +class UserMessageEvent; + +// An interface which can be implemented to user message events according to +// arbitrary policy. +class MessageFilter { + public: + virtual ~MessageFilter() = default; + + // Returns true if |message| should be accepted by whomever is applying this + // filter. See MessageQueue::GetNextMessage(), for example. + virtual bool Match(const UserMessageEvent& message) = 0; +}; + +} // namespace ports +} // namespace core +} // namespace mojo + +#endif // MOJO_CORE_PORTS_MESSAGE_FILTER_H_ -- cgit v1.2.3