#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/page/page.mojom-blink.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/blink/public/mojom/page/page.mojom-params-data.h"
#include "third_party/blink/public/mojom/page/page.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/page/page.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/page/page.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
#include "third_party/blink/common/permissions_policy/permissions_policy_mojom_traits.h"
#include "third_party/blink/public/common/frame/view_transition_state_mojom_traits.h"
#include "third_party/blink/public/common/page/browsing_context_group_info_mojom_traits.h"
namespace blink::mojom::blink {
PageLifecycleState::PageLifecycleState()
: … { … }
PageLifecycleState::PageLifecycleState(
bool is_frozen_in,
::blink::mojom::blink::PageVisibilityState visibility_in,
bool is_in_back_forward_cache_in,
PagehideDispatch pagehide_dispatch_in,
bool eviction_enabled_in)
: … { … }
PageLifecycleState::~PageLifecycleState() = default;
size_t PageLifecycleState::Hash(size_t seed) const { … }
void PageLifecycleState::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PageLifecycleState::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PageRestoreParams::PageRestoreParams()
: … { … }
PageRestoreParams::PageRestoreParams(
::base::TimeTicks navigation_start_in,
int32_t pending_history_list_offset_in,
int32_t current_history_list_length_in,
const std::optional<::blink::ViewTransitionState>& view_transition_state_in)
: … { … }
PageRestoreParams::~PageRestoreParams() = default;
void PageRestoreParams::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PageRestoreParams::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
ColorProviderColorMaps::ColorProviderColorMaps()
: … { … }
ColorProviderColorMaps::ColorProviderColorMaps(
const WTF::HashMap<::color::mojom::blink::RendererColorId, ::SkColor>& light_colors_map_in,
const WTF::HashMap<::color::mojom::blink::RendererColorId, ::SkColor>& dark_colors_map_in,
const WTF::HashMap<::color::mojom::blink::RendererColorId, ::SkColor>& forced_colors_map_in)
: … { … }
ColorProviderColorMaps::~ColorProviderColorMaps() = default;
void ColorProviderColorMaps::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ColorProviderColorMaps::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
PrerenderPageActivationParams::PrerenderPageActivationParams()
: … { … }
PrerenderPageActivationParams::PrerenderPageActivationParams(
::blink::mojom::blink::WasActivatedOption was_user_activated_in,
::base::TimeTicks activation_start_in,
const std::optional<::blink::ViewTransitionState>& view_transition_state_in)
: … { … }
PrerenderPageActivationParams::~PrerenderPageActivationParams() = default;
void PrerenderPageActivationParams::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool PrerenderPageActivationParams::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char PageBroadcast::Name_[] = …;
PageBroadcast::IPCStableHashFunction PageBroadcast::MessageToMethodInfo_(mojo::Message& message) { … }
const char* PageBroadcast::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t PageBroadcast::SetPageLifecycleState_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::AudioStateChanged_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::ActivatePrerenderedPage_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::UpdateWebPreferences_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::UpdateRendererPreferences_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::SetHistoryOffsetAndLength_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::SetPageBaseBackgroundColor_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::CreateRemoteMainFrame_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::UpdatePageBrowsingContextGroup_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::SetPageAttributionSupport_Sym::IPCStableHash() { … }
uint32_t PageBroadcast::UpdateColorProviders_Sym::IPCStableHash() { … }
# endif
class PageBroadcast_SetPageLifecycleState_ForwardToCallback
: public mojo::MessageReceiver { … };
class PageBroadcast_ActivatePrerenderedPage_ForwardToCallback
: public mojo::MessageReceiver { … };
PageBroadcastProxy::PageBroadcastProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void PageBroadcastProxy::SetPageLifecycleState(
PageLifecycleStatePtr in_state, PageRestoreParamsPtr in_page_restore_params, SetPageLifecycleStateCallback callback) { … }
void PageBroadcastProxy::AudioStateChanged(
bool in_is_audio_playing) { … }
void PageBroadcastProxy::ActivatePrerenderedPage(
PrerenderPageActivationParamsPtr in_prerender_page_activation_params, ActivatePrerenderedPageCallback callback) { … }
void PageBroadcastProxy::UpdateWebPreferences(
const ::blink::web_pref::WebPreferences& in_preferences) { … }
void PageBroadcastProxy::UpdateRendererPreferences(
const ::blink::RendererPreferences& in_preferences) { … }
void PageBroadcastProxy::SetHistoryOffsetAndLength(
int32_t in_offset, int32_t in_length) { … }
void PageBroadcastProxy::SetPageBaseBackgroundColor(
std::optional<::SkColor> in_color) { … }
void PageBroadcastProxy::CreateRemoteMainFrame(
const ::blink::RemoteFrameToken& in_token, const std::optional<::blink::FrameToken>& in_opener_frame_token, ::blink::mojom::blink::FrameReplicationStatePtr in_replication_state, bool in_is_loading, const ::base::UnguessableToken& in_devtools_frame_token, ::blink::mojom::blink::RemoteFrameInterfacesFromBrowserPtr in_remote_frame_interfaces, ::blink::mojom::blink::RemoteMainFrameInterfacesPtr in_remote_main_frame_interfaces) { … }
void PageBroadcastProxy::UpdatePageBrowsingContextGroup(
const ::blink::BrowsingContextGroupInfo& in_browsing_context_group_info) { … }
void PageBroadcastProxy::SetPageAttributionSupport(
::network::mojom::blink::AttributionSupport in_support) { … }
void PageBroadcastProxy::UpdateColorProviders(
const ::blink::ColorProviderColorMaps& in_color_provider_colors) { … }
class PageBroadcast_SetPageLifecycleState_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PageBroadcast_SetPageLifecycleState_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PageBroadcast_SetPageLifecycleState_ProxyToResponder::Run(
) { … }
class PageBroadcast_ActivatePrerenderedPage_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool PageBroadcast_ActivatePrerenderedPage_ForwardToCallback::Accept(
mojo::Message* message) { … }
void PageBroadcast_ActivatePrerenderedPage_ProxyToResponder::Run(
) { … }
bool PageBroadcastStubDispatch::Accept(
PageBroadcast* impl,
mojo::Message* message) { … }
bool PageBroadcastStubDispatch::AcceptWithResponder(
PageBroadcast* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kPageBroadcastValidationInfo[] = …;
bool PageBroadcastRequestValidator::Accept(mojo::Message* message) { … }
bool PageBroadcastResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::PageLifecycleState::DataView, ::blink::mojom::blink::PageLifecycleStatePtr>::Read(
::blink::mojom::blink::PageLifecycleState::DataView input,
::blink::mojom::blink::PageLifecycleStatePtr* output) { … }
bool StructTraits<::blink::mojom::blink::PageRestoreParams::DataView, ::blink::mojom::blink::PageRestoreParamsPtr>::Read(
::blink::mojom::blink::PageRestoreParams::DataView input,
::blink::mojom::blink::PageRestoreParamsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::ColorProviderColorMaps::DataView, ::blink::mojom::blink::ColorProviderColorMapsPtr>::Read(
::blink::mojom::blink::ColorProviderColorMaps::DataView input,
::blink::mojom::blink::ColorProviderColorMapsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::PrerenderPageActivationParams::DataView, ::blink::mojom::blink::PrerenderPageActivationParamsPtr>::Read(
::blink::mojom::blink::PrerenderPageActivationParams::DataView input,
::blink::mojom::blink::PrerenderPageActivationParamsPtr* output) { … }
}
namespace blink::mojom::blink {
void PageBroadcastInterceptorForTesting::SetPageLifecycleState(PageLifecycleStatePtr state, PageRestoreParamsPtr page_restore_params, SetPageLifecycleStateCallback callback) { … }
void PageBroadcastInterceptorForTesting::AudioStateChanged(bool is_audio_playing) { … }
void PageBroadcastInterceptorForTesting::ActivatePrerenderedPage(PrerenderPageActivationParamsPtr prerender_page_activation_params, ActivatePrerenderedPageCallback callback) { … }
void PageBroadcastInterceptorForTesting::UpdateWebPreferences(const ::blink::web_pref::WebPreferences& preferences) { … }
void PageBroadcastInterceptorForTesting::UpdateRendererPreferences(const ::blink::RendererPreferences& preferences) { … }
void PageBroadcastInterceptorForTesting::SetHistoryOffsetAndLength(int32_t offset, int32_t length) { … }
void PageBroadcastInterceptorForTesting::SetPageBaseBackgroundColor(std::optional<::SkColor> color) { … }
void PageBroadcastInterceptorForTesting::CreateRemoteMainFrame(const ::blink::RemoteFrameToken& token, const std::optional<::blink::FrameToken>& opener_frame_token, ::blink::mojom::blink::FrameReplicationStatePtr replication_state, bool is_loading, const ::base::UnguessableToken& devtools_frame_token, ::blink::mojom::blink::RemoteFrameInterfacesFromBrowserPtr remote_frame_interfaces, ::blink::mojom::blink::RemoteMainFrameInterfacesPtr remote_main_frame_interfaces) { … }
void PageBroadcastInterceptorForTesting::UpdatePageBrowsingContextGroup(const ::blink::BrowsingContextGroupInfo& browsing_context_group_info) { … }
void PageBroadcastInterceptorForTesting::SetPageAttributionSupport(::network::mojom::blink::AttributionSupport support) { … }
void PageBroadcastInterceptorForTesting::UpdateColorProviders(const ::blink::ColorProviderColorMaps& color_provider_colors) { … }
PageBroadcastAsyncWaiter::PageBroadcastAsyncWaiter(
PageBroadcast* proxy) : … { … }
PageBroadcastAsyncWaiter::~PageBroadcastAsyncWaiter() = default;
void PageBroadcastAsyncWaiter::SetPageLifecycleState(
PageLifecycleStatePtr state, PageRestoreParamsPtr page_restore_params) { … }
void PageBroadcastAsyncWaiter::ActivatePrerenderedPage(
PrerenderPageActivationParamsPtr prerender_page_activation_params) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif