cef/libcef/browser/net/scheme_handler.cc
Marshall Greenblatt 48fc0bd220 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.
2020-07-01 15:35:07 -04:00

31 lines
915 B
C++

// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include "libcef/browser/net/scheme_handler.h"
#include <string>
#include "libcef/browser/net/chrome_scheme_handler.h"
#include "libcef/browser/net/devtools_scheme_handler.h"
#include "libcef/common/net/scheme_registration.h"
#include "libcef/features/runtime.h"
#include "content/public/common/url_constants.h"
namespace scheme {
void RegisterInternalHandlers(CefIOThreadState* iothread_state) {
if (!cef::IsAlloyRuntimeEnabled())
return;
scheme::RegisterChromeDevToolsHandler(iothread_state);
}
void DidFinishLoad(CefRefPtr<CefFrame> frame, const GURL& validated_url) {
if (validated_url.scheme() == content::kChromeUIScheme)
scheme::DidFinishChromeLoad(frame, validated_url);
}
} // namespace scheme