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

@ -9,11 +9,11 @@
#include <iomanip>
#include <utility>
#include "libcef/browser/alloy/alloy_content_browser_client.h"
#include "libcef/browser/browser_context.h"
#include "libcef/browser/devtools/devtools_manager_delegate.h"
#include "libcef/browser/net/devtools_scheme_handler.h"
#include "libcef/common/cef_switches.h"
#include "libcef/common/task_runner_manager.h"
#include "base/base64.h"
#include "base/command_line.h"
@ -606,7 +606,7 @@ void CefDevToolsFrontend::LogProtocolMessage(ProtocolMessageType type,
std::string to_log = message.substr(0, kMaxLogLineLength).as_string();
// Execute in an ordered context that allows blocking.
auto task_runner = AlloyContentBrowserClient::Get()->background_task_runner();
auto task_runner = CefTaskRunnerManager::Get()->GetBackgroundTaskRunner();
task_runner->PostTask(
FROM_HERE, base::BindOnce(::LogProtocolMessage, protocol_log_file_, type,
std::move(to_log)));