Commit 2e7f935b authored by Marshall Greenblatt's avatar Marshall Greenblatt
Browse files

Update to Chromium version 73.0.3679.0 (#624510)

parent 4b0ac90a
......@@ -277,7 +277,7 @@ if (is_win) {
"//chrome/common:buildflags",
"//ppapi/buildflags:buildflags",
"//printing/buildflags:buildflags",
"//ui/base:ui_features",
"//ui/base:buildflags",
]
}
}
......@@ -643,6 +643,7 @@ static_library("libcef_static") {
deps = [
":cef_make_headers",
":cef_service_manifests",
# Generate API bindings for extensions.
# TODO(cef): Enable if/when CEF exposes its own Mojo APIs. See
......@@ -1047,45 +1048,142 @@ if (is_mac) {
}
}
#
# Service manifests.
#
cef_packaged_services = [
"//chrome/app:chrome_manifest", # For spell checking.
"//chrome/app:chrome_renderer_manifest", # For spell checking.
"//chrome/services/printing:manifest",
"//services/metrics:manifest",
"//services/proxy_resolver:proxy_resolver_manifest",
]
service_manifest("cef_packaged_services_manifest_overlay") {
source = "libcef/common/service_manifests/packaged_services_manifest_overlay.json"
packaged_services = cef_packaged_services
source_set("cef_content_browser_overlay_manifest") {
sources = [
"libcef/common/service_manifests/cef_content_browser_overlay_manifest.cc",
"libcef/common/service_manifests/cef_content_browser_overlay_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//components/services/heap_profiling/public/mojom",
"//extensions/buildflags",
"//extensions/common:mojo",
"//extensions/common/api:mojom",
"//services/service_manager/public/cpp",
"//third_party/blink/public/common",
]
}
source_set("cef_content_gpu_overlay_manifest") {
sources = [
"libcef/common/service_manifests/cef_content_gpu_overlay_manifest.cc",
"libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//components/services/heap_profiling/public/mojom",
"//services/service_manager/public/cpp",
]
}
service_manifest("cef_browser_manifest_overlay") {
source = "libcef/common/service_manifests/browser_manifest_overlay.json"
source_set("cef_content_renderer_overlay_manifest") {
sources = [
"libcef/common/service_manifests/cef_content_renderer_overlay_manifest.cc",
"libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//components/services/heap_profiling/public/mojom",
"//components/subresource_filter/content/mojom",
"//extensions/buildflags",
"//extensions/common:mojo",
"//services/service_manager/public/cpp",
"//third_party/blink/public/common",
]
if (is_mac) {
deps += [ "//components/spellcheck/common:interfaces" ]
}
}
service_manifest("cef_renderer_manifest_overlay") {
source = "libcef/common/service_manifests/renderer_manifest_overlay.json"
source_set("cef_content_utility_overlay_manifest") {
sources = [
"libcef/common/service_manifests/cef_content_utility_overlay_manifest.cc",
"libcef/common/service_manifests/cef_content_utility_overlay_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//components/services/heap_profiling/public/mojom",
"//services/service_manager/public/cpp",
]
}
service_manifest("cef_utility_manifest_overlay") {
source = "libcef/common/service_manifests/utility_manifest_overlay.json"
source_set("cef_packaged_service_manifests") {
sources = [
"libcef/common/service_manifests/cef_packaged_service_manifests.cc",
"libcef/common/service_manifests/cef_packaged_service_manifests.h",
]
configs += [
"libcef/features:config"
]
deps = [
"//base",
"//chrome/common:mojo_bindings",
"//chrome/services/printing:manifest",
"//components/services/pdf_compositor:pdf_compositor_manifest",
"//components/spellcheck/common:interfaces",
"//components/startup_metric_utils/common:interfaces",
"//extensions/buildflags",
"//printing/buildflags",
"//services/proxy_resolver:proxy_resolver_manifest",
"//services/service_manager/public/cpp",
]
}
group("cef_manifest_overlays") {
source_set("cef_renderer_manifest") {
sources = [
"libcef/common/service_manifests/cef_renderer_manifest.cc",
"libcef/common/service_manifests/cef_renderer_manifest.h",
]
configs += [
"libcef/features:config"
]
deps = [
":cef_packaged_services_manifest_overlay",
":cef_browser_manifest_overlay",
":cef_renderer_manifest_overlay",
":cef_utility_manifest_overlay",
"//base",
"//chrome/common:mojo_bindings",
"//components/spellcheck/common:interfaces",
"//services/service_manager/public/cpp",
]
}
source_set("cef_service_manifests") {
public_deps = [
":cef_content_browser_overlay_manifest",
":cef_content_gpu_overlay_manifest",
":cef_content_renderer_overlay_manifest",
":cef_content_utility_overlay_manifest",
":cef_packaged_service_manifests",
":cef_renderer_manifest",
]
}
#
# Resource grit/pack targets.
......@@ -1231,7 +1329,6 @@ grit("cef_resources") {
"-E",
"root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
]
deps = [ ":cef_manifest_overlays" ]
}
# Generate cef.pak.
......
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': 'refs/tags/73.0.3665.0'
'chromium_checkout': 'refs/tags/73.0.3679.0'
}
......@@ -27,6 +27,8 @@
# Files in the chromium/src directory that should be evaluated for changes.
# Similar changes may need to be applied to the CEF source code.
'files': [
'chrome/app/chrome_*_manifest.*',
'chrome/app/chrome_*_manifests.*',
'chrome/browser/browser_process.h',
'chrome/browser/extensions/api/tabs/tabs_api.*',
'chrome/browser/extensions/chrome_component_extension_resource_manager.*',
......
......@@ -109,6 +109,11 @@ content::ResourceContext* CefBrowserContext::GetResourceContext() {
return resource_context_.get();
}
content::ClientHintsControllerDelegate*
CefBrowserContext::GetClientHintsControllerDelegate() {
return nullptr;
}
net::URLRequestContextGetter* CefBrowserContext::GetRequestContext() {
CEF_REQUIRE_UIT();
return GetDefaultStoragePartition(this)->GetURLRequestContext();
......
......@@ -138,6 +138,8 @@ class CefBrowserContext : public ChromeProfileStub {
// BrowserContext methods.
content::ResourceContext* GetResourceContext() override;
content::ClientHintsControllerDelegate* GetClientHintsControllerDelegate()
override;
net::URLRequestContextGetter* GetRequestContext() override;
net::URLRequestContextGetter* CreateMediaRequestContext() override;
net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
......
......@@ -154,6 +154,11 @@ CefBrowserContextProxy::GetSSLHostStateDelegate() {
return parent_->GetSSLHostStateDelegate();
}
content::ClientHintsControllerDelegate*
CefBrowserContextProxy::GetClientHintsControllerDelegate() {
return parent_->GetClientHintsControllerDelegate();
}
content::PermissionControllerDelegate*
CefBrowserContextProxy::GetPermissionControllerDelegate() {
return parent_->GetPermissionControllerDelegate();
......
......@@ -42,6 +42,8 @@ class CefBrowserContextProxy : public CefBrowserContext {
storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
content::PushMessagingService* GetPushMessagingService() override;
content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
content::ClientHintsControllerDelegate* GetClientHintsControllerDelegate()
override;
content::PermissionControllerDelegate* GetPermissionControllerDelegate()
override;
content::BackgroundFetchDelegate* GetBackgroundFetchDelegate() override;
......
......@@ -939,8 +939,7 @@ void CefBrowserHostImpl::GetNavigationEntries(
if (!web_contents())
return;
const content::NavigationController& controller =
web_contents()->GetController();
content::NavigationController& controller = web_contents()->GetController();
const int total = controller.GetEntryCount();
const int current = controller.GetCurrentEntryIndex();
......@@ -2615,24 +2614,24 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
content::MediaResponseCallback callback) {
CEF_REQUIRE_UIT();
content::MediaStreamDevices devices;
blink::MediaStreamDevices devices;
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
if (!command_line->HasSwitch(switches::kEnableMediaStream)) {
// Cancel the request.
std::move(callback).Run(devices, content::MEDIA_DEVICE_PERMISSION_DENIED,
std::move(callback).Run(devices, blink::MEDIA_DEVICE_PERMISSION_DENIED,
std::unique_ptr<content::MediaStreamUI>());
return;
}
// Based on chrome/browser/media/media_stream_devices_controller.cc
bool microphone_requested =
(request.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE);
(request.audio_type == blink::MEDIA_DEVICE_AUDIO_CAPTURE);
bool webcam_requested =
(request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE);
(request.video_type == blink::MEDIA_DEVICE_VIDEO_CAPTURE);
bool screen_requested =
(request.video_type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE);
(request.video_type == blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE);
if (microphone_requested || webcam_requested || screen_requested) {
// Pick the desired device or fall back to the first available of the
// given type.
......@@ -2655,19 +2654,19 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
content::DesktopMediaID::Parse(request.requested_video_device_id);
}
devices.push_back(
content::MediaStreamDevice(content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE,
media_id.ToString(), "Screen"));
blink::MediaStreamDevice(blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE,
media_id.ToString(), "Screen"));
}
}
std::move(callback).Run(devices, content::MEDIA_DEVICE_OK,
std::move(callback).Run(devices, blink::MEDIA_DEVICE_OK,
std::unique_ptr<content::MediaStreamUI>());
}
bool CefBrowserHostImpl::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type) {
blink::MediaStreamType type) {
// Check media access permission without prompting the user. This is called
// when loading the Pepper Flash plugin.
const base::CommandLine* command_line =
......
......@@ -479,7 +479,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
content::MediaResponseCallback callback) override;
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type) override;
blink::MediaStreamType type) override;
bool IsNeverVisible(content::WebContents* web_contents) override;
// content::WebContentsObserver methods.
......
......@@ -35,12 +35,19 @@
#include "libcef/common/extensions/extensions_util.h"
#include "libcef/common/net/scheme_registration.h"
#include "libcef/common/request_impl.h"
#include "libcef/common/service_manifests/cef_content_browser_overlay_manifest.h"
#include "libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h"
#include "libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h"
#include "libcef/common/service_manifests/cef_content_utility_overlay_manifest.h"
#include "libcef/common/service_manifests/cef_packaged_service_manifests.h"
#include "libcef/common/service_manifests/cef_renderer_manifest.h"
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/json/json_reader.h"
#include "base/path_service.h"
#include "base/stl_util.h"
#include "cef/grit/cef_resources.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_service.h"
......@@ -634,31 +641,27 @@ void CefContentBrowserClient::RegisterOutOfProcessServices(
base::Optional<service_manager::Manifest>
CefContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
int id = -1;
if (name == content::mojom::kBrowserServiceName)
id = IDR_CEF_BROWSER_MANIFEST_OVERLAY;
else if (name == content::mojom::kPackagedServicesServiceName)
id = IDR_CEF_PACKAGED_SERVICES_MANIFEST_OVERLAY;
else if (name == content::mojom::kRendererServiceName)
id = IDR_CEF_RENDERER_MANIFEST_OVERLAY;
else if (name == content::mojom::kUtilityServiceName)
id = IDR_CEF_UTILITY_MANIFEST_OVERLAY;
if (id == -1)
return {};
base::StringPiece manifest_contents =
ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
id, ui::ScaleFactor::SCALE_FACTOR_NONE);
return service_manager::Manifest::FromValueDeprecated(
base::JSONReader::Read(manifest_contents));
if (name == content::mojom::kBrowserServiceName) {
return GetCefContentBrowserOverlayManifest();
} else if (name == content::mojom::kGpuServiceName) {
return GetCefContentGpuOverlayManifest();
} else if (name == content::mojom::kPackagedServicesServiceName) {
service_manager::Manifest overlay;
overlay.packaged_services = GetCefPackagedServiceManifests();
return overlay;
} else if (name == content::mojom::kRendererServiceName) {
return GetCefContentRendererOverlayManifest();
} else if (name == content::mojom::kUtilityServiceName) {
return GetCefContentUtilityOverlayManifest();
}
return base::nullopt;
}
std::vector<content::ContentBrowserClient::ServiceManifestInfo>
CefContentBrowserClient::GetExtraServiceManifests() {
return std::vector<ServiceManifestInfo>({
{printing::mojom::kServiceName, IDR_PDF_COMPOSITOR_MANIFEST},
{chrome::mojom::kRendererServiceName,
IDR_CHROME_RENDERER_SERVICE_MANIFEST},
{chrome::mojom::kRendererServiceName, -1, GetCefRendererManifest()},
});
}
......@@ -690,7 +693,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kUserAgent,
};
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
base::size(kSwitchNames));
}
const std::string& process_type =
......@@ -713,7 +716,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kUnsafelyTreatInsecureOriginAsSecure,
};
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
base::size(kSwitchNames));
if (extensions::ExtensionsEnabled()) {
// Based on ChromeContentBrowserClientExtensionsPart::
......@@ -734,7 +737,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kLang,
};
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
base::size(kSwitchNames));
}
#if defined(OS_LINUX)
......@@ -746,7 +749,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
switches::kPpapiFlashVersion,
};
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
base::size(kSwitchNames));
#if BUILDFLAG(ENABLE_WIDEVINE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
if (!browser_cmd->HasSwitch(service_manager::switches::kNoSandbox)) {
......
......@@ -201,10 +201,10 @@ void CefDevToolsFrontend::ReadyToCommitNavigation(
content::NavigationHandle* navigation_handle) {
content::RenderFrameHost* frame = navigation_handle->GetRenderFrameHost();
if (navigation_handle->IsInMainFrame()) {
frontend_host_.reset(content::DevToolsFrontendHost::Create(
frontend_host_ = content::DevToolsFrontendHost::Create(
frame,
base::Bind(&CefDevToolsFrontend::HandleMessageFromDevToolsFrontend,
base::Unretained(this))));
base::Unretained(this)));
return;
}
......
......@@ -51,7 +51,7 @@ void CefExtensionHostDelegate::ProcessMediaAccessRequest(
bool CefExtensionHostDelegate::CheckMediaAccessPermission(
content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type,
blink::MediaStreamType type,
const Extension* extension) {
// Never routed here from CefBrowserHostImpl.
NOTREACHED();
......
......@@ -32,7 +32,7 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate {
const Extension* extension) override;
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
const GURL& security_origin,
content::MediaStreamType type,
blink::MediaStreamType type,
const Extension* extension) override;
ExtensionHostQueue* GetExtensionHostQueue() const override;
gfx::Size EnterPictureInPicture(content::WebContents* web_contents,
......
......@@ -10,18 +10,18 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/media_capture_devices.h"
using blink::MediaStreamDevices;
using content::BrowserThread;
using content::MediaStreamDevices;
namespace {
const content::MediaStreamDevice* FindDefaultDeviceWithId(
const content::MediaStreamDevices& devices,
const blink::MediaStreamDevice* FindDefaultDeviceWithId(
const blink::MediaStreamDevices& devices,
const std::string& device_id) {
if (devices.empty())
return NULL;
content::MediaStreamDevices::const_iterator iter = devices.begin();
blink::MediaStreamDevices::const_iterator iter = devices.begin();
for (; iter != devices.end(); ++iter) {
if (iter->id == device_id) {
return &(*iter);
......@@ -54,7 +54,7 @@ void CefMediaCaptureDevicesDispatcher::GetDefaultDevices(
PrefService* prefs,
bool audio,
bool video,
content::MediaStreamDevices* devices) {
blink::MediaStreamDevices* devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(audio || video);
......@@ -74,20 +74,20 @@ void CefMediaCaptureDevicesDispatcher::GetRequestedDevice(
const std::string& requested_device_id,
bool audio,
bool video,
content::MediaStreamDevices* devices) {
blink::MediaStreamDevices* devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(audio || video);
if (audio) {
const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices();
const content::MediaStreamDevice* const device =
const blink::MediaStreamDevices& audio_devices = GetAudioCaptureDevices();
const blink::MediaStreamDevice* const device =
FindDefaultDeviceWithId(audio_devices, requested_device_id);
if (device)
devices->push_back(*device);
}
if (video) {
const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices();
const content::MediaStreamDevice* const device =
const blink::MediaStreamDevices& video_devices = GetVideoCaptureDevices();
const blink::MediaStreamDevice* const device =
FindDefaultDeviceWithId(video_devices, requested_device_id);
if (device)
devices->push_back(*device);
......@@ -103,7 +103,7 @@ void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
int render_frame_id,
int page_request_id,
const GURL& security_origin,
content::MediaStreamType stream_type,
blink::MediaStreamType stream_type,
content::MediaRequestState state) {}
void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream(
......@@ -114,7 +114,7 @@ void CefMediaCaptureDevicesDispatcher::OnSetCapturingLinkSecured(
int render_process_id,
int render_frame_id,
int page_request_id,
content::MediaStreamType stream_type,
blink::MediaStreamType stream_type,
bool is_secure) {}
const MediaStreamDevices&
......
......@@ -9,7 +9,7 @@
#include "base/memory/singleton.h"
#include "base/observer_list.h"
#include "content/public/browser/media_observer.h"
#include "content/public/common/media_stream_request.h"
#include "content/public/browser/media_stream_request.h"
class PrefRegistrySimple;
class PrefService;
......@@ -29,7 +29,7 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
void GetDefaultDevices(PrefService* prefs,
bool audio,
bool video,
content::MediaStreamDevices* devices);
blink::MediaStreamDevices* devices);
// Helper for picking the device that was requested for an OpenDevice request.
// If the device requested is not available it will revert to using the first
......@@ -38,7 +38,7 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
void GetRequestedDevice(const std::string& requested_device_id,
bool audio,
bool video,
content::MediaStreamDevices* devices);
blink::MediaStreamDevices* devices);
// Overridden from content::MediaObserver:
void OnAudioCaptureDevicesChanged() override;
......@@ -47,14 +47,14 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
int render_frame_id,
int page_request_id,
const GURL& security_origin,
content::MediaStreamType stream_type,
blink::MediaStreamType stream_type,
content::MediaRequestState state) override;
void OnCreatingAudioStream(int render_process_id,
int render_view_id) override;
void OnSetCapturingLinkSecured(int render_process_id,
int render_frame_id,
int page_request_id,
content::MediaStreamType stream_type,
blink::MediaStreamType stream_type,
bool is_secure) override;
private:
......@@ -63,8 +63,8 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
CefMediaCaptureDevicesDispatcher();
~CefMediaCaptureDevicesDispatcher() override;
const content::MediaStreamDevices& GetAudioCaptureDevices();
const content::MediaStreamDevices& GetVideoCaptureDevices();
const blink::MediaStreamDevices& GetAudioCaptureDevices();
const blink::MediaStreamDevices& GetVideoCaptureDevices();
};
#endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
......@@ -119,8 +119,6 @@ class CefSimpleMenuModel : public ui::MenuModel {
return impl_->IsVisibleAt(index);
}
void HighlightChangedTo(int index) override {}
void ActivatedAt(int index) override { ActivatedAt(index, 0); }
void ActivatedAt(int index, int event_flags) override {
......
......@@ -11,6 +11,7 @@
#include "libcef/browser/browser_host_impl.h"
#include "base/mac/mac_util.h"
#include "base/stl_util.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
......@@ -36,7 +37,7 @@ base::string16 GetDescriptionFromMimeType(const std::string& mime_type) {
{"video", IDS_VIDEO_FILES},
};