Add CefAppManager and remove global ContentClient accessors (see issue #2969)

This is the first pass in removing direct dependencies on the Alloy
runtime from code that can potentially be shared between runtimes.

CefBrowserHost and CefRequestContext APIs (including CefCookieManager,
CefURLRequest, etc.) are not yet implemented for the Chrome runtime.
Assert early if these API methods are called while the Chrome runtime
is enabled.
This commit is contained in:
Marshall Greenblatt
2020-06-28 17:05:36 -04:00
parent 84f3ff2afd
commit b3a8da9b25
45 changed files with 522 additions and 312 deletions

View File

@ -6,16 +6,18 @@
#include <stdint.h>
#include "libcef/common/app_manager.h"
#include "libcef/common/request_impl.h"
#include "libcef/common/response_impl.h"
#include "libcef/common/task_runner_impl.h"
#include "libcef/renderer/alloy/alloy_content_renderer_client.h"
#include "libcef/renderer/blink_glue.h"
#include "libcef/renderer/frame_impl.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
#include "net/base/request_priority.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
#include "third_party/blink/public/mojom/loader/resource_load_info.mojom.h"
#include "third_party/blink/public/platform/web_security_origin.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/platform/web_url.h"
@ -155,7 +157,7 @@ class CefRenderURLRequest::Context
}
if (!factory) {
// This factory only supports unintercepted http(s) and blob requests.
factory = AlloyContentRendererClient::Get()->GetDefaultURLLoaderFactory();
factory = CefAppManager::Get()->GetDefaultURLLoaderFactory();
}
loader_ = factory->CreateURLLoader(