mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 72.0.3626.0 (#612437)
- Windows: Can now build with either 10.0.17134 or 10.0.17763 SDK.
This commit is contained in:
@ -472,7 +472,6 @@ net::URLRequestContextGetter* CefBrowserContextImpl::CreateRequestContext(
|
||||
url_request_getter_ = new CefURLRequestContextGetterImpl(
|
||||
settings_, GetPrefs(), io_thread_runner, protocol_handlers,
|
||||
std::move(proxy_config_service), std::move(request_interceptors));
|
||||
resource_context()->set_url_request_context_getter(url_request_getter_.get());
|
||||
return url_request_getter_.get();
|
||||
}
|
||||
|
||||
|
@ -233,8 +233,6 @@ CefBrowserContextProxy::GetOrCreateStoragePartitionProxy(
|
||||
scoped_refptr<CefURLRequestContextGetterProxy> url_request_getter =
|
||||
new CefURLRequestContextGetterProxy(handler_,
|
||||
parent_->request_context_getter());
|
||||
resource_context()->set_url_request_context_getter(
|
||||
url_request_getter.get());
|
||||
storage_partition_proxy_.reset(
|
||||
new CefStoragePartitionProxy(partition_impl, url_request_getter.get()));
|
||||
|
||||
|
@ -73,10 +73,10 @@ PrefService* ChromeProfileStub::GetOffTheRecordPrefs() {
|
||||
base::OnceCallback<net::CookieStore*()>
|
||||
ChromeProfileStub::GetExtensionsCookieStoreGetter() {
|
||||
return base::BindOnce(
|
||||
[](content::ResourceContext* context) {
|
||||
return context->GetRequestContext()->cookie_store();
|
||||
[](scoped_refptr<net::URLRequestContextGetter> context) {
|
||||
return context->GetURLRequestContext()->cookie_store();
|
||||
},
|
||||
GetResourceContext());
|
||||
base::WrapRefCounted(GetRequestContext()));
|
||||
}
|
||||
|
||||
bool ChromeProfileStub::IsSameProfile(Profile* profile) {
|
||||
|
@ -734,7 +734,8 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
// Propagate the following switches to the zygote command line (along with
|
||||
// any associated values) if present in the browser command line.
|
||||
static const char* const kSwitchNames[] = {
|
||||
switches::kPpapiFlashPath, switches::kPpapiFlashVersion,
|
||||
switches::kPpapiFlashPath,
|
||||
switches::kPpapiFlashVersion,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
arraysize(kSwitchNames));
|
||||
@ -1095,9 +1096,11 @@ void CefContentBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
|
||||
bool CefContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* frame,
|
||||
int render_process_id,
|
||||
bool is_navigation,
|
||||
const url::Origin& request_initiator,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
|
||||
bool* bypass_redirect_checks) {
|
||||
if (!extensions::ExtensionsEnabled())
|
||||
return false;
|
||||
@ -1106,7 +1109,8 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
extensions::BrowserContextKeyedAPIFactory<extensions::WebRequestAPI>::Get(
|
||||
browser_context);
|
||||
bool use_proxy = web_request_api->MaybeProxyURLLoaderFactory(
|
||||
frame, is_navigation, factory_request);
|
||||
browser_context, frame, render_process_id, is_navigation, factory_request,
|
||||
header_client);
|
||||
if (bypass_redirect_checks)
|
||||
*bypass_redirect_checks = use_proxy;
|
||||
return use_proxy;
|
||||
|
@ -143,9 +143,11 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool WillCreateURLLoaderFactory(
|
||||
content::BrowserContext* browser_context,
|
||||
content::RenderFrameHost* frame,
|
||||
int render_process_id,
|
||||
bool is_navigation,
|
||||
const url::Origin& request_initiator,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
|
||||
bool* bypass_redirect_checks) override;
|
||||
|
||||
bool HandleExternalProtocol(
|
||||
|
@ -150,12 +150,12 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient {
|
||||
return view_->GetDeviceScaleFactor();
|
||||
}
|
||||
|
||||
void AllocateNewSurfaceIdOnEviction() override {}
|
||||
|
||||
std::vector<viz::SurfaceId> CollectSurfaceIdsForEviction() override {
|
||||
return view_->render_widget_host()->CollectSurfaceIdsForEviction();
|
||||
}
|
||||
|
||||
void InvalidateLocalSurfaceIdOnEviction() override {}
|
||||
|
||||
private:
|
||||
CefRenderWidgetHostViewOSR* const view_;
|
||||
|
||||
|
@ -66,11 +66,6 @@ void CefResourceContext::RemoveUserData(const void* key) {
|
||||
content::ResourceContext::RemoveUserData(key);
|
||||
}
|
||||
|
||||
net::URLRequestContext* CefResourceContext::GetRequestContext() {
|
||||
CHECK(getter_.get());
|
||||
return getter_->GetURLRequestContext();
|
||||
}
|
||||
|
||||
std::unique_ptr<net::ClientCertStore>
|
||||
CefResourceContext::CreateClientCertStore() {
|
||||
#if defined(USE_NSS_CERTS)
|
||||
@ -96,12 +91,6 @@ void CefResourceContext::set_extensions_info_map(
|
||||
extension_info_map_ = extensions_info_map;
|
||||
}
|
||||
|
||||
void CefResourceContext::set_url_request_context_getter(
|
||||
CefURLRequestContextGetter* getter) {
|
||||
DCHECK(!getter_.get());
|
||||
getter_ = getter;
|
||||
}
|
||||
|
||||
void CefResourceContext::set_parent(CefResourceContext* parent) {
|
||||
DCHECK(!parent_);
|
||||
DCHECK(parent);
|
||||
|
@ -37,13 +37,9 @@ class CefResourceContext : public content::ResourceContext {
|
||||
void SetUserData(const void* key, std::unique_ptr<Data> data) override;
|
||||
void RemoveUserData(const void* key) override;
|
||||
|
||||
// ResourceContext implementation.
|
||||
net::URLRequestContext* GetRequestContext() override;
|
||||
|
||||
std::unique_ptr<net::ClientCertStore> CreateClientCertStore();
|
||||
|
||||
void set_extensions_info_map(extensions::InfoMap* extensions_info_map);
|
||||
void set_url_request_context_getter(CefURLRequestContextGetter* getter);
|
||||
void set_parent(CefResourceContext* parent);
|
||||
|
||||
// Remember the plugin load decision for plugin status requests that arrive
|
||||
@ -71,8 +67,6 @@ class CefResourceContext : public content::ResourceContext {
|
||||
CefRefPtr<CefRequestContextHandler> GetHandler() const { return handler_; }
|
||||
|
||||
private:
|
||||
scoped_refptr<CefURLRequestContextGetter> getter_;
|
||||
|
||||
// Non-NULL when this object is owned by a CefBrowserContextProxy. |parent_|
|
||||
// is guaranteed to outlive this object because CefBrowserContextProxy has a
|
||||
// refptr to the CefBrowserContextImpl that owns |parent_|.
|
||||
|
@ -11,11 +11,6 @@
|
||||
#include "ipc/struct_constructor_macros.h"
|
||||
#include "libcef/common/cef_message_generator.h"
|
||||
|
||||
// Generate destructors.
|
||||
#include "chrome/common/safe_browsing/ipc_protobuf_message_null_macros.h"
|
||||
#include "ipc/struct_destructor_macros.h"
|
||||
#include "libcef/common/cef_message_generator.h"
|
||||
|
||||
// Generate param traits write methods.
|
||||
#include "chrome/common/safe_browsing/protobuf_message_write_macros.h"
|
||||
#include "ipc/param_traits_write_macros.h"
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "content/public/renderer/document_state.h"
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "content/public/renderer/render_view.h"
|
||||
#include "content/renderer/navigation_state.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
@ -625,7 +626,9 @@ void CefBrowserImpl::OnRequest(const Cef_Request_Params& params) {
|
||||
params.arguments.GetString(0, &string);
|
||||
params.arguments.GetString(1, &url);
|
||||
|
||||
web_frame->LoadHTMLString(string, GURL(url));
|
||||
content::RenderFrame::FromWebFrame(web_frame)->LoadHTMLString(
|
||||
string, GURL(url), "UTF-8", GURL(),
|
||||
false /* replace_current_item */);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "libcef/renderer/thread_util.h"
|
||||
#include "libcef/renderer/v8_impl.h"
|
||||
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "third_party/blink/public/platform/web_data.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_url.h"
|
||||
@ -35,6 +36,7 @@
|
||||
#include "third_party/blink/public/web/web_document_loader.h"
|
||||
#include "third_party/blink/public/web/web_frame_content_dumper.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/public/web/web_navigation_control.h"
|
||||
#include "third_party/blink/public/web/web_script_source.h"
|
||||
#include "third_party/blink/public/web/web_view.h"
|
||||
|
||||
@ -152,7 +154,9 @@ void CefFrameImpl::LoadString(const CefString& string, const CefString& url) {
|
||||
|
||||
if (frame_) {
|
||||
GURL gurl = GURL(url.ToString());
|
||||
frame_->LoadHTMLString(string.ToString(), gurl);
|
||||
content::RenderFrame::FromWebFrame(frame_)->LoadHTMLString(
|
||||
string.ToString(), gurl, "UTF-8", GURL(),
|
||||
false /* replace_current_item */);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1330,7 +1330,12 @@ CefRefPtr<CefV8Value> CefV8Value::CreateObject(
|
||||
|
||||
tmpl->SetIndexedPropertyHandler(InterceptorGetterCallbackImpl<uint32_t>,
|
||||
InterceptorSetterCallbackImpl<uint32_t>);
|
||||
obj = tmpl->NewInstance();
|
||||
|
||||
v8::MaybeLocal<v8::Object> maybe_object = tmpl->NewInstance(context);
|
||||
if (!maybe_object.ToLocal<v8::Object>(&obj)) {
|
||||
NOTREACHED() << "Failed to create V8 Object with interceptor";
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
obj = v8::Object::New(isolate);
|
||||
}
|
||||
@ -1435,8 +1440,9 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(
|
||||
v8::FunctionTemplate::New(isolate, FunctionCallbackImpl, function_data);
|
||||
|
||||
// Retrieve the function object and set the name.
|
||||
v8::Local<v8::Function> func = tmpl->GetFunction();
|
||||
if (func.IsEmpty()) {
|
||||
v8::MaybeLocal<v8::Function> maybe_func = tmpl->GetFunction(context);
|
||||
v8::Local<v8::Function> func;
|
||||
if (!maybe_func.ToLocal(&func)) {
|
||||
NOTREACHED() << "failed to create V8 function";
|
||||
return NULL;
|
||||
}
|
||||
|
@ -60,11 +60,6 @@ bool CefContentUtilityClient::OnMessageReceived(const IPC::Message& message) {
|
||||
}
|
||||
|
||||
void CefContentUtilityClient::RegisterServices(StaticServiceMap* services) {
|
||||
service_manager::EmbeddedServiceInfo pdf_compositor_info;
|
||||
pdf_compositor_info.factory =
|
||||
base::Bind(&printing::CreatePdfCompositorService, std::string());
|
||||
services->emplace(printing::mojom::kServiceName, pdf_compositor_info);
|
||||
|
||||
{
|
||||
service_manager::EmbeddedServiceInfo printing_info;
|
||||
printing_info.factory =
|
||||
@ -81,3 +76,14 @@ void CefContentUtilityClient::RegisterServices(StaticServiceMap* services) {
|
||||
services->emplace(proxy_resolver::mojom::kProxyResolverServiceName,
|
||||
proxy_resolver_info);
|
||||
}
|
||||
|
||||
std::unique_ptr<service_manager::Service>
|
||||
CefContentUtilityClient::HandleServiceRequest(
|
||||
const std::string& service_name,
|
||||
service_manager::mojom::ServiceRequest request) {
|
||||
if (service_name == printing::mojom::kServiceName) {
|
||||
return printing::CreatePdfCompositorService(std::string(),
|
||||
std::move(request));
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -25,6 +25,9 @@ class CefContentUtilityClient : public content::ContentUtilityClient {
|
||||
void UtilityThreadStarted() override;
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
void RegisterServices(StaticServiceMap* services) override;
|
||||
std::unique_ptr<service_manager::Service> HandleServiceRequest(
|
||||
const std::string& service_name,
|
||||
service_manager::mojom::ServiceRequest request) override;
|
||||
|
||||
private:
|
||||
#if defined(OS_WIN)
|
||||
|
Reference in New Issue
Block a user