#ifndef CEF_LIBCEF_COMMON_STRING_UTIL_H_
#define CEF_LIBCEF_COMMON_STRING_UTIL_H_
#pragma once
#include "include/cef_base.h"
#include "base/callback.h"
#include "base/memory/scoped_refptr.h"
namespace base {
class ReadOnlySharedMemoryRegion;
class RefCountedMemory;
}
namespace blink {
class WebString;
}
namespace string_util {
void GetCefString(const blink::WebString& source, CefString& cef_string);
void GetCefString(scoped_refptr<base::RefCountedMemory> source,
CefString& cef_string);
base::ReadOnlySharedMemoryRegion CreateSharedMemoryRegion(
const blink::WebString& source);
using ScopedCefStringCallback = base::OnceCallback<void(const CefString&)>;
void ExecuteWithScopedCefString(base::ReadOnlySharedMemoryRegion region,
ScopedCefStringCallback callback);
}
#endif