| // services/service_manager/tests/background.test-mojom-blink.h is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // 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 SERVICES_SERVICE_MANAGER_TESTS_BACKGROUND_TEST_MOJOM_BLINK_H_ |
| #define SERVICES_SERVICE_MANAGER_TESTS_BACKGROUND_TEST_MOJOM_BLINK_H_ |
| |
| #include <stdint.h> |
| |
| #include <limits> |
| #include <type_traits> |
| #include <utility> |
| |
| #include "third_party/abseil-cpp/absl/types/optional.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 "services/service_manager/tests/background.test-mojom-shared.h" |
| #include "services/service_manager/tests/background.test-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/lib/control_message_handler.h" |
| #include "mojo/public/cpp/bindings/raw_ptr_impl_ref_traits.h" |
| |
| |
| |
| #ifdef KYTHE_IS_RUNNING |
| #pragma kythe_inline_metadata "Metadata comment" |
| #endif |
| |
| |
| namespace service_manager { |
| namespace mojom { |
| namespace blink { |
| |
| class TestServiceProxy; |
| |
| template <typename ImplRefTraits> |
| class TestServiceStub; |
| |
| class TestServiceRequestValidator; |
| class TestServiceResponseValidator; |
| |
| |
| // @generated_from: service_manager.mojom.TestService |
| class TestService |
| : public TestServiceInterfaceBase { |
| public: |
| static const char Name_[]; |
| static std::pair<uint32_t, const void*> MessageToMethodInfo_(mojo::Message& message); |
| static const char* MessageToMethodName_(mojo::Message& message); |
| static constexpr uint32_t Version_ = 0; |
| static constexpr bool PassesAssociatedKinds_ = false; |
| static constexpr bool HasSyncMethods_ = false; |
| static constexpr bool HasUninterruptableMethods_ = false; |
| |
| using Base_ = TestServiceInterfaceBase; |
| using Proxy_ = TestServiceProxy; |
| |
| template <typename ImplRefTraits> |
| using Stub_ = TestServiceStub<ImplRefTraits>; |
| |
| using RequestValidator_ = TestServiceRequestValidator; |
| using ResponseValidator_ = TestServiceResponseValidator; |
| enum MethodMinVersions : uint32_t { |
| kTestMinVersion = 0, |
| kQuitMinVersion = 0, |
| }; |
| |
| // crbug.com/1340245 - this causes binary size bloat on Fuchsia, and we're OK |
| // with not having this data in traces there. |
| #if !BUILDFLAG(IS_FUCHSIA) |
| struct Test_Sym { |
| NOINLINE static void IPCSymbol(); |
| }; |
| struct Quit_Sym { |
| NOINLINE static void IPCSymbol(); |
| }; |
| #endif // !BUILDFLAG(IS_FUCHSIA) |
| virtual ~TestService() = default; |
| |
| |
| using TestCallback = base::OnceCallback<void()>; |
| |
| // @generated_from: service_manager.mojom.TestService.Test |
| virtual void Test(TestCallback callback) = 0; |
| |
| |
| // @generated_from: service_manager.mojom.TestService.Quit |
| virtual void Quit() = 0; |
| }; |
| |
| |
| |
| // @generated_from: service_manager.mojom.TestService |
| class TestServiceProxy |
| : public TestService { |
| public: |
| using InterfaceType = TestService; |
| |
| explicit TestServiceProxy(mojo::MessageReceiverWithResponder* receiver); |
| |
| // @generated_from: service_manager.mojom.TestService.Test |
| void Test(TestCallback callback) final; |
| |
| // @generated_from: service_manager.mojom.TestService.Quit |
| void Quit() final; |
| |
| private: |
| mojo::MessageReceiverWithResponder* receiver_; |
| }; |
| class TestServiceStubDispatch { |
| public: |
| static bool Accept(TestService* impl, mojo::Message* message); |
| static bool AcceptWithResponder( |
| TestService* impl, |
| mojo::Message* message, |
| std::unique_ptr<mojo::MessageReceiverWithStatus> responder); |
| }; |
| |
| template <typename ImplRefTraits = |
| mojo::RawPtrImplRefTraits<TestService>> |
| class TestServiceStub |
| : public mojo::MessageReceiverWithResponderStatus { |
| public: |
| using ImplPointerType = typename ImplRefTraits::PointerType; |
| |
| TestServiceStub() = default; |
| ~TestServiceStub() override = default; |
| |
| 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 TestServiceStubDispatch::Accept( |
| ImplRefTraits::GetRawPointer(&sink_), message); |
| } |
| |
| bool AcceptWithResponder( |
| mojo::Message* message, |
| std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override { |
| if (ImplRefTraits::IsNull(sink_)) |
| return false; |
| return TestServiceStubDispatch::AcceptWithResponder( |
| ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder)); |
| } |
| |
| private: |
| ImplPointerType sink_; |
| }; |
| class TestServiceRequestValidator : public mojo::MessageReceiver { |
| public: |
| bool Accept(mojo::Message* message) override; |
| }; |
| class TestServiceResponseValidator : public mojo::MessageReceiver { |
| public: |
| bool Accept(mojo::Message* message) override; |
| }; |
| |
| |
| |
| |
| |
| } // namespace blink |
| } // namespace mojom |
| } // namespace service_manager |
| |
| namespace mojo { |
| |
| } // namespace mojo |
| |
| #endif // SERVICES_SERVICE_MANAGER_TESTS_BACKGROUND_TEST_MOJOM_BLINK_H_ |
| |
| /* Metadata comment |
| eyJtZXRhIjogW3siZW5kIjogMTg4MywgImJlZ2luIjogMTg3MiwgImVkZ2UiOiAiJS9reXRoZS9l |
| ZGdlL2dlbmVyYXRlcyIsICJ0eXBlIjogImFuY2hvcl9kZWZpbmVzIiwgInZuYW1lIjogeyJjb3Jw |
| dXMiOiAiY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMiLCAibGFuZ3V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