#ifndef COMPONENTS_SAFE_BROWSING_CONTENT_COMMON_SAFE_BROWSING_MOJOM_H_
#define COMPONENTS_SAFE_BROWSING_CONTENT_COMMON_SAFE_BROWSING_MOJOM_H_
#include <stdint.h>
#include <limits>
#include <optional>
#include <type_traits>
#include <utility>
#include "base/types/cxx23_to_underlying.h"
#include "mojo/public/cpp/bindings/clone_traits.h"
#include "mojo/public/cpp/bindings/equals_traits.h"
#include "mojo/public/cpp/bindings/lib/serialization.h"
#include "mojo/public/cpp/bindings/struct_ptr.h"
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "mojo/public/cpp/bindings/union_traits.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"
#include "components/safe_browsing/content/common/safe_browsing.mojom-features.h"
#include "components/safe_browsing/content/common/safe_browsing.mojom-shared.h"
#include "components/safe_browsing/content/common/safe_browsing.mojom-forward.h"
#include "components/safe_browsing/core/common/safe_browsing_url_checker.mojom-forward.h"
#include "mojo/public/mojom/base/proto_wrapper.mojom.h"
#include "mojo/public/mojom/base/read_only_file.mojom.h"
#include "mojo/public/mojom/base/shared_memory.mojom.h"
#include "services/network/public/mojom/http_request_headers.mojom.h"
#include "third_party/blink/public/mojom/tokens/tokens.mojom.h"
#include "url/mojom/url.mojom.h"
#include <string>
#include <vector>
#include "mojo/public/cpp/bindings/lib/control_message_handler.h"
#include "mojo/public/cpp/bindings/lib/message_size_estimator.h"
#include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h"
namespace safe_browsing::mojom {
class SafeBrowsingProxy;
template <typename ImplRefTraits>
class SafeBrowsingStub;
class SafeBrowsingRequestValidator;
class SafeBrowsingResponseValidator;
class SafeBrowsing
: public SafeBrowsingInterfaceBase { … };
class ThreatReporterProxy;
template <typename ImplRefTraits>
class ThreatReporterStub;
class ThreatReporterRequestValidator;
class ThreatReporterResponseValidator;
class ThreatReporter
: public ThreatReporterInterfaceBase { … };
class PhishingDetectorProxy;
template <typename ImplRefTraits>
class PhishingDetectorStub;
class PhishingDetectorRequestValidator;
class PhishingDetectorResponseValidator;
class PhishingDetector
: public PhishingDetectorInterfaceBase { … };
class PhishingModelSetterProxy;
template <typename ImplRefTraits>
class PhishingModelSetterStub;
class PhishingModelSetterRequestValidator;
class PhishingModelSetterResponseValidator;
class PhishingModelSetter
: public PhishingModelSetterInterfaceBase { … };
class PhishingModelSetterTestObserverProxy;
template <typename ImplRefTraits>
class PhishingModelSetterTestObserverStub;
class PhishingModelSetterTestObserverRequestValidator;
class PhishingModelSetterTestObserver
: public PhishingModelSetterTestObserverInterfaceBase { … };
class PhishingImageEmbedderDetectorProxy;
template <typename ImplRefTraits>
class PhishingImageEmbedderDetectorStub;
class PhishingImageEmbedderDetectorRequestValidator;
class PhishingImageEmbedderDetectorResponseValidator;
class PhishingImageEmbedderDetector
: public PhishingImageEmbedderDetectorInterfaceBase { … };
class ExtensionWebRequestReporterProxy;
template <typename ImplRefTraits>
class ExtensionWebRequestReporterStub;
class ExtensionWebRequestReporterRequestValidator;
class ExtensionWebRequestReporter
: public ExtensionWebRequestReporterInterfaceBase { … };
class SafeBrowsingProxy
: public SafeBrowsing { … };
class ThreatReporterProxy
: public ThreatReporter { … };
class PhishingDetectorProxy
: public PhishingDetector { … };
class PhishingModelSetterProxy
: public PhishingModelSetter { … };
class PhishingModelSetterTestObserverProxy
: public PhishingModelSetterTestObserver { … };
class PhishingImageEmbedderDetectorProxy
: public PhishingImageEmbedderDetector { … };
class ExtensionWebRequestReporterProxy
: public ExtensionWebRequestReporter { … };
class SafeBrowsingStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<SafeBrowsing>>
class SafeBrowsingStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
SafeBrowsingStub() = default;
~SafeBrowsingStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class ThreatReporterStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<ThreatReporter>>
class ThreatReporterStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
ThreatReporterStub() = default;
~ThreatReporterStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class PhishingDetectorStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<PhishingDetector>>
class PhishingDetectorStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
PhishingDetectorStub() = default;
~PhishingDetectorStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class PhishingModelSetterStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<PhishingModelSetter>>
class PhishingModelSetterStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
PhishingModelSetterStub() = default;
~PhishingModelSetterStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class PhishingModelSetterTestObserverStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<PhishingModelSetterTestObserver>>
class PhishingModelSetterTestObserverStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
PhishingModelSetterTestObserverStub() = default;
~PhishingModelSetterTestObserverStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class PhishingImageEmbedderDetectorStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<PhishingImageEmbedderDetector>>
class PhishingImageEmbedderDetectorStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
PhishingImageEmbedderDetectorStub() = default;
~PhishingImageEmbedderDetectorStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class ExtensionWebRequestReporterStubDispatch { … };
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<ExtensionWebRequestReporter>>
class ExtensionWebRequestReporterStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
ExtensionWebRequestReporterStub() = default;
~ExtensionWebRequestReporterStub() override = default;
void set_sink(ImplPointerType sink) { … }
ImplPointerType& sink() { … }
bool Accept(mojo::Message* message) override { … }
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { … }
private:
ImplPointerType sink_;
};
class SafeBrowsingRequestValidator : public mojo::MessageReceiver { … };
class ThreatReporterRequestValidator : public mojo::MessageReceiver { … };
class PhishingDetectorRequestValidator : public mojo::MessageReceiver { … };
class PhishingModelSetterRequestValidator : public mojo::MessageReceiver { … };
class PhishingModelSetterTestObserverRequestValidator : public mojo::MessageReceiver { … };
class PhishingImageEmbedderDetectorRequestValidator : public mojo::MessageReceiver { … };
class ExtensionWebRequestReporterRequestValidator : public mojo::MessageReceiver { … };
class SafeBrowsingResponseValidator : public mojo::MessageReceiver { … };
class ThreatReporterResponseValidator : public mojo::MessageReceiver { … };
class PhishingDetectorResponseValidator : public mojo::MessageReceiver { … };
class PhishingModelSetterResponseValidator : public mojo::MessageReceiver { … };
class PhishingImageEmbedderDetectorResponseValidator : public mojo::MessageReceiver { … };
class AttributeNameValue { … };
template <typename T, AttributeNameValue::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, AttributeNameValue::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, AttributeNameValue::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, AttributeNameValue::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
class ThreatDOMDetailsNode { … };
template <typename T, ThreatDOMDetailsNode::EnableIfSame<T>* = nullptr>
bool operator<(const T& lhs, const T& rhs);
template <typename T, ThreatDOMDetailsNode::EnableIfSame<T>* = nullptr>
bool operator<=(const T& lhs, const T& rhs) { … }
template <typename T, ThreatDOMDetailsNode::EnableIfSame<T>* = nullptr>
bool operator>(const T& lhs, const T& rhs) { … }
template <typename T, ThreatDOMDetailsNode::EnableIfSame<T>* = nullptr>
bool operator>=(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
AttributeNameValuePtr AttributeNameValue::Clone() const { … }
template <typename T, AttributeNameValue::EnableIfSame<T>*>
bool AttributeNameValue::Equals(const T& other_struct) const { … }
template <typename T, AttributeNameValue::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
template <typename StructPtrType>
ThreatDOMDetailsNodePtr ThreatDOMDetailsNode::Clone() const { … }
template <typename T, ThreatDOMDetailsNode::EnableIfSame<T>*>
bool ThreatDOMDetailsNode::Equals(const T& other_struct) const { … }
template <typename T, ThreatDOMDetailsNode::EnableIfSame<T>*>
bool operator<(const T& lhs, const T& rhs) { … }
}
namespace mojo {
template <>
struct StructTraits<::safe_browsing::mojom::AttributeNameValue::DataView,
::safe_browsing::mojom::AttributeNameValuePtr> { … };
template <>
struct StructTraits<::safe_browsing::mojom::ThreatDOMDetailsNode::DataView,
::safe_browsing::mojom::ThreatDOMDetailsNodePtr> { … };
}
#endif