#include "include/cef_scheme.h"
#include "libcef/browser/context.h"
#include "base/logging.h"
bool CefRegisterSchemeHandlerFactory(
const CefString& scheme_name,
const CefString& domain_name,
CefRefPtr<CefSchemeHandlerFactory> factory) {
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
return false;
}
return CefRequestContext::GetGlobalContext()->RegisterSchemeHandlerFactory(
scheme_name, domain_name, factory);
}
bool CefClearSchemeHandlerFactories() {
if (!CONTEXT_STATE_VALID()) {
NOTREACHED() << "context not valid";
return false;
}
return CefRequestContext::GetGlobalContext()->ClearSchemeHandlerFactories();
}