| // Copyright 2013 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 THIRD_PARTY_BLINK_PUBLIC_MOJOM_FRAME_DOCUMENT_INTERFACE_BROKER_MOJOM_BLINK_H_ |
| #define THIRD_PARTY_BLINK_PUBLIC_MOJOM_FRAME_DOCUMENT_INTERFACE_BROKER_MOJOM_BLINK_H_ |
| |
| #include <stdint.h> |
| |
| #include <limits> |
| #include <type_traits> |
| #include <utility> |
| |
| #include "base/callback.h" |
| #include "base/macros.h" |
| #include "base/optional.h" |
| |
| #include "mojo/public/cpp/bindings/mojo_buildflags.h" |
| #if BUILDFLAG(MOJO_TRACE_ENABLED) |
| #include "base/trace_event/trace_event.h" |
| #endif |
| #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/blink/public/mojom/frame/document_interface_broker.mojom-shared.h" |
| #include "third_party/blink/public/mojom/frame/document_interface_broker.mojom-blink-forward.h" |
| #include "mojo/public/mojom/base/unguessable_token.mojom-blink-forward.h" |
| #include "third_party/blink/public/mojom/appcache/appcache.mojom-blink-forward.h" |
| #include "third_party/blink/public/mojom/credentialmanager/credential_manager.mojom-blink-forward.h" |
| #include "third_party/blink/public/mojom/frame/frame_host_test_interface.mojom-blink-forward.h" |
| #include "third_party/blink/public/mojom/push_messaging/push_messaging.mojom-blink-forward.h" |
| #include "third_party/blink/public/mojom/webaudio/audio_context_manager.mojom-blink-forward.h" |
| #include "third_party/blink/public/mojom/webauthn/authenticator.mojom-blink-forward.h" |
| #include "third_party/blink/public/mojom/webauthn/virtual_authenticator.mojom-blink-forward.h" |
| |
| #include "mojo/public/cpp/bindings/lib/wtf_clone_equals_util.h" |
| #include "mojo/public/cpp/bindings/lib/wtf_hash_util.h" |
| #include "third_party/blink/renderer/platform/wtf/hash_functions.h" |
| #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" |
| |
| #include "mojo/public/cpp/bindings/associated_interface_ptr.h" |
| #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h" |
| #include "mojo/public/cpp/bindings/associated_interface_request.h" |
| #include "mojo/public/cpp/bindings/interface_ptr.h" |
| #include "mojo/public/cpp/bindings/interface_request.h" |
| #include "mojo/public/cpp/bindings/lib/control_message_handler.h" |
| #include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h" |
| #include "mojo/public/cpp/bindings/thread_safe_interface_ptr.h" |
| |
| |
| #include "mojo/public/cpp/bindings/lib/native_enum_serialization.h" |
| #include "mojo/public/cpp/bindings/lib/native_struct_serialization.h" |
| #include "third_party/blink/renderer/platform/platform_export.h" |
| |
| #ifdef KYTHE_IS_RUNNING |
| #pragma kythe_inline_metadata "Metadata comment" |
| #endif |
| |
| |
| namespace blink { |
| namespace mojom { |
| namespace blink { |
| |
| class DocumentInterfaceBrokerProxy; |
| |
| template <typename ImplRefTraits> |
| class DocumentInterfaceBrokerStub; |
| |
| class DocumentInterfaceBrokerRequestValidator; |
| |
| |
| // @generated_from: blink.mojom.DocumentInterfaceBroker |
| class PLATFORM_EXPORT DocumentInterfaceBroker |
| : public DocumentInterfaceBrokerInterfaceBase { |
| public: |
| static const char Name_[]; |
| static constexpr uint32_t Version_ = 0; |
| static constexpr bool PassesAssociatedKinds_ = false; |
| static constexpr bool HasSyncMethods_ = false; |
| |
| using Base_ = DocumentInterfaceBrokerInterfaceBase; |
| using Proxy_ = DocumentInterfaceBrokerProxy; |
| |
| template <typename ImplRefTraits> |
| using Stub_ = DocumentInterfaceBrokerStub<ImplRefTraits>; |
| |
| using RequestValidator_ = DocumentInterfaceBrokerRequestValidator; |
| using ResponseValidator_ = mojo::PassThroughFilter; |
| enum MethodMinVersions : uint32_t { |
| kGetAudioContextManagerMinVersion = 0, |
| kGetAuthenticatorMinVersion = 0, |
| kGetCredentialManagerMinVersion = 0, |
| kGetFrameHostTestInterfaceMinVersion = 0, |
| kGetPushMessagingMinVersion = 0, |
| kGetVirtualAuthenticatorManagerMinVersion = 0, |
| kRegisterAppCacheHostMinVersion = 0, |
| }; |
| virtual ~DocumentInterfaceBroker() {} |
| |
| |
| // @generated_from: blink.mojom.DocumentInterfaceBroker.GetAudioContextManager |
| virtual void GetAudioContextManager(mojo::PendingReceiver<::blink::mojom::blink::AudioContextManager> receiver) = 0; |
| |
| |
| // @generated_from: blink.mojom.DocumentInterfaceBroker.GetAuthenticator |
| virtual void GetAuthenticator(mojo::PendingReceiver<::blink::mojom::blink::Authenticator> receiver) = 0; |
| |
| |
| // @generated_from: blink.mojom.DocumentInterfaceBroker.GetCredentialManager |
| virtual void GetCredentialManager(mojo::PendingReceiver<::blink::mojom::blink::CredentialManager> receiver) = 0; |
| |
| |
| // @generated_from: blink.mojom.DocumentInterfaceBroker.GetFrameHostTestInterface |
| virtual void GetFrameHostTestInterface(mojo::PendingReceiver<::blink::mojom::blink::FrameHostTestInterface> receiver) = 0; |
| |
| |
| // @generated_from: blink.mojom.DocumentInterfaceBroker.GetPushMessaging |
| virtual void GetPushMessaging(mojo::PendingReceiver<::blink::mojom::blink::PushMessaging> receiver) = 0; |
| |
| |
| // @generated_from: blink.mojom.DocumentInterfaceBroker.GetVirtualAuthenticatorManager |
| virtual void GetVirtualAuthenticatorManager(mojo::PendingReceiver<::blink::test::mojom::blink::VirtualAuthenticatorManager> receiver) = 0; |
| |
| |
| // @generated_from: blink.mojom.DocumentInterfaceBroker.RegisterAppCacheHost |
| virtual void RegisterAppCacheHost(mojo::PendingReceiver<::blink::mojom::blink::AppCacheHost> host_receiver, mojo::PendingRemote<::blink::mojom::blink::AppCacheFrontend> frontend_remote, const base::UnguessableToken& host_id) = 0; |
| }; |
| |
| class PLATFORM_EXPORT DocumentInterfaceBrokerProxy |
| : public DocumentInterfaceBroker { |
| public: |
| using InterfaceType = DocumentInterfaceBroker; |
| |
| explicit DocumentInterfaceBrokerProxy(mojo::MessageReceiverWithResponder* receiver); |
| void GetAudioContextManager(mojo::PendingReceiver<::blink::mojom::blink::AudioContextManager> receiver) final; |
| void GetAuthenticator(mojo::PendingReceiver<::blink::mojom::blink::Authenticator> receiver) final; |
| void GetCredentialManager(mojo::PendingReceiver<::blink::mojom::blink::CredentialManager> receiver) final; |
| void GetFrameHostTestInterface(mojo::PendingReceiver<::blink::mojom::blink::FrameHostTestInterface> receiver) final; |
| void GetPushMessaging(mojo::PendingReceiver<::blink::mojom::blink::PushMessaging> receiver) final; |
| void GetVirtualAuthenticatorManager(mojo::PendingReceiver<::blink::test::mojom::blink::VirtualAuthenticatorManager> receiver) final; |
| void RegisterAppCacheHost(mojo::PendingReceiver<::blink::mojom::blink::AppCacheHost> host_receiver, mojo::PendingRemote<::blink::mojom::blink::AppCacheFrontend> frontend_remote, const base::UnguessableToken& host_id) final; |
| |
| private: |
| mojo::MessageReceiverWithResponder* receiver_; |
| }; |
| class PLATFORM_EXPORT DocumentInterfaceBrokerStubDispatch { |
| public: |
| static bool Accept(DocumentInterfaceBroker* impl, mojo::Message* message); |
| static bool AcceptWithResponder( |
| DocumentInterfaceBroker* impl, |
| mojo::Message* message, |
| std::unique_ptr<mojo::MessageReceiverWithStatus> responder); |
| }; |
| |
| template <typename ImplRefTraits = |
| mojo::RawPtrImplRefTraits<DocumentInterfaceBroker>> |
| class DocumentInterfaceBrokerStub |
| : public mojo::MessageReceiverWithResponderStatus { |
| public: |
| using ImplPointerType = typename ImplRefTraits::PointerType; |
| |
| DocumentInterfaceBrokerStub() {} |
| ~DocumentInterfaceBrokerStub() override {} |
| |
| void set_sink(ImplPointerType sink) { sink_ = std::move(sink); } |
| ImplPointerType& sink() { return sink_; } |
| |
| bool Accept(mojo::Message* message) override { |
| if (ImplRefTraits::IsNull(sink_)) |
| return false; |
| return DocumentInterfaceBrokerStubDispatch::Accept( |
| ImplRefTraits::GetRawPointer(&sink_), message); |
| } |
| |
| bool AcceptWithResponder( |
| mojo::Message* message, |
| std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { |
| if (ImplRefTraits::IsNull(sink_)) |
| return false; |
| return DocumentInterfaceBrokerStubDispatch::AcceptWithResponder( |
| ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder)); |
| } |
| |
| private: |
| ImplPointerType sink_; |
| }; |
| class PLATFORM_EXPORT DocumentInterfaceBrokerRequestValidator : public mojo::MessageReceiver { |
| public: |
| bool Accept(mojo::Message* message) override; |
| }; |
| |
| |
| |
| |
| |
| } // namespace blink |
| } // namespace mojom |
| } // namespace blink |
| |
| namespace mojo { |
| |
| } // namespace mojo |
| |
| #endif // THIRD_PARTY_BLINK_PUBLIC_MOJOM_FRAME_DOCUMENT_INTERFACE_BROKER_MOJOM_BLINK_H_
|
|
|
| /* Metadata comment
|
| eyJtZXRhIjogW3siZW5kIjogMzIxNSwgImJlZ2luIjogMzE5MiwgImVkZ2UiOiAiJS9reXRoZS9l
|
| ZGdlL2dlbmVyYXRlcyIsICJ0eXBlIjogImFuY2hvcl9kZWZpbmVzIiwgInZuYW1lIjogeyJjb3Jw
|
| dXMiOiAiY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMiLCAibGFuZ3VhZ2Ui
|
| OiAibW9qb20iLCAic2lnbmF0dXJlIjogImJsaW5rLm1vam9tLkRvY3VtZW50SW50ZXJmYWNlQnJv
|
| a2VyIn19LCB7ImVuZCI6IDQyNzUsICJiZWdpbiI6IDQyNTMsICJlZGdlIjogIiUva3l0aGUvZWRn
|
| ZS9nZW5lcmF0ZXMiLCAidHlwZSI6ICJhbmNob3JfZGVmaW5lcyIsICJ2bmFtZSI6IHsiY29ycHVz
|
| IjogImNocm9taXVtLmdvb2dsZXNvdXJjZS5jb20vY2hyb21pdW0vc3JjIiwgImxhbmd1YWdlIjog
|
| Im1vam9tIiwgInNpZ25hdHVy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