blob: 72860b5b077c11510a8b10239067322659480812 [file] [log] [blame]
// 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_MANIFEST_MANIFEST_OBSERVER_MOJOM_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_MANIFEST_MANIFEST_OBSERVER_MOJOM_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/manifest/manifest_observer.mojom-shared.h"
#include "third_party/blink/public/mojom/manifest/manifest_observer.mojom-forward.h"
#include "url/mojom/url.mojom-forward.h"
#include <string>
#include <vector>
#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/public/common/common_export.h"
#ifdef KYTHE_IS_RUNNING
#pragma kythe_inline_metadata "Metadata comment"
#endif
namespace blink {
namespace mojom {
class ManifestUrlChangeObserverProxy;
template <typename ImplRefTraits>
class ManifestUrlChangeObserverStub;
class ManifestUrlChangeObserverRequestValidator;
// @generated_from: blink.mojom.ManifestUrlChangeObserver
class BLINK_COMMON_EXPORT ManifestUrlChangeObserver
: public ManifestUrlChangeObserverInterfaceBase {
public:
static const char Name_[];
static constexpr uint32_t Version_ = 0;
static constexpr bool PassesAssociatedKinds_ = false;
static constexpr bool HasSyncMethods_ = false;
using Base_ = ManifestUrlChangeObserverInterfaceBase;
using Proxy_ = ManifestUrlChangeObserverProxy;
template <typename ImplRefTraits>
using Stub_ = ManifestUrlChangeObserverStub<ImplRefTraits>;
using RequestValidator_ = ManifestUrlChangeObserverRequestValidator;
using ResponseValidator_ = mojo::PassThroughFilter;
enum MethodMinVersions : uint32_t {
kManifestUrlChangedMinVersion = 0,
};
virtual ~ManifestUrlChangeObserver() {}
// @generated_from: blink.mojom.ManifestUrlChangeObserver.ManifestUrlChanged
virtual void ManifestUrlChanged(const base::Optional<GURL>& manifest_url) = 0;
};
class BLINK_COMMON_EXPORT ManifestUrlChangeObserverProxy
: public ManifestUrlChangeObserver {
public:
using InterfaceType = ManifestUrlChangeObserver;
explicit ManifestUrlChangeObserverProxy(mojo::MessageReceiverWithResponder* receiver);
void ManifestUrlChanged(const base::Optional<GURL>& manifest_url) final;
private:
mojo::MessageReceiverWithResponder* receiver_;
};
class BLINK_COMMON_EXPORT ManifestUrlChangeObserverStubDispatch {
public:
static bool Accept(ManifestUrlChangeObserver* impl, mojo::Message* message);
static bool AcceptWithResponder(
ManifestUrlChangeObserver* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder);
};
template <typename ImplRefTraits =
mojo::RawPtrImplRefTraits<ManifestUrlChangeObserver>>
class ManifestUrlChangeObserverStub
: public mojo::MessageReceiverWithResponderStatus {
public:
using ImplPointerType = typename ImplRefTraits::PointerType;
ManifestUrlChangeObserverStub() {}
~ManifestUrlChangeObserverStub() 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 ManifestUrlChangeObserverStubDispatch::Accept(
ImplRefTraits::GetRawPointer(&sink_), message);
}
bool AcceptWithResponder(
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) override {
if (ImplRefTraits::IsNull(sink_))
return false;
return ManifestUrlChangeObserverStubDispatch::AcceptWithResponder(
ImplRefTraits::GetRawPointer(&sink_), message, std::move(responder));
}
private:
ImplPointerType sink_;
};
class BLINK_COMMON_EXPORT ManifestUrlChangeObserverRequestValidator : public mojo::MessageReceiver {
public:
bool Accept(mojo::Message* message) override;
};
} // namespace mojom
} // namespace blink
namespace mojo {
} // namespace mojo
#endif // THIRD_PARTY_BLINK_PUBLIC_MOJOM_MANIFEST_MANIFEST_OBSERVER_MOJOM_H_
/* Metadata comment
eyJtZXRhIjogW3siZW5kIjogMjI2MiwgImJlZ2luIjogMjIzNywgImVkZ2UiOiAiJS9reXRoZS9l
ZGdlL2dlbmVyYXRlcyIsICJ0eXBlIjogImFuY2hvcl9kZWZpbmVzIiwgInZuYW1lIjogeyJjb3Jw
dXMiOiAiY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMiLCAibGFuZ3VhZ2Ui
OiAibW9qb20iLCAic2lnbmF0dXJlIjogImJsaW5rLm1vam9tLk1hbmlmZXN0VXJsQ2hhbmdlT2Jz
ZXJ2ZXIifX0sIHsiZW5kIjogMzA3MSwgImJlZ2luIjogMzA1MywgImVkZ2UiOiAiJS9reXRoZS9l
ZGdlL2dlbmVyYXRlcyIsICJ0eXBlIjogImFuY2hvcl9kZWZpbmVzIiwgInZuYW1lIjogeyJjb3Jw
dXMiOiAiY2hyb21pdW0uZ29vZ2xlc291cmNlLmNvbS9jaHJvbWl1bS9zcmMiLCAibGFuZ3VhZ2Ui
OiAibW9qb20iLCAic2lnbmF0dXJlIjogImJsaW5rLm1vam9tLk1hbmlmZXN0VXJsQ2hhbmdlT2Jz
ZXJ2ZXIuTWFuaWZlc3RVcmxDaGFuZ2VkIn19XSwgInR5cGUiOiAia3l0aGUwIn0=
*/