Make CefBrowserContext an abstract base class (see issue #2969)

Existing CefBrowserContext functionality is now split between
CefBrowserContext and AlloyBrowserContext. Runtime implementations of
CefBrowserContext will provide access to the content::BrowserContext and
Profile types via different inheritance paths. For example, the Alloy
runtime uses ChromeProfileAlloy and the Chrome runtime uses ProfileImpl.

This change also renames CefResourceContext to CefIOThreadState to more
accurately represent its purpose as it no longer needs to extend
content::ResourceContext.
This commit is contained in:
Marshall Greenblatt
2020-06-30 20:57:00 -04:00
parent 619f18fea0
commit 48fc0bd220
40 changed files with 1006 additions and 831 deletions

View File

@ -6,8 +6,8 @@
#include <string>
#include "libcef/browser/iothread_state.h"
#include "libcef/browser/net/internal_scheme_handler.h"
#include "libcef/browser/resource_context.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
@ -40,8 +40,8 @@ class Delegate : public InternalHandlerDelegate {
} // namespace
void RegisterChromeDevToolsHandler(CefResourceContext* resource_context) {
resource_context->RegisterSchemeHandlerFactory(
void RegisterChromeDevToolsHandler(CefIOThreadState* iothread_state) {
iothread_state->RegisterSchemeHandlerFactory(
content::kChromeDevToolsScheme, kChromeDevToolsHost,
CreateInternalHandlerFactory(base::WrapUnique(new Delegate())));
}