| // content/common/frame.mojom-shared.cc is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // Copyright 2016 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include "content/common/frame.mojom-shared.h" |
| |
| // Used to support stream output operator for enums. |
| // TODO(dcheng): Consider omitting this somehow if not needed. |
| #include <ostream> |
| #include <utility> |
| #include "base/strings/stringprintf.h" |
| #include "mojo/public/cpp/bindings/lib/validate_params.h" |
| #include "mojo/public/cpp/bindings/lib/validation_errors.h" |
| #include "mojo/public/cpp/bindings/lib/validation_util.h" |
| #include "third_party/perfetto/include/perfetto/tracing/traced_value.h" |
| |
| #include "content/common/frame.mojom-params-data.h" |
| namespace content { |
| namespace mojom { |
| |
| NOINLINE static const char* ViewWidgetTypeToStringHelper(ViewWidgetType value) { |
| // Defined in a helper function to ensure that Clang generates a lookup table. |
| switch(value) { |
| case ViewWidgetType::kTopLevel: |
| return "kTopLevel"; |
| case ViewWidgetType::kGuestView: |
| return "kGuestView"; |
| case ViewWidgetType::kFencedFrame: |
| return "kFencedFrame"; |
| default: |
| return nullptr; |
| } |
| } |
| |
| std::string ViewWidgetTypeToString(ViewWidgetType value) { |
| const char *str = ViewWidgetTypeToStringHelper(value); |
| if (!str) { |
| return base::StringPrintf("Unknown ViewWidgetType value: %i", static_cast<int32_t>(value)); |
| } |
| return str; |
| } |
| |
| std::ostream& operator<<(std::ostream& os, ViewWidgetType value) { |
| return os << ViewWidgetTypeToString(value); |
| } |
| |
| NOINLINE static const char* ChildFrameOwnerElementTypeToStringHelper(ChildFrameOwnerElementType value) { |
| // Defined in a helper function to ensure that Clang generates a lookup table. |
| switch(value) { |
| case ChildFrameOwnerElementType::kIframe: |
| return "kIframe"; |
| case ChildFrameOwnerElementType::kObject: |
| return "kObject"; |
| case ChildFrameOwnerElementType::kEmbed: |
| return "kEmbed"; |
| case ChildFrameOwnerElementType::kFrame: |
| return "kFrame"; |
| default: |
| return nullptr; |
| } |
| } |
| |
| std::string ChildFrameOwnerElementTypeToString(ChildFrameOwnerElementType value) { |
| const char *str = ChildFrameOwnerElementTypeToStringHelper(value); |
| if (!str) { |
| return base::StringPrintf("Unknown ChildFrameOwnerElementType value: %i", static_cast<int32_t>(value)); |
| } |
| return str; |
| } |
| |
| std::ostream& operator<<(std::ostream& os, ChildFrameOwnerElementType value) { |
| return os << ChildFrameOwnerElementTypeToString(value); |
| } |
| |
| NOINLINE static const char* FrameDeleteIntentionToStringHelper(FrameDeleteIntention value) { |
| // Defined in a helper function to ensure that Clang generates a lookup table. |
| switch(value) { |
| case FrameDeleteIntention::kNotMainFrame: |
| return "kNotMainFrame"; |
| case FrameDeleteIntention::kSpeculativeMainFrameForShutdown: |
| return "kSpeculativeMainFrameForShutdown"; |
| case FrameDeleteIntention::kSpeculativeMainFrameForNavigationCancelled: |
| return "kSpeculativeMainFrameForNavigationCancelled"; |
| default: |
| return nullptr; |
| } |
| } |
| |
| std::string FrameDeleteIntentionToString(FrameDeleteIntention value) { |
| const char *str = FrameDeleteIntentionToStringHelper(value); |
| if (!str) { |
| return base::StringPrintf("Unknown FrameDeleteIntention value: %i", static_cast<int32_t>(value)); |
| } |
| return str; |
| } |
| |
| std::ostream& operator<<(std::ostream& os, FrameDeleteIntention value) { |
| return os << FrameDeleteIntentionToString(value); |
| } |
| |
| NOINLINE static const char* CreateNewWindowStatusToStringHelper(CreateNewWindowStatus value) { |
| // Defined in a helper function to ensure that Clang generates a lookup table. |
| switch(value) { |
| case CreateNewWindowStatus::kBlocked: |
| return "kBlocked"; |
| case CreateNewWindowStatus::kIgnore: |
| return "kIgnore"; |
| case CreateNewWindowStatus::kReuse: |
| return "kReuse"; |
| case CreateNewWindowStatus::kSuccess: |
| return "kSuccess"; |
| default: |
| return nullptr; |
| } |
| } |
| |
| std::string CreateNewWindowStatusToString(CreateNewWindowStatus value) { |
| const char *str = CreateNewWindowStatusToStringHelper(value); |
| if (!str) { |
| return base::StringPrintf("Unknown CreateNewWindowStatus value: %i", static_cast<int32_t>(value)); |
| } |
| return str; |
| } |
| |
| std::ostream& operator<<(std::ostream& os, CreateNewWindowStatus value) { |
| return os << CreateNewWindowStatusToString(value); |
| } |
| |
| namespace internal { |
| // static |
| bool CreateMainFrameUnion_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context, |
| bool inlined) { |
| if (!data) { |
| DCHECK(!inlined); |
| return true; |
| } |
| |
| // If it is inlined, the alignment is already enforced by its enclosing |
| // object. We don't have to validate that. |
| DCHECK(!inlined || mojo::internal::IsAligned(data)); |
| |
| if (!inlined && |
| !mojo::internal::ValidateNonInlinedUnionHeaderAndClaimMemory( |
| data, validation_context)) { |
| return false; |
| } |
| |
| const CreateMainFrameUnion_Data* object = static_cast<const CreateMainFrameUnion_Data*>(data); |
| |
| if (inlined && object->is_null()) |
| return true; |
| |
| switch (object->tag) { |
| |
| case CreateMainFrameUnion_Tag::kLocalParams: { |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->data.f_local_params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->data.f_local_params, validation_context)) |
| return false; |
| return true; |
| } |
| case CreateMainFrameUnion_Tag::kProvisionalLocalParams: { |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->data.f_provisional_local_params, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->data.f_provisional_local_params, validation_context)) |
| return false; |
| return true; |
| } |
| case CreateMainFrameUnion_Tag::kRemoteParams: { |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->data.f_remote_params, 3, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->data.f_remote_params, validation_context)) |
| return false; |
| return true; |
| } |
| default: { |
| |
| ReportValidationError( |
| validation_context, |
| mojo::internal::VALIDATION_ERROR_UNKNOWN_UNION_TAG, |
| "unknown tag in CreateMainFrameUnion"); |
| return false; |
| } |
| } |
| } |
| |
| |
| // static |
| bool CreateViewParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 168, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const CreateViewParams_Data* object = |
| static_cast<const CreateViewParams_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->renderer_preferences, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->renderer_preferences, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->web_preferences, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->web_preferences, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->session_storage_namespace_id, 3, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& session_storage_namespace_id_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->session_storage_namespace_id, validation_context, |
| &session_storage_namespace_id_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateInlinedUnion(object->opener_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->replication_state, 5, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->replication_state, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->devtools_main_frame_token, 6, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->devtools_main_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateInlinedUnionNonNullable( |
| object->main_frame, 7, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateInlinedUnion(object->main_frame, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->prerender_param, validation_context)) |
| return false; |
| |
| |
| if (!::content::mojom::internal::ViewWidgetType_Data |
| ::Validate(object->type, validation_context)) |
| return false; |
| |
| |
| if (!::blink::mojom::internal::DeprecatedFencedFrameMode_Data |
| ::Validate(object->fenced_frame_mode, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->outermost_origin, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->blink_page_broadcast, 15, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->blink_page_broadcast, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateStruct(object->base_background_color, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->color_provider_colors, 17, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->color_provider_colors, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->browsing_context_group_token, 18, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->browsing_context_group_token, validation_context)) |
| return false; |
| |
| |
| if (!::network::mojom::internal::AttributionSupport_Data |
| ::Validate(object->attribution_support, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->partitioned_popin_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->navigation_metrics_token, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| CreateViewParams_Data::CreateViewParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool CreateLocalMainFrameParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 80, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const CreateLocalMainFrameParams_Data* object = |
| static_cast<const CreateLocalMainFrameParams_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_token, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->frame, 3, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->frame, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->interface_broker, 4, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->interface_broker, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->associated_interface_provider_remote, 5, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->associated_interface_provider_remote, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->document_token, 7, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->document_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->policy_container, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->widget_params, 9, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->widget_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->subresource_loader_factories, 10, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->subresource_loader_factories, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| CreateLocalMainFrameParams_Data::CreateLocalMainFrameParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool CreateProvisionalLocalMainFrameParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 32, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const CreateProvisionalLocalMainFrameParams_Data* object = |
| static_cast<const CreateProvisionalLocalMainFrameParams_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->local_params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->local_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateInlinedUnion(object->previous_frame_token, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| CreateProvisionalLocalMainFrameParams_Data::CreateProvisionalLocalMainFrameParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool CreateRemoteMainFrameParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 32, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const CreateRemoteMainFrameParams_Data* object = |
| static_cast<const CreateRemoteMainFrameParams_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->token, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_interfaces, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->frame_interfaces, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->main_frame_interfaces, 3, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->main_frame_interfaces, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| CreateRemoteMainFrameParams_Data::CreateRemoteMainFrameParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool CreateFrameWidgetParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 48, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const CreateFrameWidgetParams_Data* object = |
| static_cast<const CreateFrameWidgetParams_Data*>(data); |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->frame_widget_host, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->frame_widget_host, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->frame_widget, 3, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->frame_widget, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->widget_host, 4, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->widget_host, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->widget, 5, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->widget, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->visual_properties, 6, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->visual_properties, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| CreateFrameWidgetParams_Data::CreateFrameWidgetParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool CreateFrameParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 168, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const CreateFrameParams_Data* object = |
| static_cast<const CreateFrameParams_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_token, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateInlinedUnion(object->previous_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateInlinedUnion(object->opener_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateInlinedUnion(object->parent_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateInlinedUnion(object->previous_sibling_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->interface_broker, 7, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->interface_broker, |
| validation_context)) { |
| return false; |
| } |
| |
| |
| if (!::blink::mojom::internal::TreeScopeType_Data |
| ::Validate(object->tree_scope_type, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->replication_state, 9, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->replication_state, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->devtools_frame_token, 10, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->devtools_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_owner_properties, 11, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->frame_owner_properties, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->widget_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->document_token, 14, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->document_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->policy_container, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->frame, 16, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->frame, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->associated_interface_provider_remote, 17, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->associated_interface_provider_remote, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateStruct(object->navigation_metrics_token, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| CreateFrameParams_Data::CreateFrameParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool SnapshotAccessibilityTreeParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 32, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const SnapshotAccessibilityTreeParams_Data* object = |
| static_cast<const SnapshotAccessibilityTreeParams_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->timeout, 3, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->timeout, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| SnapshotAccessibilityTreeParams_Data::SnapshotAccessibilityTreeParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool CreateNewWindowParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 160, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const CreateNewWindowParams_Data* object = |
| static_cast<const CreateNewWindowParams_Data*>(data); |
| |
| |
| if (!::content::mojom::internal::WindowContainerType_Data |
| ::Validate(object->window_container_type, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->session_storage_namespace_id, 3, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& session_storage_namespace_id_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->session_storage_namespace_id, validation_context, |
| &session_storage_namespace_id_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->clone_from_session_storage_namespace_id, 4, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& clone_from_session_storage_namespace_id_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->clone_from_session_storage_namespace_id, validation_context, |
| &clone_from_session_storage_namespace_id_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_name, 5, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& frame_name_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->frame_name, validation_context, |
| &frame_name_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateStruct(object->form_submission_post_data, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->form_submission_post_content_type, 10, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& form_submission_post_content_type_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->form_submission_post_content_type, validation_context, |
| &form_submission_post_content_type_validate_params)) { |
| return false; |
| } |
| |
| |
| if (!::ui::mojom::internal::WindowOpenDisposition_Data |
| ::Validate(object->disposition, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->target_url, 12, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->target_url, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->referrer, 13, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->referrer, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->features, 14, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->features, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->impression, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->download_policy, 16, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->download_policy, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->pip_options, validation_context)) |
| return false; |
| |
| |
| if (!::blink::mojom::internal::NavigationInitiatorActivationAndAdStatus_Data |
| ::Validate(object->initiator_activation_and_ad_status, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->frame_remote, 19, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->frame_remote, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->page_broadcast_remote, 20, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->page_broadcast_remote, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->main_frame_interface_broker, 21, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->main_frame_interface_broker, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->associated_interface_provider, 22, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->associated_interface_provider, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->widget_host, 23, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->widget_host, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->widget, 24, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->widget, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->frame_widget_host, 25, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->frame_widget_host, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->frame_widget, 26, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->frame_widget, |
| validation_context)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| CreateNewWindowParams_Data::CreateNewWindowParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool CreateNewWindowReply_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 112, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const CreateNewWindowReply_Data* object = |
| static_cast<const CreateNewWindowReply_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->main_frame_token, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->main_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->visual_properties, 4, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->visual_properties, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->cloned_session_storage_namespace_id, 5, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& cloned_session_storage_namespace_id_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->cloned_session_storage_namespace_id, validation_context, |
| &cloned_session_storage_namespace_id_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->devtools_main_frame_token, 6, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->devtools_main_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->document_token, 8, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->document_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->policy_container, 9, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->policy_container, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->browsing_context_group_token, 10, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->browsing_context_group_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->color_provider_colors, 11, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->color_provider_colors, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->partitioned_popin_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->widget_screen_rect, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->window_screen_rect, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| CreateNewWindowReply_Data::CreateNewWindowReply_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHTMLSerializerHandler_DidReceiveData_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHTMLSerializerHandler_DidReceiveData_Params_Data* object = |
| static_cast<const FrameHTMLSerializerHandler_DidReceiveData_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->data_buffer, 1, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& data_buffer_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->data_buffer, validation_context, |
| &data_buffer_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| FrameHTMLSerializerHandler_DidReceiveData_Params_Data::FrameHTMLSerializerHandler_DidReceiveData_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHTMLSerializerHandler_Done_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 8, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHTMLSerializerHandler_Done_Params_Data* object = |
| static_cast<const FrameHTMLSerializerHandler_Done_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| FrameHTMLSerializerHandler_Done_Params_Data::FrameHTMLSerializerHandler_Done_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_CommitSameDocumentNavigation_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 24, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_CommitSameDocumentNavigation_Params_Data* object = |
| static_cast<const Frame_CommitSameDocumentNavigation_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->common_params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->common_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->request_params, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->request_params, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Frame_CommitSameDocumentNavigation_Params_Data::Frame_CommitSameDocumentNavigation_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_CommitSameDocumentNavigation_ResponseParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_CommitSameDocumentNavigation_ResponseParams_Data* object = |
| static_cast<const Frame_CommitSameDocumentNavigation_ResponseParams_Data*>(data); |
| |
| |
| if (!::blink::mojom::internal::CommitResult_Data |
| ::Validate(object->commit_result, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Frame_CommitSameDocumentNavigation_ResponseParams_Data::Frame_CommitSameDocumentNavigation_ResponseParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_UpdateSubresourceLoaderFactories_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_UpdateSubresourceLoaderFactories_Params_Data* object = |
| static_cast<const Frame_UpdateSubresourceLoaderFactories_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->subresource_loader_factories, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->subresource_loader_factories, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Frame_UpdateSubresourceLoaderFactories_Params_Data::Frame_UpdateSubresourceLoaderFactories_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_SetWantErrorMessageStackTrace_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 8, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_SetWantErrorMessageStackTrace_Params_Data* object = |
| static_cast<const Frame_SetWantErrorMessageStackTrace_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| Frame_SetWantErrorMessageStackTrace_Params_Data::Frame_SetWantErrorMessageStackTrace_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_Unload_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 56, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_Unload_Params_Data* object = |
| static_cast<const Frame_Unload_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->new_remote_frame_replication_state, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->new_remote_frame_replication_state, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->new_remote_frame_token, 3, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->new_remote_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->new_remote_frame_interfaces, 4, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->new_remote_frame_interfaces, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->new_remote_main_frame_interfaces, 5, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->new_remote_main_frame_interfaces, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->devtools_frame_token, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Frame_Unload_Params_Data::Frame_Unload_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_Delete_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_Delete_Params_Data* object = |
| static_cast<const Frame_Delete_Params_Data*>(data); |
| |
| |
| if (!::content::mojom::internal::FrameDeleteIntention_Data |
| ::Validate(object->intention, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Frame_Delete_Params_Data::Frame_Delete_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_UndoCommitNavigation_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 48, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_UndoCommitNavigation_Params_Data* object = |
| static_cast<const Frame_UndoCommitNavigation_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->new_remote_frame_replication_state, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->new_remote_frame_replication_state, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->new_remote_frame_token, 3, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->new_remote_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->new_remote_frame_interfaces, 4, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->new_remote_frame_interfaces, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->new_remote_main_frame_interfaces, 5, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->new_remote_main_frame_interfaces, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Frame_UndoCommitNavigation_Params_Data::Frame_UndoCommitNavigation_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_GetInterfaceProvider_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_GetInterfaceProvider_Params_Data* object = |
| static_cast<const Frame_GetInterfaceProvider_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->interfaces, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->interfaces, |
| validation_context)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| Frame_GetInterfaceProvider_Params_Data::Frame_GetInterfaceProvider_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_SnapshotAccessibilityTree_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_SnapshotAccessibilityTree_Params_Data* object = |
| static_cast<const Frame_SnapshotAccessibilityTree_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->params, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Frame_SnapshotAccessibilityTree_Params_Data::Frame_SnapshotAccessibilityTree_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_SnapshotAccessibilityTree_ResponseParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_SnapshotAccessibilityTree_ResponseParams_Data* object = |
| static_cast<const Frame_SnapshotAccessibilityTree_ResponseParams_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->snapshot, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->snapshot, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Frame_SnapshotAccessibilityTree_ResponseParams_Data::Frame_SnapshotAccessibilityTree_ResponseParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Frame_GetSerializedHtmlWithLocalLinks_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 40, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const Frame_GetSerializedHtmlWithLocalLinks_Params_Data* object = |
| static_cast<const Frame_GetSerializedHtmlWithLocalLinks_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->url_map, 1, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& url_map_validate_params = |
| mojo::internal::GetMapValidator<*&mojo::internal::GetArrayValidator<0, false, nullptr>(), *&mojo::internal::GetArrayValidator<0, false, nullptr>()>(); |
| if (!mojo::internal::ValidateContainer(object->url_map, validation_context, |
| &url_map_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_token_map, 2, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& frame_token_map_validate_params = |
| mojo::internal::GetMapValidator<*&mojo::internal::GetArrayValidator<0, false, nullptr>(), *&mojo::internal::GetArrayValidator<0, false, nullptr>()>(); |
| if (!mojo::internal::ValidateContainer(object->frame_token_map, validation_context, |
| &frame_token_map_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->handler_remote, 4, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->handler_remote, |
| validation_context)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| Frame_GetSerializedHtmlWithLocalLinks_Params_Data::Frame_GetSerializedHtmlWithLocalLinks_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameBindingsControl_AllowBindings_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameBindingsControl_AllowBindings_Params_Data* object = |
| static_cast<const FrameBindingsControl_AllowBindings_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| FrameBindingsControl_AllowBindings_Params_Data::FrameBindingsControl_AllowBindings_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameBindingsControl_EnableMojoJsBindings_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameBindingsControl_EnableMojoJsBindings_Params_Data* object = |
| static_cast<const FrameBindingsControl_EnableMojoJsBindings_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidateStruct(object->features, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameBindingsControl_EnableMojoJsBindings_Params_Data::FrameBindingsControl_EnableMojoJsBindings_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameBindingsControl_EnableMojoJsBindingsWithBroker_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameBindingsControl_EnableMojoJsBindingsWithBroker_Params_Data* object = |
| static_cast<const FrameBindingsControl_EnableMojoJsBindingsWithBroker_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->broker, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->broker, |
| validation_context)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| FrameBindingsControl_EnableMojoJsBindingsWithBroker_Params_Data::FrameBindingsControl_EnableMojoJsBindingsWithBroker_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameBindingsControl_BindWebUI_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 24, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameBindingsControl_BindWebUI_Params_Data* object = |
| static_cast<const FrameBindingsControl_BindWebUI_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->receiver, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->receiver, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->remote, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->remote, |
| validation_context)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| FrameBindingsControl_BindWebUI_Params_Data::FrameBindingsControl_BindWebUI_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool NavigationRendererCancellationListener_RendererCancellationWindowEnded_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 8, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const NavigationRendererCancellationListener_RendererCancellationWindowEnded_Params_Data* object = |
| static_cast<const NavigationRendererCancellationListener_RendererCancellationWindowEnded_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| NavigationRendererCancellationListener_RendererCancellationWindowEnded_Params_Data::NavigationRendererCancellationListener_RendererCancellationWindowEnded_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_CreateNewWindow_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_CreateNewWindow_Params_Data* object = |
| static_cast<const FrameHost_CreateNewWindow_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->params, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_CreateNewWindow_Params_Data::FrameHost_CreateNewWindow_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_CreateNewWindow_ResponseParams_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 24, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_CreateNewWindow_ResponseParams_Data* object = |
| static_cast<const FrameHost_CreateNewWindow_ResponseParams_Data*>(data); |
| |
| |
| if (!::content::mojom::internal::CreateNewWindowStatus_Data |
| ::Validate(object->status, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->reply, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_CreateNewWindow_ResponseParams_Data::FrameHost_CreateNewWindow_ResponseParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_CreateChildFrame_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 96, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_CreateChildFrame_Params_Data* object = |
| static_cast<const FrameHost_CreateChildFrame_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->child_frame_token, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->child_frame_token, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->frame, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->frame, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->browser_interface_broker, 3, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->browser_interface_broker, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->policy_container_bind_params, 4, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->policy_container_bind_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->associated_interface_provider, 5, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->associated_interface_provider, |
| validation_context)) { |
| return false; |
| } |
| |
| |
| if (!::blink::mojom::internal::TreeScopeType_Data |
| ::Validate(object->scope, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_name, 7, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& frame_name_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->frame_name, validation_context, |
| &frame_name_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_unique_name, 8, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& frame_unique_name_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->frame_unique_name, validation_context, |
| &frame_unique_name_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_policy, 10, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->frame_policy, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->frame_owner_properties, 11, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->frame_owner_properties, validation_context)) |
| return false; |
| |
| |
| if (!::content::mojom::internal::ChildFrameOwnerElementType_Data |
| ::Validate(object->child_frame_owner_element_type, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_CreateChildFrame_Params_Data::FrameHost_CreateChildFrame_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_DidCommitProvisionalLoad_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 24, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_DidCommitProvisionalLoad_Params_Data* object = |
| static_cast<const FrameHost_DidCommitProvisionalLoad_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->interface_params, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_DidCommitProvisionalLoad_Params_Data::FrameHost_DidCommitProvisionalLoad_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_DidCommitSameDocumentNavigation_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 24, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_DidCommitSameDocumentNavigation_Params_Data* object = |
| static_cast<const FrameHost_DidCommitSameDocumentNavigation_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->same_document_params, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->same_document_params, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_DidCommitSameDocumentNavigation_Params_Data::FrameHost_DidCommitSameDocumentNavigation_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_DidOpenDocumentInputStream_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_DidOpenDocumentInputStream_Params_Data* object = |
| static_cast<const FrameHost_DidOpenDocumentInputStream_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->url, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->url, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_DidOpenDocumentInputStream_Params_Data::FrameHost_DidOpenDocumentInputStream_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_BeginNavigation_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 56, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_BeginNavigation_Params_Data* object = |
| static_cast<const FrameHost_BeginNavigation_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->common_params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->common_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->begin_params, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->begin_params, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateHandleOrInterface(object->blob_url_token, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterface(object->navigation_client, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterface(object->initiator_navigation_state_keep_alive_handle, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->renderer_cancellation_listener, 6, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->renderer_cancellation_listener, |
| validation_context)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| FrameHost_BeginNavigation_Params_Data::FrameHost_BeginNavigation_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_SubresourceResponseStarted_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 24, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_SubresourceResponseStarted_Params_Data* object = |
| static_cast<const FrameHost_SubresourceResponseStarted_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->final_response_url, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->final_response_url, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_SubresourceResponseStarted_Params_Data::FrameHost_SubresourceResponseStarted_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_ResourceLoadComplete_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_ResourceLoadComplete_Params_Data* object = |
| static_cast<const FrameHost_ResourceLoadComplete_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->url_load_info, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->url_load_info, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_ResourceLoadComplete_Params_Data::FrameHost_ResourceLoadComplete_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_DidChangeName_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 24, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_DidChangeName_Params_Data* object = |
| static_cast<const FrameHost_DidChangeName_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->name, 1, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& name_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->name, validation_context, |
| &name_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->unique_name, 2, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& unique_name_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->unique_name, validation_context, |
| &unique_name_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| FrameHost_DidChangeName_Params_Data::FrameHost_DidChangeName_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_CancelInitialHistoryLoad_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 8, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_CancelInitialHistoryLoad_Params_Data* object = |
| static_cast<const FrameHost_CancelInitialHistoryLoad_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| FrameHost_CancelInitialHistoryLoad_Params_Data::FrameHost_CancelInitialHistoryLoad_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_UpdateEncoding_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_UpdateEncoding_Params_Data* object = |
| static_cast<const FrameHost_UpdateEncoding_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->encoding_name, 1, validation_context)) { |
| return false; |
| } |
| constexpr const mojo::internal::ContainerValidateParams& encoding_name_validate_params = |
| mojo::internal::GetArrayValidator<0, false, nullptr>(); |
| if (!mojo::internal::ValidateContainer(object->encoding_name, validation_context, |
| &encoding_name_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| FrameHost_UpdateEncoding_Params_Data::FrameHost_UpdateEncoding_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_UpdateUserGestureCarryoverInfo_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 8, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_UpdateUserGestureCarryoverInfo_Params_Data* object = |
| static_cast<const FrameHost_UpdateUserGestureCarryoverInfo_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| FrameHost_UpdateUserGestureCarryoverInfo_Params_Data::FrameHost_UpdateUserGestureCarryoverInfo_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_UpdateState_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_UpdateState_Params_Data* object = |
| static_cast<const FrameHost_UpdateState_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->state, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->state, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_UpdateState_Params_Data::FrameHost_UpdateState_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_OpenURL_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 16, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_OpenURL_Params_Data* object = |
| static_cast<const FrameHost_OpenURL_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->params, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->params, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| FrameHost_OpenURL_Params_Data::FrameHost_OpenURL_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool FrameHost_DidStopLoading_Params_Data::Validate( |
| const void* data, |
| mojo::internal::ValidationContext* validation_context) { |
| if (!data) |
| return true; |
| if (!ValidateUnversionedStructHeaderAndSizeAndClaimMemory( |
| data, 8, validation_context)) { |
| return false; |
| } |
| |
| // NOTE: The memory backing |object| may be smaller than |sizeof(*object)| if |
| // the message comes from an older version. |
| [[maybe_unused]] const FrameHost_DidStopLoading_Params_Data* object = |
| static_cast<const FrameHost_DidStopLoading_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| FrameHost_DidStopLoading_Params_Data::FrameHost_DidStopLoading_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| } // namespace internal |
| } // namespace mojom |
| } // namespace content |
| |
| namespace perfetto { |
| |
| // static |
| void TraceFormatTraits<::content::mojom::ViewWidgetType>::WriteIntoTrace( |
| perfetto::TracedValue context, ::content::mojom::ViewWidgetType value) { |
| return std::move(context).WriteString(::content::mojom::ViewWidgetTypeToString(value)); |
| } |
| |
| } // namespace perfetto |
| |
| namespace perfetto { |
| |
| // static |
| void TraceFormatTraits<::content::mojom::ChildFrameOwnerElementType>::WriteIntoTrace( |
| perfetto::TracedValue context, ::content::mojom::ChildFrameOwnerElementType value) { |
| return std::move(context).WriteString(::content::mojom::ChildFrameOwnerElementTypeToString(value)); |
| } |
| |
| } // namespace perfetto |
| |
| namespace perfetto { |
| |
| // static |
| void TraceFormatTraits<::content::mojom::FrameDeleteIntention>::WriteIntoTrace( |
| perfetto::TracedValue context, ::content::mojom::FrameDeleteIntention value) { |
| return std::move(context).WriteString(::content::mojom::FrameDeleteIntentionToString(value)); |
| } |
| |
| } // namespace perfetto |
| |
| namespace perfetto { |
| |
| // static |
| void TraceFormatTraits<::content::mojom::CreateNewWindowStatus>::WriteIntoTrace( |
| perfetto::TracedValue context, ::content::mojom::CreateNewWindowStatus value) { |
| return std::move(context).WriteString(::content::mojom::CreateNewWindowStatusToString(value)); |
| } |
| |
| } // namespace perfetto |