blob: 32ca2ba1b4a91a73542efdd7044075a40280a006 [file] [log] [blame]
// content/common/frame.mojom-send-validation.h is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2025 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_COMMON_FRAME_MOJOM_SEND_VALIDATION_H_
#define CONTENT_COMMON_FRAME_MOJOM_SEND_VALIDATION_H_
#include "content/common/frame.mojom-shared-internal.h"
#include "cc/mojom/browser_controls_state.mojom-shared.h"
#include "content/common/frame_messages.mojom-shared.h"
#include "content/common/navigation_client.mojom-shared.h"
#include "content/common/web_ui.mojom-shared.h"
#include "content/public/common/extra_mojo_js_features.mojom-shared.h"
#include "content/public/common/window_container_type.mojom-shared.h"
#include "ipc/constants.mojom-shared.h"
#include "mojo/public/mojom/base/file_path.mojom-shared.h"
#include "mojo/public/mojom/base/time.mojom-shared.h"
#include "mojo/public/mojom/base/unguessable_token.mojom-shared.h"
#include "skia/public/mojom/skcolor.mojom-shared.h"
#include "services/network/public/mojom/attribution.mojom-shared.h"
#include "services/network/public/mojom/content_security_policy.mojom-shared.h"
#include "services/network/public/mojom/url_loader.mojom-shared.h"
#include "services/network/public/mojom/url_loader_completion_status.mojom-shared.h"
#include "services/network/public/mojom/url_loader_factory.mojom-shared.h"
#include "services/network/public/mojom/url_request.mojom-shared.h"
#include "services/network/public/mojom/url_response_head.mojom-shared.h"
#include "services/service_manager/public/mojom/interface_provider.mojom-shared.h"
#include "services/viz/public/mojom/compositing/surface_id.mojom-shared.h"
#include "third_party/blink/public/mojom/associated_interfaces/associated_interfaces.mojom-shared.h"
#include "third_party/blink/public/mojom/blob/blob_url_store.mojom-shared.h"
#include "third_party/blink/public/mojom/browser_interface_broker.mojom-shared.h"
#include "third_party/blink/public/mojom/commit_result/commit_result.mojom-shared.h"
#include "third_party/blink/public/mojom/conversions/conversions.mojom-shared.h"
#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
#include "third_party/blink/public/mojom/fenced_frame/fenced_frame.mojom-shared.h"
#include "third_party/blink/public/mojom/fenced_frame/fenced_frame_config.mojom-shared.h"
#include "third_party/blink/public/mojom/fingerprinting_protection/noise_token.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/frame_owner_properties.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/frame_policy.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/frame_replication_state.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/policy_container.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/remote_frame.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/tree_scope_type.mojom-shared.h"
#include "third_party/blink/public/mojom/loader/referrer.mojom-shared.h"
#include "third_party/blink/public/mojom/navigation/navigation_policy.mojom-shared.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h"
#include "third_party/blink/public/mojom/loader/url_loader_factory_bundle.mojom-shared.h"
#include "third_party/blink/public/mojom/messaging/transferable_message.mojom-shared.h"
#include "third_party/blink/public/mojom/navigation/navigation_params.mojom-shared.h"
#include "third_party/blink/public/mojom/navigation/navigation_initiator_activation_and_ad_status.mojom-shared.h"
#include "third_party/blink/public/mojom/page/page.mojom-shared.h"
#include "third_party/blink/public/mojom/page/prerender_page_param.mojom-shared.h"
#include "third_party/blink/public/mojom/partitioned_popins/partitioned_popin_params.mojom-shared.h"
#include "third_party/blink/public/mojom/picture_in_picture_window_options/picture_in_picture_window_options.mojom-shared.h"
#include "third_party/blink/public/mojom/widget/platform_widget.mojom-shared.h"
#include "third_party/blink/public/mojom/page/widget.mojom-shared.h"
#include "third_party/blink/public/mojom/renderer_preferences.mojom-shared.h"
#include "third_party/blink/public/mojom/service_worker/controller_service_worker.mojom-shared.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_container.mojom-shared.h"
#include "third_party/blink/public/mojom/tokens/tokens.mojom-shared.h"
#include "third_party/blink/public/mojom/webpreferences/web_preferences.mojom-shared.h"
#include "third_party/blink/public/mojom/widget/visual_properties.mojom-shared.h"
#include "third_party/blink/public/mojom/window_features/window_features.mojom-shared.h"
#include "ui/accessibility/mojom/ax_tree_update.mojom-shared.h"
#include "ui/base/mojom/window_open_disposition.mojom-shared.h"
#include "ui/gfx/geometry/mojom/geometry.mojom-shared.h"
#include "url/mojom/origin.mojom-shared.h"
#include "url/mojom/scheme_host_port.mojom-shared.h"
#include "url/mojom/url.mojom-shared.h"
#include "content/common/frame.mojom-data-view.h"
#include "mojo/public/cpp/bindings/lib/send_validation_type.h"
#include "mojo/public/cpp/bindings/lib/send_validation.h"
#include "mojo/public/cpp/bindings/lib/interface_serialization_send_validation.h"
#include "mojo/public/cpp/bindings/lib/has_send_validation_helper.h"
namespace mojo::internal {
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::content::mojom::ViewWidgetType, MaybeConstUserType>
: std::false_type {};
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::content::mojom::ChildFrameOwnerElementType, MaybeConstUserType>
: std::false_type {};
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::content::mojom::FrameDeleteIntention, MaybeConstUserType>
: std::false_type {};
template <typename MaybeConstUserType>
struct HasSendValidationSerialize<::content::mojom::CreateNewWindowStatus, MaybeConstUserType>
: std::false_type {};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateViewParamsDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::CreateViewParamsDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::CreateViewParams_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
decltype(Traits::renderer_preferences(input)) in_renderer_preferences = Traits::renderer_preferences(input);
mojo::internal::MessageFragment<
typename decltype(fragment->renderer_preferences)::BaseType> renderer_preferences_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::RendererPreferencesDataView, send_validation>(
in_renderer_preferences,
renderer_preferences_fragment);
fragment->renderer_preferences.Set(
renderer_preferences_fragment.is_null() ? nullptr : renderer_preferences_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->renderer_preferences.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null renderer_preferences in CreateViewParams struct");
decltype(Traits::web_preferences(input)) in_web_preferences = Traits::web_preferences(input);
mojo::internal::MessageFragment<
typename decltype(fragment->web_preferences)::BaseType> web_preferences_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::WebPreferencesDataView, send_validation>(
in_web_preferences,
web_preferences_fragment);
fragment->web_preferences.Set(
web_preferences_fragment.is_null() ? nullptr : web_preferences_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->web_preferences.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null web_preferences in CreateViewParams struct");
decltype(Traits::session_storage_namespace_id(input)) in_session_storage_namespace_id = Traits::session_storage_namespace_id(input);
mojo::internal::MessageFragment<
typename decltype(fragment->session_storage_namespace_id)::BaseType> session_storage_namespace_id_fragment(
fragment.message());
mojo::internal::Serialize<mojo::StringDataView, send_validation>(
in_session_storage_namespace_id,
session_storage_namespace_id_fragment);
fragment->session_storage_namespace_id.Set(
session_storage_namespace_id_fragment.is_null() ? nullptr : session_storage_namespace_id_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->session_storage_namespace_id.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null session_storage_namespace_id in CreateViewParams struct");
decltype(Traits::opener_frame_token(input)) in_opener_frame_token = Traits::opener_frame_token(input);
mojo::internal::MessageFragment<decltype(fragment->opener_frame_token)>
opener_frame_token_fragment(fragment.message());
opener_frame_token_fragment.Claim(&fragment->opener_frame_token);
mojo::internal::Serialize<::blink::mojom::FrameTokenDataView, send_validation>(
in_opener_frame_token,
opener_frame_token_fragment,
true);
decltype(Traits::replication_state(input)) in_replication_state = Traits::replication_state(input);
mojo::internal::MessageFragment<
typename decltype(fragment->replication_state)::BaseType> replication_state_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::FrameReplicationStateDataView, send_validation>(
in_replication_state,
replication_state_fragment);
fragment->replication_state.Set(
replication_state_fragment.is_null() ? nullptr : replication_state_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->replication_state.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null replication_state in CreateViewParams struct");
decltype(Traits::devtools_main_frame_token(input)) in_devtools_main_frame_token = Traits::devtools_main_frame_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->devtools_main_frame_token)::BaseType> devtools_main_frame_token_fragment(
fragment.message());
mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView, send_validation>(
in_devtools_main_frame_token,
devtools_main_frame_token_fragment);
fragment->devtools_main_frame_token.Set(
devtools_main_frame_token_fragment.is_null() ? nullptr : devtools_main_frame_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->devtools_main_frame_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null devtools_main_frame_token in CreateViewParams struct");
decltype(Traits::main_frame(input)) in_main_frame = Traits::main_frame(input);
mojo::internal::MessageFragment<decltype(fragment->main_frame)>
main_frame_fragment(fragment.message());
main_frame_fragment.Claim(&fragment->main_frame);
mojo::internal::Serialize<::content::mojom::CreateMainFrameUnionDataView, send_validation>(
in_main_frame,
main_frame_fragment,
true);
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->main_frame.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null main_frame in CreateViewParams struct");
fragment->hidden = Traits::hidden(input);
decltype(Traits::prerender_param(input)) in_prerender_param = Traits::prerender_param(input);
mojo::internal::MessageFragment<
typename decltype(fragment->prerender_param)::BaseType> prerender_param_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::PrerenderParamDataView, send_validation>(
in_prerender_param,
prerender_param_fragment);
fragment->prerender_param.Set(
prerender_param_fragment.is_null() ? nullptr : prerender_param_fragment.data());
fragment->never_composited = Traits::never_composited(input);
fragment->window_was_opened_by_another_window = Traits::window_was_opened_by_another_window(input);
mojo::internal::Serialize<::content::mojom::ViewWidgetType>(
Traits::type(input),
&fragment->type);
mojo::internal::Serialize<::blink::mojom::DeprecatedFencedFrameMode>(
Traits::fenced_frame_mode(input),
&fragment->fenced_frame_mode);
decltype(Traits::outermost_origin(input)) in_outermost_origin = Traits::outermost_origin(input);
mojo::internal::MessageFragment<
typename decltype(fragment->outermost_origin)::BaseType> outermost_origin_fragment(
fragment.message());
mojo::internal::Serialize<::url::mojom::OriginDataView, send_validation>(
in_outermost_origin,
outermost_origin_fragment);
fragment->outermost_origin.Set(
outermost_origin_fragment.is_null() ? nullptr : outermost_origin_fragment.data());
decltype(Traits::blink_page_broadcast(input)) in_blink_page_broadcast = Traits::blink_page_broadcast(input);
mojo::internal::Serialize<::blink::mojom::PageBroadcastAssociatedRequestDataView>(
in_blink_page_broadcast,
&fragment->blink_page_broadcast,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->blink_page_broadcast)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid blink_page_broadcast in CreateViewParams struct");
decltype(Traits::base_background_color(input)) in_base_background_color = Traits::base_background_color(input);
mojo::internal::MessageFragment<
typename decltype(fragment->base_background_color)::BaseType> base_background_color_fragment(
fragment.message());
mojo::internal::Serialize<::skia::mojom::SkColorDataView, send_validation>(
in_base_background_color,
base_background_color_fragment);
fragment->base_background_color.Set(
base_background_color_fragment.is_null() ? nullptr : base_background_color_fragment.data());
decltype(Traits::color_provider_colors(input)) in_color_provider_colors = Traits::color_provider_colors(input);
mojo::internal::MessageFragment<
typename decltype(fragment->color_provider_colors)::BaseType> color_provider_colors_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::ColorProviderColorMapsDataView, send_validation>(
in_color_provider_colors,
color_provider_colors_fragment);
fragment->color_provider_colors.Set(
color_provider_colors_fragment.is_null() ? nullptr : color_provider_colors_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->color_provider_colors.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null color_provider_colors in CreateViewParams struct");
decltype(Traits::browsing_context_group_token(input)) in_browsing_context_group_token = Traits::browsing_context_group_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->browsing_context_group_token)::BaseType> browsing_context_group_token_fragment(
fragment.message());
mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView, send_validation>(
in_browsing_context_group_token,
browsing_context_group_token_fragment);
fragment->browsing_context_group_token.Set(
browsing_context_group_token_fragment.is_null() ? nullptr : browsing_context_group_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->browsing_context_group_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null browsing_context_group_token in CreateViewParams struct");
mojo::internal::Serialize<::network::mojom::AttributionSupport>(
Traits::attribution_support(input),
&fragment->attribution_support);
decltype(Traits::partitioned_popin_params(input)) in_partitioned_popin_params = Traits::partitioned_popin_params(input);
mojo::internal::MessageFragment<
typename decltype(fragment->partitioned_popin_params)::BaseType> partitioned_popin_params_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::PartitionedPopinParamsDataView, send_validation>(
in_partitioned_popin_params,
partitioned_popin_params_fragment);
fragment->partitioned_popin_params.Set(
partitioned_popin_params_fragment.is_null() ? nullptr : partitioned_popin_params_fragment.data());
decltype(Traits::navigation_metrics_token(input)) in_navigation_metrics_token = Traits::navigation_metrics_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->navigation_metrics_token)::BaseType> navigation_metrics_token_fragment(
fragment.message());
mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView, send_validation>(
in_navigation_metrics_token,
navigation_metrics_token_fragment);
fragment->navigation_metrics_token.Set(
navigation_metrics_token_fragment.is_null() ? nullptr : navigation_metrics_token_fragment.data());
fragment->history_index = Traits::history_index(input);
fragment->history_length = Traits::history_length(input);
decltype(Traits::canvas_noise_token(input)) in_canvas_noise_token = Traits::canvas_noise_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->canvas_noise_token)::BaseType> canvas_noise_token_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::NoiseTokenDataView, send_validation>(
in_canvas_noise_token,
canvas_noise_token_fragment);
fragment->canvas_noise_token.Set(
canvas_noise_token_fragment.is_null() ? nullptr : canvas_noise_token_fragment.data());
}
};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateLocalMainFrameParamsDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::CreateLocalMainFrameParamsDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::CreateLocalMainFrameParams_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
decltype(Traits::frame_token(input)) in_frame_token = Traits::frame_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->frame_token)::BaseType> frame_token_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::LocalFrameTokenDataView, send_validation>(
in_frame_token,
frame_token_fragment);
fragment->frame_token.Set(
frame_token_fragment.is_null() ? nullptr : frame_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->frame_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null frame_token in CreateLocalMainFrameParams struct");
fragment->routing_id = Traits::routing_id(input);
decltype(Traits::frame(input)) in_frame = Traits::frame(input);
mojo::internal::Serialize<::content::mojom::FrameAssociatedRequestDataView>(
in_frame,
&fragment->frame,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->frame)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid frame in CreateLocalMainFrameParams struct");
decltype(Traits::interface_broker(input)) in_interface_broker = Traits::interface_broker(input);
mojo::internal::Serialize<mojo::InterfacePtrDataView<::blink::mojom::BrowserInterfaceBrokerInterfaceBase>>(
in_interface_broker,
&fragment->interface_broker,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->interface_broker)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
"invalid interface_broker in CreateLocalMainFrameParams struct");
decltype(Traits::associated_interface_provider_remote(input)) in_associated_interface_provider_remote = Traits::associated_interface_provider_remote(input);
mojo::internal::Serialize<::blink::mojom::AssociatedInterfaceProviderAssociatedPtrInfoDataView>(
in_associated_interface_provider_remote,
&fragment->associated_interface_provider_remote,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->associated_interface_provider_remote)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid associated_interface_provider_remote in CreateLocalMainFrameParams struct");
fragment->is_on_initial_empty_document = Traits::is_on_initial_empty_document(input);
decltype(Traits::document_token(input)) in_document_token = Traits::document_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->document_token)::BaseType> document_token_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::DocumentTokenDataView, send_validation>(
in_document_token,
document_token_fragment);
fragment->document_token.Set(
document_token_fragment.is_null() ? nullptr : document_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->document_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null document_token in CreateLocalMainFrameParams struct");
decltype(Traits::policy_container(input)) in_policy_container = Traits::policy_container(input);
mojo::internal::MessageFragment<
typename decltype(fragment->policy_container)::BaseType> policy_container_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::PolicyContainerDataView, send_validation>(
in_policy_container,
policy_container_fragment);
fragment->policy_container.Set(
policy_container_fragment.is_null() ? nullptr : policy_container_fragment.data());
decltype(Traits::widget_params(input)) in_widget_params = Traits::widget_params(input);
mojo::internal::MessageFragment<
typename decltype(fragment->widget_params)::BaseType> widget_params_fragment(
fragment.message());
mojo::internal::Serialize<::content::mojom::CreateFrameWidgetParamsDataView, send_validation>(
in_widget_params,
widget_params_fragment);
fragment->widget_params.Set(
widget_params_fragment.is_null() ? nullptr : widget_params_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->widget_params.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null widget_params in CreateLocalMainFrameParams struct");
decltype(Traits::subresource_loader_factories(input)) in_subresource_loader_factories = Traits::subresource_loader_factories(input);
mojo::internal::MessageFragment<
typename decltype(fragment->subresource_loader_factories)::BaseType> subresource_loader_factories_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::URLLoaderFactoryBundleDataView, send_validation>(
in_subresource_loader_factories,
subresource_loader_factories_fragment);
fragment->subresource_loader_factories.Set(
subresource_loader_factories_fragment.is_null() ? nullptr : subresource_loader_factories_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->subresource_loader_factories.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null subresource_loader_factories in CreateLocalMainFrameParams struct");
}
};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateProvisionalLocalMainFrameParamsDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::CreateProvisionalLocalMainFrameParamsDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::CreateProvisionalLocalMainFrameParams_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
decltype(Traits::local_params(input)) in_local_params = Traits::local_params(input);
mojo::internal::MessageFragment<
typename decltype(fragment->local_params)::BaseType> local_params_fragment(
fragment.message());
mojo::internal::Serialize<::content::mojom::CreateLocalMainFrameParamsDataView, send_validation>(
in_local_params,
local_params_fragment);
fragment->local_params.Set(
local_params_fragment.is_null() ? nullptr : local_params_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->local_params.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null local_params in CreateProvisionalLocalMainFrameParams struct");
decltype(Traits::previous_frame_token(input)) in_previous_frame_token = Traits::previous_frame_token(input);
mojo::internal::MessageFragment<decltype(fragment->previous_frame_token)>
previous_frame_token_fragment(fragment.message());
previous_frame_token_fragment.Claim(&fragment->previous_frame_token);
mojo::internal::Serialize<::blink::mojom::FrameTokenDataView, send_validation>(
in_previous_frame_token,
previous_frame_token_fragment,
true);
}
};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateRemoteMainFrameParamsDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::CreateRemoteMainFrameParamsDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::CreateRemoteMainFrameParams_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
decltype(Traits::token(input)) in_token = Traits::token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->token)::BaseType> token_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::RemoteFrameTokenDataView, send_validation>(
in_token,
token_fragment);
fragment->token.Set(
token_fragment.is_null() ? nullptr : token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null token in CreateRemoteMainFrameParams struct");
decltype(Traits::frame_interfaces(input)) in_frame_interfaces = Traits::frame_interfaces(input);
mojo::internal::MessageFragment<
typename decltype(fragment->frame_interfaces)::BaseType> frame_interfaces_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::RemoteFrameInterfacesFromBrowserDataView, send_validation>(
in_frame_interfaces,
frame_interfaces_fragment);
fragment->frame_interfaces.Set(
frame_interfaces_fragment.is_null() ? nullptr : frame_interfaces_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->frame_interfaces.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null frame_interfaces in CreateRemoteMainFrameParams struct");
decltype(Traits::main_frame_interfaces(input)) in_main_frame_interfaces = Traits::main_frame_interfaces(input);
mojo::internal::MessageFragment<
typename decltype(fragment->main_frame_interfaces)::BaseType> main_frame_interfaces_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::RemoteMainFrameInterfacesDataView, send_validation>(
in_main_frame_interfaces,
main_frame_interfaces_fragment);
fragment->main_frame_interfaces.Set(
main_frame_interfaces_fragment.is_null() ? nullptr : main_frame_interfaces_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->main_frame_interfaces.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null main_frame_interfaces in CreateRemoteMainFrameParams struct");
}
};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateFrameWidgetParamsDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::CreateFrameWidgetParamsDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::CreateFrameWidgetParams_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
fragment->routing_id = Traits::routing_id(input);
decltype(Traits::frame_widget_host(input)) in_frame_widget_host = Traits::frame_widget_host(input);
mojo::internal::Serialize<::blink::mojom::FrameWidgetHostAssociatedPtrInfoDataView>(
in_frame_widget_host,
&fragment->frame_widget_host,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->frame_widget_host)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid frame_widget_host in CreateFrameWidgetParams struct");
decltype(Traits::frame_widget(input)) in_frame_widget = Traits::frame_widget(input);
mojo::internal::Serialize<::blink::mojom::FrameWidgetAssociatedRequestDataView>(
in_frame_widget,
&fragment->frame_widget,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->frame_widget)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid frame_widget in CreateFrameWidgetParams struct");
decltype(Traits::widget_host(input)) in_widget_host = Traits::widget_host(input);
mojo::internal::Serialize<::blink::mojom::WidgetHostAssociatedPtrInfoDataView>(
in_widget_host,
&fragment->widget_host,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->widget_host)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid widget_host in CreateFrameWidgetParams struct");
decltype(Traits::widget(input)) in_widget = Traits::widget(input);
mojo::internal::Serialize<::blink::mojom::WidgetAssociatedRequestDataView>(
in_widget,
&fragment->widget,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->widget)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid widget in CreateFrameWidgetParams struct");
decltype(Traits::visual_properties(input)) in_visual_properties = Traits::visual_properties(input);
mojo::internal::MessageFragment<
typename decltype(fragment->visual_properties)::BaseType> visual_properties_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::VisualPropertiesDataView, send_validation>(
in_visual_properties,
visual_properties_fragment);
fragment->visual_properties.Set(
visual_properties_fragment.is_null() ? nullptr : visual_properties_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->visual_properties.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null visual_properties in CreateFrameWidgetParams struct");
}
};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateFrameParamsDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::CreateFrameParamsDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::CreateFrameParams_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
decltype(Traits::frame_token(input)) in_frame_token = Traits::frame_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->frame_token)::BaseType> frame_token_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::LocalFrameTokenDataView, send_validation>(
in_frame_token,
frame_token_fragment);
fragment->frame_token.Set(
frame_token_fragment.is_null() ? nullptr : frame_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->frame_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null frame_token in CreateFrameParams struct");
fragment->routing_id = Traits::routing_id(input);
decltype(Traits::previous_frame_token(input)) in_previous_frame_token = Traits::previous_frame_token(input);
mojo::internal::MessageFragment<decltype(fragment->previous_frame_token)>
previous_frame_token_fragment(fragment.message());
previous_frame_token_fragment.Claim(&fragment->previous_frame_token);
mojo::internal::Serialize<::blink::mojom::FrameTokenDataView, send_validation>(
in_previous_frame_token,
previous_frame_token_fragment,
true);
decltype(Traits::opener_frame_token(input)) in_opener_frame_token = Traits::opener_frame_token(input);
mojo::internal::MessageFragment<decltype(fragment->opener_frame_token)>
opener_frame_token_fragment(fragment.message());
opener_frame_token_fragment.Claim(&fragment->opener_frame_token);
mojo::internal::Serialize<::blink::mojom::FrameTokenDataView, send_validation>(
in_opener_frame_token,
opener_frame_token_fragment,
true);
decltype(Traits::parent_frame_token(input)) in_parent_frame_token = Traits::parent_frame_token(input);
mojo::internal::MessageFragment<decltype(fragment->parent_frame_token)>
parent_frame_token_fragment(fragment.message());
parent_frame_token_fragment.Claim(&fragment->parent_frame_token);
mojo::internal::Serialize<::blink::mojom::FrameTokenDataView, send_validation>(
in_parent_frame_token,
parent_frame_token_fragment,
true);
decltype(Traits::previous_sibling_frame_token(input)) in_previous_sibling_frame_token = Traits::previous_sibling_frame_token(input);
mojo::internal::MessageFragment<decltype(fragment->previous_sibling_frame_token)>
previous_sibling_frame_token_fragment(fragment.message());
previous_sibling_frame_token_fragment.Claim(&fragment->previous_sibling_frame_token);
mojo::internal::Serialize<::blink::mojom::FrameTokenDataView, send_validation>(
in_previous_sibling_frame_token,
previous_sibling_frame_token_fragment,
true);
decltype(Traits::interface_broker(input)) in_interface_broker = Traits::interface_broker(input);
mojo::internal::Serialize<mojo::InterfacePtrDataView<::blink::mojom::BrowserInterfaceBrokerInterfaceBase>>(
in_interface_broker,
&fragment->interface_broker,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->interface_broker)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
"invalid interface_broker in CreateFrameParams struct");
mojo::internal::Serialize<::blink::mojom::TreeScopeType>(
Traits::tree_scope_type(input),
&fragment->tree_scope_type);
decltype(Traits::replication_state(input)) in_replication_state = Traits::replication_state(input);
mojo::internal::MessageFragment<
typename decltype(fragment->replication_state)::BaseType> replication_state_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::FrameReplicationStateDataView, send_validation>(
in_replication_state,
replication_state_fragment);
fragment->replication_state.Set(
replication_state_fragment.is_null() ? nullptr : replication_state_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->replication_state.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null replication_state in CreateFrameParams struct");
decltype(Traits::devtools_frame_token(input)) in_devtools_frame_token = Traits::devtools_frame_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->devtools_frame_token)::BaseType> devtools_frame_token_fragment(
fragment.message());
mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView, send_validation>(
in_devtools_frame_token,
devtools_frame_token_fragment);
fragment->devtools_frame_token.Set(
devtools_frame_token_fragment.is_null() ? nullptr : devtools_frame_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->devtools_frame_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null devtools_frame_token in CreateFrameParams struct");
decltype(Traits::frame_owner_properties(input)) in_frame_owner_properties = Traits::frame_owner_properties(input);
mojo::internal::MessageFragment<
typename decltype(fragment->frame_owner_properties)::BaseType> frame_owner_properties_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::FrameOwnerPropertiesDataView, send_validation>(
in_frame_owner_properties,
frame_owner_properties_fragment);
fragment->frame_owner_properties.Set(
frame_owner_properties_fragment.is_null() ? nullptr : frame_owner_properties_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->frame_owner_properties.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null frame_owner_properties in CreateFrameParams struct");
decltype(Traits::widget_params(input)) in_widget_params = Traits::widget_params(input);
mojo::internal::MessageFragment<
typename decltype(fragment->widget_params)::BaseType> widget_params_fragment(
fragment.message());
mojo::internal::Serialize<::content::mojom::CreateFrameWidgetParamsDataView, send_validation>(
in_widget_params,
widget_params_fragment);
fragment->widget_params.Set(
widget_params_fragment.is_null() ? nullptr : widget_params_fragment.data());
fragment->is_on_initial_empty_document = Traits::is_on_initial_empty_document(input);
decltype(Traits::document_token(input)) in_document_token = Traits::document_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->document_token)::BaseType> document_token_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::DocumentTokenDataView, send_validation>(
in_document_token,
document_token_fragment);
fragment->document_token.Set(
document_token_fragment.is_null() ? nullptr : document_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->document_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null document_token in CreateFrameParams struct");
decltype(Traits::policy_container(input)) in_policy_container = Traits::policy_container(input);
mojo::internal::MessageFragment<
typename decltype(fragment->policy_container)::BaseType> policy_container_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::PolicyContainerDataView, send_validation>(
in_policy_container,
policy_container_fragment);
fragment->policy_container.Set(
policy_container_fragment.is_null() ? nullptr : policy_container_fragment.data());
decltype(Traits::frame(input)) in_frame = Traits::frame(input);
mojo::internal::Serialize<::content::mojom::FrameAssociatedRequestDataView>(
in_frame,
&fragment->frame,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->frame)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid frame in CreateFrameParams struct");
decltype(Traits::associated_interface_provider_remote(input)) in_associated_interface_provider_remote = Traits::associated_interface_provider_remote(input);
mojo::internal::Serialize<::blink::mojom::AssociatedInterfaceProviderAssociatedPtrInfoDataView>(
in_associated_interface_provider_remote,
&fragment->associated_interface_provider_remote,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->associated_interface_provider_remote)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid associated_interface_provider_remote in CreateFrameParams struct");
fragment->is_for_nested_main_frame = Traits::is_for_nested_main_frame(input);
decltype(Traits::navigation_metrics_token(input)) in_navigation_metrics_token = Traits::navigation_metrics_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->navigation_metrics_token)::BaseType> navigation_metrics_token_fragment(
fragment.message());
mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView, send_validation>(
in_navigation_metrics_token,
navigation_metrics_token_fragment);
fragment->navigation_metrics_token.Set(
navigation_metrics_token_fragment.is_null() ? nullptr : navigation_metrics_token_fragment.data());
}
};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::SnapshotAccessibilityTreeParamsDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::SnapshotAccessibilityTreeParamsDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::SnapshotAccessibilityTreeParams_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
fragment->ax_mode = Traits::ax_mode(input);
fragment->max_nodes = Traits::max_nodes(input);
decltype(Traits::timeout(input)) in_timeout = Traits::timeout(input);
mojo::internal::MessageFragment<
typename decltype(fragment->timeout)::BaseType> timeout_fragment(
fragment.message());
mojo::internal::Serialize<::mojo_base::mojom::TimeDeltaDataView, send_validation>(
in_timeout,
timeout_fragment);
fragment->timeout.Set(
timeout_fragment.is_null() ? nullptr : timeout_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->timeout.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null timeout in SnapshotAccessibilityTreeParams struct");
}
};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateNewWindowParamsDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::CreateNewWindowParamsDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::CreateNewWindowParams_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
fragment->allow_popup = Traits::allow_popup(input);
mojo::internal::Serialize<::content::mojom::WindowContainerType>(
Traits::window_container_type(input),
&fragment->window_container_type);
decltype(Traits::session_storage_namespace_id(input)) in_session_storage_namespace_id = Traits::session_storage_namespace_id(input);
mojo::internal::MessageFragment<
typename decltype(fragment->session_storage_namespace_id)::BaseType> session_storage_namespace_id_fragment(
fragment.message());
mojo::internal::Serialize<mojo::StringDataView, send_validation>(
in_session_storage_namespace_id,
session_storage_namespace_id_fragment);
fragment->session_storage_namespace_id.Set(
session_storage_namespace_id_fragment.is_null() ? nullptr : session_storage_namespace_id_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->session_storage_namespace_id.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null session_storage_namespace_id in CreateNewWindowParams struct");
decltype(Traits::clone_from_session_storage_namespace_id(input)) in_clone_from_session_storage_namespace_id = Traits::clone_from_session_storage_namespace_id(input);
mojo::internal::MessageFragment<
typename decltype(fragment->clone_from_session_storage_namespace_id)::BaseType> clone_from_session_storage_namespace_id_fragment(
fragment.message());
mojo::internal::Serialize<mojo::StringDataView, send_validation>(
in_clone_from_session_storage_namespace_id,
clone_from_session_storage_namespace_id_fragment);
fragment->clone_from_session_storage_namespace_id.Set(
clone_from_session_storage_namespace_id_fragment.is_null() ? nullptr : clone_from_session_storage_namespace_id_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->clone_from_session_storage_namespace_id.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null clone_from_session_storage_namespace_id in CreateNewWindowParams struct");
decltype(Traits::frame_name(input)) in_frame_name = Traits::frame_name(input);
mojo::internal::MessageFragment<
typename decltype(fragment->frame_name)::BaseType> frame_name_fragment(
fragment.message());
mojo::internal::Serialize<mojo::StringDataView, send_validation>(
in_frame_name,
frame_name_fragment);
fragment->frame_name.Set(
frame_name_fragment.is_null() ? nullptr : frame_name_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->frame_name.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null frame_name in CreateNewWindowParams struct");
fragment->opener_suppressed = Traits::opener_suppressed(input);
fragment->is_form_submission = Traits::is_form_submission(input);
fragment->consumes_user_activation = Traits::consumes_user_activation(input);
decltype(Traits::form_submission_post_data(input)) in_form_submission_post_data = Traits::form_submission_post_data(input);
mojo::internal::MessageFragment<
typename decltype(fragment->form_submission_post_data)::BaseType> form_submission_post_data_fragment(
fragment.message());
mojo::internal::Serialize<::network::mojom::URLRequestBodyDataView, send_validation>(
in_form_submission_post_data,
form_submission_post_data_fragment);
fragment->form_submission_post_data.Set(
form_submission_post_data_fragment.is_null() ? nullptr : form_submission_post_data_fragment.data());
decltype(Traits::form_submission_post_content_type(input)) in_form_submission_post_content_type = Traits::form_submission_post_content_type(input);
mojo::internal::MessageFragment<
typename decltype(fragment->form_submission_post_content_type)::BaseType> form_submission_post_content_type_fragment(
fragment.message());
mojo::internal::Serialize<mojo::StringDataView, send_validation>(
in_form_submission_post_content_type,
form_submission_post_content_type_fragment);
fragment->form_submission_post_content_type.Set(
form_submission_post_content_type_fragment.is_null() ? nullptr : form_submission_post_content_type_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->form_submission_post_content_type.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null form_submission_post_content_type in CreateNewWindowParams struct");
mojo::internal::Serialize<::ui::mojom::WindowOpenDisposition>(
Traits::disposition(input),
&fragment->disposition);
decltype(Traits::target_url(input)) in_target_url = Traits::target_url(input);
mojo::internal::MessageFragment<
typename decltype(fragment->target_url)::BaseType> target_url_fragment(
fragment.message());
mojo::internal::Serialize<::url::mojom::UrlDataView, send_validation>(
in_target_url,
target_url_fragment);
fragment->target_url.Set(
target_url_fragment.is_null() ? nullptr : target_url_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->target_url.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null target_url in CreateNewWindowParams struct");
decltype(Traits::referrer(input)) in_referrer = Traits::referrer(input);
mojo::internal::MessageFragment<
typename decltype(fragment->referrer)::BaseType> referrer_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::ReferrerDataView, send_validation>(
in_referrer,
referrer_fragment);
fragment->referrer.Set(
referrer_fragment.is_null() ? nullptr : referrer_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->referrer.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null referrer in CreateNewWindowParams struct");
decltype(Traits::features(input)) in_features = Traits::features(input);
mojo::internal::MessageFragment<
typename decltype(fragment->features)::BaseType> features_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::WindowFeaturesDataView, send_validation>(
in_features,
features_fragment);
fragment->features.Set(
features_fragment.is_null() ? nullptr : features_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->features.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null features in CreateNewWindowParams struct");
decltype(Traits::impression(input)) in_impression = Traits::impression(input);
mojo::internal::MessageFragment<
typename decltype(fragment->impression)::BaseType> impression_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::ImpressionDataView, send_validation>(
in_impression,
impression_fragment);
fragment->impression.Set(
impression_fragment.is_null() ? nullptr : impression_fragment.data());
decltype(Traits::download_policy(input)) in_download_policy = Traits::download_policy(input);
mojo::internal::MessageFragment<
typename decltype(fragment->download_policy)::BaseType> download_policy_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::NavigationDownloadPolicyDataView, send_validation>(
in_download_policy,
download_policy_fragment);
fragment->download_policy.Set(
download_policy_fragment.is_null() ? nullptr : download_policy_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->download_policy.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null download_policy in CreateNewWindowParams struct");
decltype(Traits::pip_options(input)) in_pip_options = Traits::pip_options(input);
mojo::internal::MessageFragment<
typename decltype(fragment->pip_options)::BaseType> pip_options_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::PictureInPictureWindowOptionsDataView, send_validation>(
in_pip_options,
pip_options_fragment);
fragment->pip_options.Set(
pip_options_fragment.is_null() ? nullptr : pip_options_fragment.data());
mojo::internal::Serialize<::blink::mojom::NavigationInitiatorActivationAndAdStatus>(
Traits::initiator_activation_and_ad_status(input),
&fragment->initiator_activation_and_ad_status);
decltype(Traits::frame_remote(input)) in_frame_remote = Traits::frame_remote(input);
mojo::internal::Serialize<::content::mojom::FrameAssociatedPtrInfoDataView>(
in_frame_remote,
&fragment->frame_remote,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->frame_remote)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid frame_remote in CreateNewWindowParams struct");
decltype(Traits::page_broadcast_remote(input)) in_page_broadcast_remote = Traits::page_broadcast_remote(input);
mojo::internal::Serialize<::blink::mojom::PageBroadcastAssociatedPtrInfoDataView>(
in_page_broadcast_remote,
&fragment->page_broadcast_remote,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->page_broadcast_remote)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid page_broadcast_remote in CreateNewWindowParams struct");
decltype(Traits::main_frame_interface_broker(input)) in_main_frame_interface_broker = Traits::main_frame_interface_broker(input);
mojo::internal::Serialize<mojo::InterfaceRequestDataView<::blink::mojom::BrowserInterfaceBrokerInterfaceBase>>(
in_main_frame_interface_broker,
&fragment->main_frame_interface_broker,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->main_frame_interface_broker)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_HANDLE,
"invalid main_frame_interface_broker in CreateNewWindowParams struct");
decltype(Traits::associated_interface_provider(input)) in_associated_interface_provider = Traits::associated_interface_provider(input);
mojo::internal::Serialize<::blink::mojom::AssociatedInterfaceProviderAssociatedRequestDataView>(
in_associated_interface_provider,
&fragment->associated_interface_provider,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->associated_interface_provider)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid associated_interface_provider in CreateNewWindowParams struct");
decltype(Traits::widget_host(input)) in_widget_host = Traits::widget_host(input);
mojo::internal::Serialize<::blink::mojom::WidgetHostAssociatedRequestDataView>(
in_widget_host,
&fragment->widget_host,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->widget_host)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid widget_host in CreateNewWindowParams struct");
decltype(Traits::widget(input)) in_widget = Traits::widget(input);
mojo::internal::Serialize<::blink::mojom::WidgetAssociatedPtrInfoDataView>(
in_widget,
&fragment->widget,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->widget)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid widget in CreateNewWindowParams struct");
decltype(Traits::frame_widget_host(input)) in_frame_widget_host = Traits::frame_widget_host(input);
mojo::internal::Serialize<::blink::mojom::FrameWidgetHostAssociatedRequestDataView>(
in_frame_widget_host,
&fragment->frame_widget_host,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->frame_widget_host)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid frame_widget_host in CreateNewWindowParams struct");
decltype(Traits::frame_widget(input)) in_frame_widget = Traits::frame_widget(input);
mojo::internal::Serialize<::blink::mojom::FrameWidgetAssociatedPtrInfoDataView>(
in_frame_widget,
&fragment->frame_widget,
&fragment.message());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(!mojo::internal::IsHandleOrInterfaceValid(fragment->frame_widget)),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_INVALID_INTERFACE_ID,
"invalid frame_widget in CreateNewWindowParams struct");
}
};
template <typename MaybeConstUserType, mojo::internal::SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateNewWindowReplyDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = StructTraits<::content::mojom::CreateNewWindowReplyDataView, UserType>;
static void Serialize(
MaybeConstUserType& input,
mojo::internal::MessageFragment<::content::mojom::internal::CreateNewWindowReply_Data>& fragment) {
if (CallIsNullIfExists<Traits>(input))
return;
fragment.Allocate();
decltype(Traits::main_frame_token(input)) in_main_frame_token = Traits::main_frame_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->main_frame_token)::BaseType> main_frame_token_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::LocalFrameTokenDataView, send_validation>(
in_main_frame_token,
main_frame_token_fragment);
fragment->main_frame_token.Set(
main_frame_token_fragment.is_null() ? nullptr : main_frame_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->main_frame_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null main_frame_token in CreateNewWindowReply struct");
fragment->main_frame_route_id = Traits::main_frame_route_id(input);
fragment->widget_routing_id = Traits::widget_routing_id(input);
decltype(Traits::visual_properties(input)) in_visual_properties = Traits::visual_properties(input);
mojo::internal::MessageFragment<
typename decltype(fragment->visual_properties)::BaseType> visual_properties_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::VisualPropertiesDataView, send_validation>(
in_visual_properties,
visual_properties_fragment);
fragment->visual_properties.Set(
visual_properties_fragment.is_null() ? nullptr : visual_properties_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->visual_properties.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null visual_properties in CreateNewWindowReply struct");
decltype(Traits::cloned_session_storage_namespace_id(input)) in_cloned_session_storage_namespace_id = Traits::cloned_session_storage_namespace_id(input);
mojo::internal::MessageFragment<
typename decltype(fragment->cloned_session_storage_namespace_id)::BaseType> cloned_session_storage_namespace_id_fragment(
fragment.message());
mojo::internal::Serialize<mojo::StringDataView, send_validation>(
in_cloned_session_storage_namespace_id,
cloned_session_storage_namespace_id_fragment);
fragment->cloned_session_storage_namespace_id.Set(
cloned_session_storage_namespace_id_fragment.is_null() ? nullptr : cloned_session_storage_namespace_id_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->cloned_session_storage_namespace_id.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null cloned_session_storage_namespace_id in CreateNewWindowReply struct");
decltype(Traits::devtools_main_frame_token(input)) in_devtools_main_frame_token = Traits::devtools_main_frame_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->devtools_main_frame_token)::BaseType> devtools_main_frame_token_fragment(
fragment.message());
mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView, send_validation>(
in_devtools_main_frame_token,
devtools_main_frame_token_fragment);
fragment->devtools_main_frame_token.Set(
devtools_main_frame_token_fragment.is_null() ? nullptr : devtools_main_frame_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->devtools_main_frame_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null devtools_main_frame_token in CreateNewWindowReply struct");
fragment->wait_for_debugger = Traits::wait_for_debugger(input);
decltype(Traits::document_token(input)) in_document_token = Traits::document_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->document_token)::BaseType> document_token_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::DocumentTokenDataView, send_validation>(
in_document_token,
document_token_fragment);
fragment->document_token.Set(
document_token_fragment.is_null() ? nullptr : document_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->document_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null document_token in CreateNewWindowReply struct");
decltype(Traits::policy_container(input)) in_policy_container = Traits::policy_container(input);
mojo::internal::MessageFragment<
typename decltype(fragment->policy_container)::BaseType> policy_container_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::PolicyContainerDataView, send_validation>(
in_policy_container,
policy_container_fragment);
fragment->policy_container.Set(
policy_container_fragment.is_null() ? nullptr : policy_container_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->policy_container.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null policy_container in CreateNewWindowReply struct");
decltype(Traits::browsing_context_group_token(input)) in_browsing_context_group_token = Traits::browsing_context_group_token(input);
mojo::internal::MessageFragment<
typename decltype(fragment->browsing_context_group_token)::BaseType> browsing_context_group_token_fragment(
fragment.message());
mojo::internal::Serialize<::mojo_base::mojom::UnguessableTokenDataView, send_validation>(
in_browsing_context_group_token,
browsing_context_group_token_fragment);
fragment->browsing_context_group_token.Set(
browsing_context_group_token_fragment.is_null() ? nullptr : browsing_context_group_token_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->browsing_context_group_token.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null browsing_context_group_token in CreateNewWindowReply struct");
decltype(Traits::color_provider_colors(input)) in_color_provider_colors = Traits::color_provider_colors(input);
mojo::internal::MessageFragment<
typename decltype(fragment->color_provider_colors)::BaseType> color_provider_colors_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::ColorProviderColorMapsDataView, send_validation>(
in_color_provider_colors,
color_provider_colors_fragment);
fragment->color_provider_colors.Set(
color_provider_colors_fragment.is_null() ? nullptr : color_provider_colors_fragment.data());
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(fragment->color_provider_colors.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null color_provider_colors in CreateNewWindowReply struct");
decltype(Traits::partitioned_popin_params(input)) in_partitioned_popin_params = Traits::partitioned_popin_params(input);
mojo::internal::MessageFragment<
typename decltype(fragment->partitioned_popin_params)::BaseType> partitioned_popin_params_fragment(
fragment.message());
mojo::internal::Serialize<::blink::mojom::PartitionedPopinParamsDataView, send_validation>(
in_partitioned_popin_params,
partitioned_popin_params_fragment);
fragment->partitioned_popin_params.Set(
partitioned_popin_params_fragment.is_null() ? nullptr : partitioned_popin_params_fragment.data());
decltype(Traits::widget_screen_rect(input)) in_widget_screen_rect = Traits::widget_screen_rect(input);
mojo::internal::MessageFragment<
typename decltype(fragment->widget_screen_rect)::BaseType> widget_screen_rect_fragment(
fragment.message());
mojo::internal::Serialize<::gfx::mojom::RectDataView, send_validation>(
in_widget_screen_rect,
widget_screen_rect_fragment);
fragment->widget_screen_rect.Set(
widget_screen_rect_fragment.is_null() ? nullptr : widget_screen_rect_fragment.data());
decltype(Traits::window_screen_rect(input)) in_window_screen_rect = Traits::window_screen_rect(input);
mojo::internal::MessageFragment<
typename decltype(fragment->window_screen_rect)::BaseType> window_screen_rect_fragment(
fragment.message());
mojo::internal::Serialize<::gfx::mojom::RectDataView, send_validation>(
in_window_screen_rect,
window_screen_rect_fragment);
fragment->window_screen_rect.Set(
window_screen_rect_fragment.is_null() ? nullptr : window_screen_rect_fragment.data());
}
};
template <typename MaybeConstUserType, SendValidation send_validation>
struct SendValidationSerializer<::content::mojom::CreateMainFrameUnionDataView, MaybeConstUserType, send_validation> {
using UserType = typename std::remove_const<MaybeConstUserType>::type;
using Traits = UnionTraits<::content::mojom::CreateMainFrameUnionDataView, UserType>;
static void Serialize(MaybeConstUserType& input,
MessageFragment<::content::mojom::internal::CreateMainFrameUnion_Data>& fragment,
bool inlined) {
if (CallIsNullIfExists<Traits>(input)) {
if (inlined)
fragment->set_null();
return;
}
if (!inlined)
fragment.Allocate();
// TODO(azani): Handle unknown and objects.
// Set the not-null flag.
fragment->size = kUnionDataSize;
fragment->tag = Traits::GetTag(input);
switch (fragment->tag) {
case ::content::mojom::CreateMainFrameUnionDataView::Tag::kLocalParams: {
decltype(Traits::local_params(input))
in_local_params = Traits::local_params(input);
mojo::internal::MessageFragment<
typename decltype(fragment->data.f_local_params)::BaseType>
value_fragment(fragment.message());
mojo::internal::Serialize<::content::mojom::CreateLocalMainFrameParamsDataView, send_validation>(
in_local_params,
value_fragment);
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(value_fragment.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null local_params in CreateMainFrameUnion union");
fragment->data.f_local_params.Set(
value_fragment.is_null() ? nullptr : value_fragment.data());
break;
}
case ::content::mojom::CreateMainFrameUnionDataView::Tag::kProvisionalLocalParams: {
decltype(Traits::provisional_local_params(input))
in_provisional_local_params = Traits::provisional_local_params(input);
mojo::internal::MessageFragment<
typename decltype(fragment->data.f_provisional_local_params)::BaseType>
value_fragment(fragment.message());
mojo::internal::Serialize<::content::mojom::CreateProvisionalLocalMainFrameParamsDataView, send_validation>(
in_provisional_local_params,
value_fragment);
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(value_fragment.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null provisional_local_params in CreateMainFrameUnion union");
fragment->data.f_provisional_local_params.Set(
value_fragment.is_null() ? nullptr : value_fragment.data());
break;
}
case ::content::mojom::CreateMainFrameUnionDataView::Tag::kRemoteParams: {
decltype(Traits::remote_params(input))
in_remote_params = Traits::remote_params(input);
mojo::internal::MessageFragment<
typename decltype(fragment->data.f_remote_params)::BaseType>
value_fragment(fragment.message());
mojo::internal::Serialize<::content::mojom::CreateRemoteMainFrameParamsDataView, send_validation>(
in_remote_params,
value_fragment);
MOJO_INTERNAL_CHECK_SERIALIZATION(
send_validation,
!(value_fragment.is_null()),
mojo::internal::VALIDATION_ERROR_UNEXPECTED_NULL_POINTER,
"null remote_params in CreateMainFrameUnion union");
fragment->data.f_remote_params.Set(
value_fragment.is_null() ? nullptr : value_fragment.data());
break;
}
}
}
};
} // namespace mojo::internal
#endif // CONTENT_COMMON_FRAME_MOJOM_SEND_VALIDATION_H_