blob: 9e6f23327bdf25906f03bbb35b554ee755c2ae0d [file] [log] [blame]
// Copyright 2018 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 "services/network/public/mojom/referrer_policy.mojom-shared.h"
#include "third_party/blink/renderer/platform/cross_thread_copier.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/heap.h"
#include "third_party/blink/renderer/platform/loader/fetch/https_state.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
namespace blink {
// This is a partial interface of the "settings object" concept defined in the
// HTML spec:
// This is also a partial interface of the "fetch client settings object" used
// in module script fetch. Other part of the "fetch client settings object" is
// currently implemented by ResourceFetcher and FetchContext, and this class is
// used together with them.
class PLATFORM_EXPORT FetchClientSettingsObject
: public GarbageCollectedFinalized<FetchClientSettingsObject> {
virtual ~FetchClientSettingsObject() = default;
// "A URL used by APIs called by scripts that use this environment settings
// object to parse URLs."
virtual const KURL& BaseURL() const = 0;
// "An origin used in security checks."
virtual const SecurityOrigin* GetSecurityOrigin() const = 0;
// "The default referrer policy for fetches performed using this environment
// settings object as a request client."
virtual network::mojom::ReferrerPolicy GetReferrerPolicy() const = 0;
// "referrerURL" used in the "Determine request's Referrer" algorithm:
virtual const String GetOutgoingReferrer() const = 0;
virtual HttpsState GetHttpsState() const = 0;
virtual void Trace(Visitor*) {}
} // namespace blink