#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_PAGE_STATE_PAGE_STATE_SERIALIZATION_H_
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_PAGE_STATE_PAGE_STATE_SERIALIZATION_H_
#include <stdint.h>
#include <optional>
#include <string>
#include <vector>
#include "build/build_config.h"
#include "services/network/public/cpp/resource_request_body.h"
#include "services/network/public/mojom/referrer_policy.mojom.h"
#include "third_party/blink/public/mojom/page_state/page_state.mojom.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/point_f.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace blink {
constexpr int kMaxScrollAnchorSelectorLength = …;
struct BLINK_COMMON_EXPORT ExplodedHttpBody { … };
struct BLINK_COMMON_EXPORT ExplodedFrameState { … };
struct BLINK_COMMON_EXPORT ExplodedPageState { … };
BLINK_COMMON_EXPORT bool DecodePageState(const std::string& encoded,
ExplodedPageState* exploded);
BLINK_COMMON_EXPORT int DecodePageStateForTesting(const std::string& encoded,
ExplodedPageState* exploded);
BLINK_COMMON_EXPORT void EncodePageState(const ExplodedPageState& exploded,
std::string* encoded);
BLINK_COMMON_EXPORT void LegacyEncodePageStateForTesting(
const ExplodedPageState& exploded,
int version,
std::string* encoded);
#if BUILDFLAG(IS_ANDROID)
BLINK_COMMON_EXPORT bool DecodePageStateWithDeviceScaleFactorForTesting(
const std::string& encoded,
float device_scale_factor,
ExplodedPageState* exploded);
BLINK_COMMON_EXPORT scoped_refptr<network::ResourceRequestBody>
DecodeResourceRequestBody(const char* data, size_t size);
BLINK_COMMON_EXPORT std::string EncodeResourceRequestBody(
const network::ResourceRequestBody& resource_request_body);
#endif
}
#endif