# Copyright (C) 2024 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1.  Redistributions of source code must retain the above copyright
#     notice, this list of conditions and the following disclaimer.
# 2.  Redistributions in binary form must reproduce the above copyright
#     notice, this list of conditions and the following disclaimer in the
#     documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


# This file contains a list of data generated by a Page in one WebContent process
# that needs to be synchronized to other WebContent processes.
#
# It is processed by `generate-process-sync-data.py`
#
# The format is:
#     <Data name> : <Data type>
#
# Example:
# `MainFrameURLChange : WTF::URL`
#
# That declaration results in:
# - A new `MainFrameURLChange` type being added to the generated `ProcessSyncDataType` enum class
# - The inclusion of `WTF::URL` in the `ProcessSyncDataVariant` variant
# - `void broadcastMainFrameURLChangeToOtherProcesses(const WTF::URL&);` being added to ProcessSyncClient
# - Updates to the `ProcessSyncData` struct and its serialization.in file so CoreIPC messaging works
#
# To send a "main frame url change" message to all other processes from manually written code:
# `page->processSyncClient().broadcastMainFrameURLChange(someURL);`
#
# The message sending to the UI process and re-routing of the broadcast to relevant WebContent processes
# is automatic; no additional code needs to be written for simple broadcasts.
#
# To handle a "main frame url change" update in the processes targetted by the broadcast, update:
# `void Page::updateProcessSyncData(const ProcessSyncData& data)`
# by handling the new enum mentioned above.
#
# (Since it defaults to unhandled, the build will fail pointing you exactly where to go)
#
# Each entry can have a number of options in a [bracket enclosed, space delimited list]
# These options currently include:
#   - A compile time condition for inclusion of the data type
#   - A header required to declare/define the type
#   - Opting in to automatic inclusion in the "DocumentSyncData" struct

AudioSessionType : WebCore::DOMAudioSessionType [DocumentSyncData Conditional=ENABLE(DOM_AUDIO_SESSION) Header="DOMAudioSession.h"]
IsAutofocusProcessed : bool [DocumentSyncData]
UserDidInteractWithPage : bool [DocumentSyncData]
DocumentURL : URL [DocumentSyncData Header=<wtf/URL.h>]
DocumentSecurityOrigin : RefPtr<WebCore::SecurityOrigin> [DocumentSyncData Header="SecurityOrigin.h"]
DocumentClasses : OptionSet<WebCore::DocumentClass> [DocumentSyncData Header="DocumentClasses.h"]
HasInjectedUserScript : bool [DocumentSyncData]
