• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
2 // reserved. Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4 
5 #ifndef CEF_LIBCEF_BROWSER_ORIGIN_WHITELIST_IMPL_H_
6 #define CEF_LIBCEF_BROWSER_ORIGIN_WHITELIST_IMPL_H_
7 
8 #include <vector>
9 
10 #include "third_party/abseil-cpp/absl/types/optional.h"
11 
12 #include "cef/libcef/common/mojom/cef.mojom-forward.h"
13 
14 namespace content {
15 class RenderProcessHost;
16 }
17 
18 namespace url {
19 class Origin;
20 }
21 
22 using CrossOriginWhiteList =
23     std::vector<cef::mojom::CrossOriginWhiteListEntryPtr>;
24 
25 // Called to retrieve the current list of cross-origin white list entries. This
26 // method is thread safe.
27 void GetCrossOriginWhitelistEntries(
28     absl::optional<CrossOriginWhiteList>* entries);
29 
30 // Returns true if |source| can access |target| based on the cross-origin white
31 // list settings.
32 bool HasCrossOriginWhitelistEntry(const url::Origin& source,
33                                   const url::Origin& target);
34 
35 #endif  // CEF_LIBCEF_BROWSER_ORIGIN_WHITELIST_IMPL_H_
36