| // chrome/browser/ui/webui/tab_search/tab_search.mojom-shared.cc is auto generated by mojom_bindings_generator.py, do not edit |
| |
| // Copyright 2016 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include "chrome/browser/ui/webui/tab_search/tab_search.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 "chrome/browser/ui/webui/tab_search/tab_search.mojom-params-data.h" |
| namespace tab_search { |
| namespace mojom { |
| |
| namespace internal { |
| |
| |
| // static |
| bool ProfileData_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 ProfileData_Data* object = |
| static_cast<const ProfileData_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->windows, 1, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams windows_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->windows, validation_context, |
| &windows_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->tab_groups, 2, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams tab_groups_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->tab_groups, validation_context, |
| &tab_groups_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->recently_closed_tabs, 3, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams recently_closed_tabs_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->recently_closed_tabs, validation_context, |
| &recently_closed_tabs_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->recently_closed_tab_groups, 4, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams recently_closed_tab_groups_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->recently_closed_tab_groups, validation_context, |
| &recently_closed_tab_groups_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| ProfileData_Data::ProfileData_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Window_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 Window_Data* object = |
| static_cast<const Window_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->tabs, 3, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams tabs_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->tabs, validation_context, |
| &tabs_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| Window_Data::Window_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Tab_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 Tab_Data* object = |
| static_cast<const Tab_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->alert_states, 2, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams alert_states_validate_params( |
| 0, ::tabs::mojom::internal::TabAlertState_Data::Validate); |
| if (!mojo::internal::ValidateContainer(object->alert_states, validation_context, |
| &alert_states_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateStruct(object->group_id, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->title, 7, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams title_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->title, validation_context, |
| &title_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->url, 8, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->url, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidateStruct(object->favicon_url, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->last_active_time_ticks, 12, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->last_active_time_ticks, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->last_active_elapsed_text, 13, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams last_active_elapsed_text_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->last_active_elapsed_text, validation_context, |
| &last_active_elapsed_text_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| Tab_Data::Tab_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool RecentlyClosedTab_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 RecentlyClosedTab_Data* object = |
| static_cast<const RecentlyClosedTab_Data*>(data); |
| |
| if (!mojo::internal::ValidateStruct(object->group_id, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->title, 3, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams title_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->title, validation_context, |
| &title_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->url, 4, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->url, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->last_active_time, 5, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->last_active_time, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->last_active_elapsed_text, 6, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams last_active_elapsed_text_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->last_active_elapsed_text, validation_context, |
| &last_active_elapsed_text_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| RecentlyClosedTab_Data::RecentlyClosedTab_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool TabGroup_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 TabGroup_Data* object = |
| static_cast<const TabGroup_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->id, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->id, validation_context)) |
| return false; |
| |
| |
| if (!::tab_groups::mojom::internal::Color_Data |
| ::Validate(object->color, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->title, 3, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams title_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->title, validation_context, |
| &title_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| TabGroup_Data::TabGroup_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool RecentlyClosedTabGroup_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 RecentlyClosedTabGroup_Data* object = |
| static_cast<const RecentlyClosedTabGroup_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->id, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->id, validation_context)) |
| return false; |
| |
| |
| if (!::tab_groups::mojom::internal::Color_Data |
| ::Validate(object->color, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->title, 4, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams title_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->title, validation_context, |
| &title_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->last_active_time, 6, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->last_active_time, validation_context)) |
| return false; |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->last_active_elapsed_text, 7, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams last_active_elapsed_text_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->last_active_elapsed_text, validation_context, |
| &last_active_elapsed_text_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| RecentlyClosedTabGroup_Data::RecentlyClosedTabGroup_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool SwitchToTabInfo_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 SwitchToTabInfo_Data* object = |
| static_cast<const SwitchToTabInfo_Data*>(data); |
| |
| return true; |
| } |
| |
| SwitchToTabInfo_Data::SwitchToTabInfo_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool TabUpdateInfo_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 TabUpdateInfo_Data* object = |
| static_cast<const TabUpdateInfo_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->tab, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->tab, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| TabUpdateInfo_Data::TabUpdateInfo_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool TabsRemovedInfo_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 TabsRemovedInfo_Data* object = |
| static_cast<const TabsRemovedInfo_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->tab_ids, 1, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams tab_ids_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->tab_ids, validation_context, |
| &tab_ids_validate_params)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->recently_closed_tabs, 2, validation_context)) { |
| return false; |
| } |
| const mojo::internal::ContainerValidateParams recently_closed_tabs_validate_params( |
| 0, false, nullptr); |
| if (!mojo::internal::ValidateContainer(object->recently_closed_tabs, validation_context, |
| &recently_closed_tabs_validate_params)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| TabsRemovedInfo_Data::TabsRemovedInfo_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool PageHandlerFactory_CreatePageHandler_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 PageHandlerFactory_CreatePageHandler_Params_Data* object = |
| static_cast<const PageHandlerFactory_CreatePageHandler_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->page, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->page, |
| validation_context)) { |
| return false; |
| } |
| |
| if (!mojo::internal::ValidateHandleOrInterfaceNonNullable( |
| object->handler, 2, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateHandleOrInterface(object->handler, |
| validation_context)) { |
| return false; |
| } |
| |
| return true; |
| } |
| |
| PageHandlerFactory_CreatePageHandler_Params_Data::PageHandlerFactory_CreatePageHandler_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool PageHandler_CloseTab_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 PageHandler_CloseTab_Params_Data* object = |
| static_cast<const PageHandler_CloseTab_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| PageHandler_CloseTab_Params_Data::PageHandler_CloseTab_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool PageHandler_GetProfileData_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 PageHandler_GetProfileData_Params_Data* object = |
| static_cast<const PageHandler_GetProfileData_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| PageHandler_GetProfileData_Params_Data::PageHandler_GetProfileData_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool PageHandler_GetProfileData_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 PageHandler_GetProfileData_ResponseParams_Data* object = |
| static_cast<const PageHandler_GetProfileData_ResponseParams_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->profile_data, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->profile_data, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| PageHandler_GetProfileData_ResponseParams_Data::PageHandler_GetProfileData_ResponseParams_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool PageHandler_SwitchToTab_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 PageHandler_SwitchToTab_Params_Data* object = |
| static_cast<const PageHandler_SwitchToTab_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->switch_to_tab_info, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->switch_to_tab_info, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| PageHandler_SwitchToTab_Params_Data::PageHandler_SwitchToTab_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool PageHandler_OpenRecentlyClosedEntry_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 PageHandler_OpenRecentlyClosedEntry_Params_Data* object = |
| static_cast<const PageHandler_OpenRecentlyClosedEntry_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| PageHandler_OpenRecentlyClosedEntry_Params_Data::PageHandler_OpenRecentlyClosedEntry_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool PageHandler_SaveRecentlyClosedExpandedPref_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 PageHandler_SaveRecentlyClosedExpandedPref_Params_Data* object = |
| static_cast<const PageHandler_SaveRecentlyClosedExpandedPref_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| PageHandler_SaveRecentlyClosedExpandedPref_Params_Data::PageHandler_SaveRecentlyClosedExpandedPref_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool PageHandler_ShowUI_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 PageHandler_ShowUI_Params_Data* object = |
| static_cast<const PageHandler_ShowUI_Params_Data*>(data); |
| |
| return true; |
| } |
| |
| PageHandler_ShowUI_Params_Data::PageHandler_ShowUI_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Page_TabsChanged_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 Page_TabsChanged_Params_Data* object = |
| static_cast<const Page_TabsChanged_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->profile_tabs, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->profile_tabs, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Page_TabsChanged_Params_Data::Page_TabsChanged_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Page_TabUpdated_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 Page_TabUpdated_Params_Data* object = |
| static_cast<const Page_TabUpdated_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->tabUpdateInfo, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->tabUpdateInfo, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Page_TabUpdated_Params_Data::Page_TabUpdated_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| |
| // static |
| bool Page_TabsRemoved_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 Page_TabsRemoved_Params_Data* object = |
| static_cast<const Page_TabsRemoved_Params_Data*>(data); |
| |
| if (!mojo::internal::ValidatePointerNonNullable( |
| object->tabsRemovedInfo, 1, validation_context)) { |
| return false; |
| } |
| if (!mojo::internal::ValidateStruct(object->tabsRemovedInfo, validation_context)) |
| return false; |
| |
| return true; |
| } |
| |
| Page_TabsRemoved_Params_Data::Page_TabsRemoved_Params_Data() |
| : header_({sizeof(*this), 0}) {} |
| |
| } // namespace internal |
| } // namespace mojom |
| } // namespace tab_search |