2012-04-03 03:34:16 +02:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that can
|
|
|
|
// be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_BROWSER_ORIGIN_WHITELIST_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_BROWSER_ORIGIN_WHITELIST_IMPL_H_
|
|
|
|
|
2024-03-19 22:11:42 +01:00
|
|
|
#include <optional>
|
2012-11-20 21:08:36 +01:00
|
|
|
#include <vector>
|
|
|
|
|
2021-05-14 18:58:55 +02:00
|
|
|
#include "cef/libcef/common/mojom/cef.mojom-forward.h"
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
namespace content {
|
|
|
|
class RenderProcessHost;
|
|
|
|
}
|
|
|
|
|
2020-08-14 21:28:23 +02:00
|
|
|
namespace url {
|
|
|
|
class Origin;
|
|
|
|
}
|
2013-04-18 19:58:23 +02:00
|
|
|
|
2021-05-14 18:58:55 +02:00
|
|
|
using CrossOriginWhiteList =
|
|
|
|
std::vector<cef::mojom::CrossOriginWhiteListEntryPtr>;
|
2012-11-20 21:08:36 +01:00
|
|
|
|
|
|
|
// Called to retrieve the current list of cross-origin white list entries. This
|
|
|
|
// method is thread safe.
|
|
|
|
void GetCrossOriginWhitelistEntries(
|
2024-03-19 22:11:42 +01:00
|
|
|
std::optional<CrossOriginWhiteList>* entries);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
2013-04-18 19:58:23 +02:00
|
|
|
// Returns true if |source| can access |target| based on the cross-origin white
|
|
|
|
// list settings.
|
2020-08-14 21:28:23 +02:00
|
|
|
bool HasCrossOriginWhitelistEntry(const url::Origin& source,
|
|
|
|
const url::Origin& target);
|
2013-04-18 19:58:23 +02:00
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
#endif // CEF_LIBCEF_BROWSER_ORIGIN_WHITELIST_IMPL_H_
|