chromium/services/network/public/mojom/isolation_info.mojom

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module network.mojom;

import "mojo/public/mojom/base/unguessable_token.mojom";
import "services/network/public/mojom/site_for_cookies.mojom";
import "services/network/public/mojom/schemeful_site.mojom";
import "url/mojom/origin.mojom";

// Mapped to net::IsolationInfo::RequestType, which is what consumers should
// be using instead of using this directly.
enum IsolationInfoRequestType {
  kMainFrame,
  kSubFrame,
  kOther,
};

// Mapped to net::IsolationInfo.
struct IsolationInfo {
  // These fields should not be used directly, but rather through the mapped
  // net::IsolationInfo.
  IsolationInfoRequestType request_type;
  url.mojom.Origin? top_frame_origin;
  url.mojom.Origin? frame_origin;
  mojo_base.mojom.UnguessableToken? nonce;
  SiteForCookies site_for_cookies;
};