Update to Chromium version 70.0.3538.0 (#587811)

Known issues:
- The CefLoadCRLSetsFile function needs to be re-implemented (see issue #2497).
- Linux: GTK2 support has been removed. The cefclient sample needs to be updated
  to use GTK3 (see issue #2014).
This commit is contained in:
Marshall Greenblatt
2018-09-04 11:43:21 +02:00
parent ea0e213bef
commit a64237bcb0
79 changed files with 763 additions and 735 deletions

View File

@@ -62,4 +62,16 @@ ExtensionHostQueue* CefExtensionHostDelegate::GetExtensionHostQueue() const {
return CefExtensionsBrowserClient::Get()->GetExtensionHostQueue();
}
gfx::Size CefExtensionHostDelegate::EnterPictureInPicture(
content::WebContents* web_contents,
const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) {
NOTREACHED();
return gfx::Size();
}
void CefExtensionHostDelegate::ExitPictureInPicture() {
NOTREACHED();
}
} // namespace extensions

View File

@@ -35,6 +35,10 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate {
content::MediaStreamType type,
const Extension* extension) override;
ExtensionHostQueue* GetExtensionHostQueue() const override;
gfx::Size EnterPictureInPicture(content::WebContents* web_contents,
const viz::SurfaceId& surface_id,
const gfx::Size& natural_size) override;
void ExitPictureInPicture() override;
private:
DISALLOW_COPY_AND_ASSIGN(CefExtensionHostDelegate);

View File

@@ -38,7 +38,8 @@ class CefExtensionWebContentsObserver
// Our content script observers. Declare at top so that it will outlive all
// other members, since they might add themselves as observers.
base::ObserverList<ScriptExecutionObserver> script_execution_observers_;
base::ObserverList<ScriptExecutionObserver>::Unchecked
script_execution_observers_;
std::unique_ptr<ScriptExecutor> script_executor_;

View File

@@ -0,0 +1,29 @@
// Copyright 2018 The Chromium 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/extensions/chrome_api_registration.h"
#include "libcef/browser/extensions/extensions_browser_api_provider.h"
//#include "cef/libcef/browser/extensions/api/generated_api_registration.h"
#include "extensions/browser/api/generated_api_registration.h"
namespace extensions {
CefExtensionsBrowserAPIProvider::CefExtensionsBrowserAPIProvider() =
default;
CefExtensionsBrowserAPIProvider::~CefExtensionsBrowserAPIProvider() =
default;
void CefExtensionsBrowserAPIProvider::RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) {
// CEF-only APIs.
// TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
// libcef/common/extensions/api/README.txt for details.
// api::cef::CefGeneratedFunctionRegistry::RegisterAll(registry);
// Chrome APIs whitelisted by CEF.
api::cef::ChromeFunctionRegistry::RegisterAll(registry);
}
} // namespace extensions

View File

@@ -0,0 +1,26 @@
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_
#define CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_
#include "base/macros.h"
#include "extensions/browser/extensions_browser_api_provider.h"
namespace extensions {
class CefExtensionsBrowserAPIProvider : public ExtensionsBrowserAPIProvider {
public:
CefExtensionsBrowserAPIProvider();
~CefExtensionsBrowserAPIProvider() override;
void RegisterExtensionFunctions(ExtensionFunctionRegistry* registry) override;
private:
DISALLOW_COPY_AND_ASSIGN(CefExtensionsBrowserAPIProvider);
};
} // namespace extensions
#endif // CEF_LIBCEF_BROWSER_EXTENSIONS_EXTENSIONS_BROWSER_API_PROVIDER_H_

View File

@@ -9,15 +9,14 @@
#include "libcef/browser/browser_context_impl.h"
#include "libcef/browser/browser_host_impl.h"
#include "libcef/browser/extensions/chrome_api_registration.h"
#include "libcef/browser/extensions/component_extension_resource_manager.h"
#include "libcef/browser/extensions/extension_system.h"
#include "libcef/browser/extensions/extension_system_factory.h"
#include "libcef/browser/extensions/extension_web_contents_observer.h"
#include "libcef/browser/extensions/extensions_api_client.h"
#include "libcef/browser/extensions/extensions_browser_api_provider.h"
#include "libcef/browser/request_context_impl.h"
//#include "cef/libcef/browser/extensions/api/generated_api_registration.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_url_request_util.h"
#include "chrome/browser/extensions/event_router_forwarder.h"
@@ -25,11 +24,10 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "extensions/browser/api/extensions_api_client.h"
#include "extensions/browser/api/generated_api_registration.h"
#include "extensions/browser/api/runtime/runtime_api_delegate.h"
#include "extensions/browser/app_sorting.h"
#include "extensions/browser/core_extensions_browser_api_provider.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/extension_function_registry.h"
#include "extensions/browser/extension_host_delegate.h"
#include "extensions/browser/mojo/interface_registration.h"
#include "extensions/browser/serial_extension_host_queue.h"
@@ -43,7 +41,10 @@ namespace extensions {
CefExtensionsBrowserClient::CefExtensionsBrowserClient()
: api_client_(new CefExtensionsAPIClient),
resource_manager_(new CefComponentExtensionResourceManager) {}
resource_manager_(new CefComponentExtensionResourceManager) {
AddAPIProvider(std::make_unique<CoreExtensionsBrowserAPIProvider>());
AddAPIProvider(std::make_unique<CefExtensionsBrowserAPIProvider>());
}
CefExtensionsBrowserClient::~CefExtensionsBrowserClient() {}
@@ -276,20 +277,6 @@ CefExtensionsBrowserClient::GetExtensionSystemFactory() {
return CefExtensionSystemFactory::GetInstance();
}
void CefExtensionsBrowserClient::RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) const {
// Register core extension-system APIs.
api::GeneratedFunctionRegistry::RegisterAll(registry);
// CEF-only APIs.
// TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
// libcef/common/extensions/api/README.txt for details.
// api::cef::CefGeneratedFunctionRegistry::RegisterAll(registry);
// Chrome APIs whitelisted by CEF.
api::cef::ChromeFunctionRegistry::RegisterAll(registry);
}
void CefExtensionsBrowserClient::RegisterExtensionInterfaces(
service_manager::BinderRegistryWithArgs<content::RenderFrameHost*>*
registry,

View File

@@ -89,8 +89,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
bool IsAppModeForcedForApp(const ExtensionId& extension_id) override;
bool IsLoggedInAsPublicAccount() override;
ExtensionSystemProvider* GetExtensionSystemFactory() override;
void RegisterExtensionFunctions(
ExtensionFunctionRegistry* registry) const override;
void RegisterExtensionInterfaces(service_manager::BinderRegistryWithArgs<
content::RenderFrameHost*>* registry,
content::RenderFrameHost* render_frame_host,