cef/libcef/browser/origin_whitelist_impl.h
Marshall Greenblatt ebee84755e Convert legacy IPC messages to Mojo (fixes issue #3123)
This change introduces a few minor CEF API behavior changes:

- A CefProcessMessage object cannot be reused after being passed to
  SendProcessMessage.
- The |extra_info| argument to CefRenderProcessHandler::OnBrowserCreated may
  now be NULL.

Where appropriate, we now utilize the default UTF string encoding format and
shared memory to reduce copies and conversions for the cross-process
transfer of arbitrary-length strings. For example, CefFrame::GetSource/GetText
now involves zero UTF conversions and zero copies in the browser process for
the CefString delivered to CefStringVisitor::Visit().
2021-05-18 21:59:48 -04:00

36 lines
1.0 KiB
C++

// 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_
#include <vector>
#include "base/optional.h"
#include "cef/libcef/common/mojom/cef.mojom-forward.h"
namespace content {
class RenderProcessHost;
}
namespace url {
class Origin;
}
using CrossOriginWhiteList =
std::vector<cef::mojom::CrossOriginWhiteListEntryPtr>;
// Called to retrieve the current list of cross-origin white list entries. This
// method is thread safe.
void GetCrossOriginWhitelistEntries(
base::Optional<CrossOriginWhiteList>* entries);
// Returns true if |source| can access |target| based on the cross-origin white
// list settings.
bool HasCrossOriginWhitelistEntry(const url::Origin& source,
const url::Origin& target);
#endif // CEF_LIBCEF_BROWSER_ORIGIN_WHITELIST_IMPL_H_