mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-20 06:00:41 +01:00
Update to Chromium version 77.0.3865.0 (#681094)
- Windows: SDK version 10.0.18362.0 is now required.
This commit is contained in:
parent
b6b033a52b
commit
46d3a81ba0
204
BUILD.gn
204
BUILD.gn
@ -100,6 +100,7 @@ import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//cef/cef_repack_locales.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//content/public/app/mac_helpers.gni")
|
||||
import("//extensions/buildflags/buildflags.gni")
|
||||
import("//media/media_options.gni")
|
||||
import("//mojo/public/tools/bindings/mojom.gni")
|
||||
@ -124,6 +125,110 @@ if (is_mac) {
|
||||
import("//build/mac/tweak_info_plist.gni")
|
||||
import("//build/util/version.gni")
|
||||
import("//media/cdm/library_cdm/cdm_paths.gni")
|
||||
import("//build/config/mac/base_rules.gni")
|
||||
|
||||
# Template to compile .xib and .storyboard files.
|
||||
#
|
||||
# Arguments
|
||||
#
|
||||
# sources:
|
||||
# list of string, sources to compile
|
||||
#
|
||||
# ibtool_flags:
|
||||
# (optional) list of string, additional flags to pass to the ibtool
|
||||
template("compile_ib_files") {
|
||||
action_foreach(target_name) {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"testonly",
|
||||
"visibility",
|
||||
])
|
||||
assert(defined(invoker.sources),
|
||||
"sources must be specified for $target_name")
|
||||
assert(defined(invoker.output_extension),
|
||||
"output_extension must be specified for $target_name")
|
||||
|
||||
ibtool_flags = []
|
||||
if (defined(invoker.ibtool_flags)) {
|
||||
ibtool_flags = invoker.ibtool_flags
|
||||
}
|
||||
|
||||
_output_extension = invoker.output_extension
|
||||
|
||||
script = "//cef/tools/compile_ib_files.py"
|
||||
sources = invoker.sources
|
||||
outputs = [
|
||||
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
|
||||
]
|
||||
args = [
|
||||
"--input",
|
||||
"{{source}}",
|
||||
"--output",
|
||||
rebase_path(
|
||||
"$target_gen_dir/$target_name/{{source_name_part}}.$_output_extension",
|
||||
root_build_dir),
|
||||
]
|
||||
if (!use_system_xcode) {
|
||||
args += [
|
||||
"--developer_dir",
|
||||
hermetic_xcode_path,
|
||||
]
|
||||
}
|
||||
args += ibtool_flags
|
||||
}
|
||||
}
|
||||
|
||||
# Template to compile and package Mac XIB files as bundle data.
|
||||
#
|
||||
# Arguments
|
||||
#
|
||||
# sources:
|
||||
# list of string, sources to comiple
|
||||
#
|
||||
# output_path:
|
||||
# (optional) string, the path to use for the outputs list in the
|
||||
# bundle_data step. If unspecified, defaults to bundle_resources_dir.
|
||||
template("mac_xib_bundle_data") {
|
||||
_target_name = target_name
|
||||
_compile_target_name = _target_name + "_compile_ibtool"
|
||||
|
||||
compile_ib_files(_compile_target_name) {
|
||||
forward_variables_from(invoker, [ "testonly" ])
|
||||
visibility = [ ":$_target_name" ]
|
||||
sources = invoker.sources
|
||||
output_extension = "nib"
|
||||
ibtool_flags = [
|
||||
"--minimum-deployment-target",
|
||||
mac_deployment_target,
|
||||
|
||||
# TODO(rsesek): Enable this once all the bots are on Xcode 7+.
|
||||
# "--target-device",
|
||||
# "mac",
|
||||
]
|
||||
}
|
||||
|
||||
bundle_data(_target_name) {
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"testonly",
|
||||
"visibility",
|
||||
])
|
||||
|
||||
public_deps = [
|
||||
":$_compile_target_name",
|
||||
]
|
||||
sources = get_target_outputs(":$_compile_target_name")
|
||||
|
||||
_output_path = "{{bundle_resources_dir}}"
|
||||
if (defined(invoker.output_path)) {
|
||||
_output_path = invoker.output_path
|
||||
}
|
||||
|
||||
outputs = [
|
||||
"$_output_path/{{source_file_part}}",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
if (is_win) {
|
||||
import("//build/config/win/console_app.gni")
|
||||
@ -249,6 +354,9 @@ if (is_win) {
|
||||
"//ppapi/buildflags:buildflags",
|
||||
"//printing/buildflags:buildflags",
|
||||
"//ui/base:buildflags",
|
||||
|
||||
# Required by content_switches.cc
|
||||
"//media:media_buildflags",
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -519,6 +627,8 @@ static_library("libcef_static") {
|
||||
"libcef/common/process_message_impl.h",
|
||||
"libcef/common/request_impl.cc",
|
||||
"libcef/common/request_impl.h",
|
||||
"libcef/common/resource_bundle_delegate.cc",
|
||||
"libcef/common/resource_bundle_delegate.h",
|
||||
"libcef/common/resource_bundle_impl.cc",
|
||||
"libcef/common/resource_bundle_impl.h",
|
||||
"libcef/common/response_impl.cc",
|
||||
@ -659,7 +769,7 @@ static_library("libcef_static") {
|
||||
"//components/proxy_config",
|
||||
"//components/safe_browsing/db:test_database_manager",
|
||||
"//components/services/pdf_compositor/public/cpp:factory",
|
||||
"//components/services/pdf_compositor/public/interfaces",
|
||||
"//components/services/pdf_compositor/public/mojom",
|
||||
"//components/tracing",
|
||||
"//components/update_client",
|
||||
"//components/url_formatter",
|
||||
@ -1065,7 +1175,7 @@ source_set("cef_content_browser_overlay_manifest") {
|
||||
"//base",
|
||||
"//components/services/heap_profiling/public/mojom",
|
||||
"//extensions/buildflags",
|
||||
"//extensions/common:mojo",
|
||||
"//extensions/common:mojom",
|
||||
"//extensions/common/api:mojom",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//third_party/blink/public/common",
|
||||
@ -1104,7 +1214,7 @@ source_set("cef_content_renderer_overlay_manifest") {
|
||||
"//components/services/heap_profiling/public/mojom",
|
||||
"//components/subresource_filter/content/mojom",
|
||||
"//extensions/buildflags",
|
||||
"//extensions/common:mojo",
|
||||
"//extensions/common:mojom",
|
||||
"//services/service_manager/public/cpp",
|
||||
"//third_party/blink/public/common",
|
||||
]
|
||||
@ -1150,7 +1260,6 @@ source_set("builtin_service_manifests") {
|
||||
"//components/startup_metric_utils/common:interfaces",
|
||||
"//extensions/buildflags",
|
||||
"//printing/buildflags",
|
||||
"//services/proxy_resolver/public/cpp:manifest",
|
||||
"//services/service_manager/public/cpp",
|
||||
]
|
||||
}
|
||||
@ -1686,32 +1795,60 @@ if (is_mac) {
|
||||
]
|
||||
}
|
||||
|
||||
mac_app_bundle("${app_name}_helper_app") {
|
||||
testonly = app_testonly
|
||||
output_name = app_helper_name
|
||||
template("cef_helper_app") {
|
||||
mac_app_bundle(target_name) {
|
||||
assert(defined(invoker.helper_sources))
|
||||
assert(defined(invoker.helper_name_suffix))
|
||||
assert(defined(invoker.helper_bundle_id_suffix))
|
||||
|
||||
sources = invoker.helper_sources
|
||||
testonly = app_testonly
|
||||
output_name = app_helper_name + invoker.helper_name_suffix
|
||||
|
||||
deps = [
|
||||
":cef_make_headers",
|
||||
":cef_sandbox",
|
||||
":libcef_dll_wrapper",
|
||||
]
|
||||
if (defined(invoker.helper_deps)) {
|
||||
deps += invoker.helper_deps
|
||||
sources = invoker.helper_sources
|
||||
|
||||
extra_substitutions = [
|
||||
"BUNDLE_ID_SUFFIX=${invoker.helper_bundle_id_suffix}",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":cef_make_headers",
|
||||
":cef_sandbox",
|
||||
":libcef_dll_wrapper",
|
||||
]
|
||||
if (defined(invoker.helper_deps)) {
|
||||
deps += invoker.helper_deps
|
||||
}
|
||||
|
||||
ldflags = [
|
||||
# The helper is in $app_name.app/Contents/Frameworks/$app_name Helper.app/Contents/MacOS/
|
||||
# so set rpath up to the base.
|
||||
"-rpath",
|
||||
"@executable_path/../../../../../..",
|
||||
]
|
||||
|
||||
info_plist_target = ":${app_name}_helper_plist"
|
||||
|
||||
if (defined(invoker.helper_defines)) {
|
||||
defines = invoker.helper_defines
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ldflags = [
|
||||
# The helper is in $app_name.app/Contents/Frameworks/$app_name Helper.app/Contents/MacOS/
|
||||
# so set rpath up to the base.
|
||||
"-rpath",
|
||||
"@executable_path/../../../../../..",
|
||||
]
|
||||
foreach(helper_params, content_mac_helpers) {
|
||||
_helper_target = helper_params[0]
|
||||
_helper_bundle_id = helper_params[1]
|
||||
_helper_suffix = helper_params[2]
|
||||
cef_helper_app("${app_name}_helper_app_${_helper_target}") {
|
||||
helper_sources = invoker.helper_sources
|
||||
if (defined(invoker.helper_deps)) {
|
||||
helper_deps = invoker.helper_deps
|
||||
}
|
||||
if (defined(invoker.helper_defines)) {
|
||||
helper_defines = invoker.helper_defines
|
||||
}
|
||||
|
||||
info_plist_target = ":${app_name}_helper_plist"
|
||||
|
||||
if (defined(invoker.helper_defines)) {
|
||||
defines = invoker.helper_defines
|
||||
helper_name_suffix = _helper_suffix
|
||||
helper_bundle_id_suffix = _helper_bundle_id
|
||||
}
|
||||
}
|
||||
|
||||
@ -1719,14 +1856,19 @@ if (is_mac) {
|
||||
testonly = app_testonly
|
||||
sources = [
|
||||
"$root_out_dir/$cef_framework_name.framework",
|
||||
"$root_out_dir/$app_helper_name.app",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
":cef_framework",
|
||||
":${app_name}_helper_app",
|
||||
]
|
||||
|
||||
foreach(helper_params, content_mac_helpers) {
|
||||
sources += [
|
||||
"$root_out_dir/${app_helper_name}${helper_params[2]}.app",
|
||||
]
|
||||
public_deps += [ ":${app_name}_helper_app_${helper_params[0]}" ]
|
||||
}
|
||||
|
||||
outputs = [
|
||||
"{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
|
||||
]
|
||||
@ -1879,7 +2021,6 @@ if (is_mac) {
|
||||
sources = [
|
||||
"tests/cefsimple/mac/English.lproj/MainMenu.xib",
|
||||
]
|
||||
|
||||
output_path = "{{bundle_resources_dir}}/English.lproj"
|
||||
}
|
||||
|
||||
@ -1940,7 +2081,6 @@ if (is_mac) {
|
||||
sources = [
|
||||
"tests/ceftests/resources/mac/English.lproj/MainMenu.xib",
|
||||
]
|
||||
|
||||
output_path = "{{bundle_resources_dir}}/English.lproj"
|
||||
}
|
||||
|
||||
@ -2032,12 +2172,9 @@ if (is_mac) {
|
||||
gypi_paths2.shared_sources_browser +
|
||||
gypi_paths2.shared_sources_common +
|
||||
gypi_paths2.shared_sources_renderer +
|
||||
gypi_paths2.shared_sources_resources +
|
||||
gypi_paths2.cefclient_sources_browser +
|
||||
gypi_paths2.cefclient_sources_common +
|
||||
gypi_paths2.cefclient_sources_renderer +
|
||||
gypi_paths2.cefclient_sources_resources +
|
||||
gypi_paths2.cefclient_sources_resources_extensions_set_page_color
|
||||
gypi_paths2.cefclient_sources_renderer
|
||||
|
||||
deps = [
|
||||
":libcef",
|
||||
@ -2188,7 +2325,6 @@ if (is_mac) {
|
||||
gypi_paths2.shared_sources_browser +
|
||||
gypi_paths2.shared_sources_common +
|
||||
gypi_paths2.shared_sources_renderer +
|
||||
gypi_paths2.shared_sources_resources +
|
||||
gypi_paths2.ceftests_sources_common +
|
||||
gypi_paths2.ceftests_sources_views
|
||||
|
||||
|
@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/76.0.3809.0'
|
||||
'chromium_checkout': 'refs/tags/77.0.3865.0'
|
||||
}
|
||||
|
@ -352,10 +352,7 @@
|
||||
'tests/cefclient/browser/window_test_runner_win.cc',
|
||||
'tests/cefclient/browser/window_test_runner_win.h',
|
||||
'tests/cefclient/cefclient_win.cc',
|
||||
'tests/cefclient/resources/win/cefclient.exe.manifest',
|
||||
'tests/cefclient/resources/win/cefclient.ico',
|
||||
'tests/cefclient/resources/win/cefclient.rc',
|
||||
'tests/cefclient/resources/win/small.ico',
|
||||
],
|
||||
'cefclient_sources_mac': [
|
||||
'tests/cefclient/browser/browser_window_osr_mac.h',
|
||||
@ -424,13 +421,10 @@
|
||||
'tests/cefsimple/simple_handler.h',
|
||||
],
|
||||
'cefsimple_sources_win': [
|
||||
'tests/cefsimple/cefsimple.exe.manifest',
|
||||
'tests/cefsimple/cefsimple.rc',
|
||||
'tests/cefsimple/cefsimple_win.cc',
|
||||
'tests/cefsimple/simple_handler_win.cc',
|
||||
'tests/cefsimple/resource.h',
|
||||
'tests/cefsimple/res/cefsimple.ico',
|
||||
'tests/cefsimple/res/small.ico',
|
||||
],
|
||||
'cefsimple_sources_mac': [
|
||||
'tests/cefsimple/cefsimple_mac.mm',
|
||||
@ -531,10 +525,7 @@
|
||||
],
|
||||
'ceftests_sources_win': [
|
||||
'tests/ceftests/resource_util_win_idmap.cc',
|
||||
'tests/ceftests/resources/win/ceftests.exe.manifest',
|
||||
'tests/ceftests/resources/win/ceftests.ico',
|
||||
'tests/ceftests/resources/win/ceftests.rc',
|
||||
'tests/ceftests/resources/win/small.ico',
|
||||
],
|
||||
'ceftests_sources_mac': [
|
||||
'tests/ceftests/os_rendering_unittest_mac.h',
|
||||
|
@ -346,6 +346,15 @@ if(OS_MACOSX)
|
||||
set(CEF_SANDBOX_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/cef_sandbox.a")
|
||||
set(CEF_SANDBOX_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/cef_sandbox.a")
|
||||
endif()
|
||||
|
||||
# CEF Helper app suffixes.
|
||||
# Format is "<name suffix>:<target suffix>:<plist suffix>".
|
||||
set(CEF_HELPER_APP_SUFFIXES
|
||||
"::"
|
||||
" (GPU):_gpu:.gpu"
|
||||
" (Plugin):_plugin:.plugin"
|
||||
" (Renderer):_renderer:.renderer"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -901,7 +901,7 @@ typedef enum {
|
||||
// No error.
|
||||
ERR_NONE = 0,
|
||||
|
||||
#define NET_ERROR(label, value) ERR_ ## label = value,
|
||||
#define NET_ERROR(label, value) ERR_##label = value,
|
||||
#include "include/base/internal/cef_net_error_list.h"
|
||||
#undef NET_ERROR
|
||||
|
||||
|
@ -406,13 +406,6 @@ net::URLRequestContextGetter* CefBrowserContext::CreateMediaRequestContext() {
|
||||
return GetRequestContext();
|
||||
}
|
||||
|
||||
net::URLRequestContextGetter*
|
||||
CefBrowserContext::CreateMediaRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void CefBrowserContext::SetCorsOriginAccessListForOrigin(
|
||||
const url::Origin& source_origin,
|
||||
std::vector<network::mojom::CorsOriginPatternPtr> allow_patterns,
|
||||
@ -433,6 +426,10 @@ CefBrowserContext::GetURLLoaderFactory() {
|
||||
->GetURLLoaderFactoryForBrowserProcess();
|
||||
}
|
||||
|
||||
base::FilePath CefBrowserContext::GetPath() {
|
||||
return cache_path_;
|
||||
}
|
||||
|
||||
base::FilePath CefBrowserContext::GetPath() const {
|
||||
return cache_path_;
|
||||
}
|
||||
@ -510,15 +507,6 @@ net::URLRequestContextGetter* CefBrowserContext::CreateRequestContext(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
net::URLRequestContextGetter*
|
||||
CefBrowserContext::CreateRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
PrefService* CefBrowserContext::GetPrefs() {
|
||||
return pref_service_.get();
|
||||
}
|
||||
|
@ -125,14 +125,12 @@ class CefBrowserContext : public ChromeProfileStub,
|
||||
override;
|
||||
net::URLRequestContextGetter* GetRequestContext() override;
|
||||
net::URLRequestContextGetter* CreateMediaRequestContext() override;
|
||||
net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory) override;
|
||||
void SetCorsOriginAccessListForOrigin(
|
||||
const url::Origin& source_origin,
|
||||
std::vector<network::mojom::CorsOriginPatternPtr> allow_patterns,
|
||||
std::vector<network::mojom::CorsOriginPatternPtr> block_patterns,
|
||||
base::OnceClosure closure) override;
|
||||
base::FilePath GetPath() override;
|
||||
base::FilePath GetPath() const override;
|
||||
std::unique_ptr<content::ZoomLevelDelegate> CreateZoomLevelDelegate(
|
||||
const base::FilePath& partition_path) override;
|
||||
@ -151,11 +149,6 @@ class CefBrowserContext : public ChromeProfileStub,
|
||||
net::URLRequestContextGetter* CreateRequestContext(
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors) override;
|
||||
net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
|
||||
const base::FilePath& partition_path,
|
||||
bool in_memory,
|
||||
content::ProtocolHandlerMap* protocol_handlers,
|
||||
content::URLRequestInterceptorScopedVector request_interceptors) override;
|
||||
|
||||
// Profile methods.
|
||||
ChromeZoomLevelPrefs* GetZoomLevelPrefs() override;
|
||||
|
@ -735,7 +735,7 @@ void CefBrowserHostImpl::StartDownload(const CefString& url) {
|
||||
|
||||
std::unique_ptr<download::DownloadUrlParameters> params(
|
||||
content::DownloadRequestUtils::CreateDownloadForWebContentsMainFrame(
|
||||
web_contents(), gurl, NO_TRAFFIC_ANNOTATION_YET));
|
||||
web_contents(), gurl, MISSING_TRAFFIC_ANNOTATION));
|
||||
manager->DownloadUrl(std::move(params));
|
||||
}
|
||||
|
||||
@ -1744,7 +1744,7 @@ void CefBrowserHostImpl::RunFileChooser(
|
||||
file_dialog_manager_->RunFileChooser(params, callback);
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::EmbedsFullscreenWidget() const {
|
||||
bool CefBrowserHostImpl::EmbedsFullscreenWidget() {
|
||||
// When using windowless rendering do not allow Flash to create its own
|
||||
// full- screen widget.
|
||||
return IsWindowless();
|
||||
@ -1763,12 +1763,12 @@ void CefBrowserHostImpl::ExitFullscreenModeForTab(
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::IsFullscreenForTabOrPending(
|
||||
const content::WebContents* web_contents) const {
|
||||
const content::WebContents* web_contents) {
|
||||
return is_fullscreen_;
|
||||
}
|
||||
|
||||
blink::WebDisplayMode CefBrowserHostImpl::GetDisplayMode(
|
||||
const content::WebContents* web_contents) const {
|
||||
const content::WebContents* web_contents) {
|
||||
return is_fullscreen_ ? blink::kWebDisplayModeFullscreen
|
||||
: blink::kWebDisplayModeBrowser;
|
||||
}
|
||||
@ -2442,18 +2442,21 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
if (!command_line->HasSwitch(switches::kEnableMediaStream)) {
|
||||
// Cancel the request.
|
||||
std::move(callback).Run(devices, blink::MEDIA_DEVICE_PERMISSION_DENIED,
|
||||
std::unique_ptr<content::MediaStreamUI>());
|
||||
std::move(callback).Run(
|
||||
devices, blink::mojom::MediaStreamRequestResult::PERMISSION_DENIED,
|
||||
std::unique_ptr<content::MediaStreamUI>());
|
||||
return;
|
||||
}
|
||||
|
||||
// Based on chrome/browser/media/media_stream_devices_controller.cc
|
||||
bool microphone_requested =
|
||||
(request.audio_type == blink::MEDIA_DEVICE_AUDIO_CAPTURE);
|
||||
bool webcam_requested =
|
||||
(request.video_type == blink::MEDIA_DEVICE_VIDEO_CAPTURE);
|
||||
(request.audio_type ==
|
||||
blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE);
|
||||
bool webcam_requested = (request.video_type ==
|
||||
blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE);
|
||||
bool screen_requested =
|
||||
(request.video_type == blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE);
|
||||
(request.video_type ==
|
||||
blink::mojom::MediaStreamType::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.
|
||||
@ -2475,20 +2478,20 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
||||
media_id =
|
||||
content::DesktopMediaID::Parse(request.requested_video_device_id);
|
||||
}
|
||||
devices.push_back(
|
||||
blink::MediaStreamDevice(blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE,
|
||||
media_id.ToString(), "Screen"));
|
||||
devices.push_back(blink::MediaStreamDevice(
|
||||
blink::mojom::MediaStreamType::GUM_DESKTOP_VIDEO_CAPTURE,
|
||||
media_id.ToString(), "Screen"));
|
||||
}
|
||||
}
|
||||
|
||||
std::move(callback).Run(devices, blink::MEDIA_DEVICE_OK,
|
||||
std::move(callback).Run(devices, blink::mojom::MediaStreamRequestResult::OK,
|
||||
std::unique_ptr<content::MediaStreamUI>());
|
||||
}
|
||||
|
||||
bool CefBrowserHostImpl::CheckMediaAccessPermission(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& security_origin,
|
||||
blink::MediaStreamType type) {
|
||||
blink::mojom::MediaStreamType type) {
|
||||
// Check media access permission without prompting the user. This is called
|
||||
// when loading the Pepper Flash plugin.
|
||||
const base::CommandLine* command_line =
|
||||
|
@ -432,16 +432,16 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
void RunFileChooser(content::RenderFrameHost* render_frame_host,
|
||||
std::unique_ptr<content::FileSelectListener> listener,
|
||||
const blink::mojom::FileChooserParams& params) override;
|
||||
bool EmbedsFullscreenWidget() const override;
|
||||
bool EmbedsFullscreenWidget() override;
|
||||
void EnterFullscreenModeForTab(
|
||||
content::WebContents* web_contents,
|
||||
const GURL& origin,
|
||||
const blink::WebFullscreenOptions& options) override;
|
||||
void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
|
||||
bool IsFullscreenForTabOrPending(
|
||||
const content::WebContents* web_contents) const override;
|
||||
const content::WebContents* web_contents) override;
|
||||
blink::WebDisplayMode GetDisplayMode(
|
||||
const content::WebContents* web_contents) const override;
|
||||
const content::WebContents* web_contents) override;
|
||||
void FindReply(content::WebContents* web_contents,
|
||||
int request_id,
|
||||
int number_of_matches,
|
||||
@ -458,7 +458,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
content::MediaResponseCallback callback) override;
|
||||
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& security_origin,
|
||||
blink::MediaStreamType type) override;
|
||||
blink::mojom::MediaStreamType type) override;
|
||||
bool IsNeverVisible(content::WebContents* web_contents) override;
|
||||
|
||||
// content::WebContentsObserver methods.
|
||||
|
@ -167,10 +167,9 @@ int CefBrowserMainParts::PreCreateThreads() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CefBrowserMainParts::ServiceManagerConnectionStarted(
|
||||
content::ServiceManagerConnection* connection) {
|
||||
void CefBrowserMainParts::PostCreateThreads() {
|
||||
for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
|
||||
chrome_extra_parts_[i]->ServiceManagerConnectionStarted(connection);
|
||||
chrome_extra_parts_[i]->PostCreateThreads();
|
||||
}
|
||||
|
||||
void CefBrowserMainParts::PreMainMessageLoopRun() {
|
||||
|
@ -46,8 +46,7 @@ class CefBrowserMainParts : public content::BrowserMainParts {
|
||||
void PreMainMessageLoopStart() override;
|
||||
void PostMainMessageLoopStart() override;
|
||||
int PreCreateThreads() override;
|
||||
void ServiceManagerConnectionStarted(
|
||||
content::ServiceManagerConnection* connection) override;
|
||||
void PostCreateThreads() override;
|
||||
void PreMainMessageLoopRun() override;
|
||||
void PostMainMessageLoopRun() override;
|
||||
void PostDestroyThreads() override;
|
||||
|
@ -41,9 +41,10 @@ void ChromeBrowserProcessStub::Initialize() {
|
||||
DCHECK(!initialized_);
|
||||
DCHECK(!context_initialized_);
|
||||
DCHECK(!shutdown_);
|
||||
DCHECK(!field_trial_list_);
|
||||
|
||||
// Initialize this early before any code tries to check feature flags.
|
||||
content::SetUpFieldTrialsAndFeatureList();
|
||||
field_trial_list_ = content::SetUpFieldTrialsAndFeatureList();
|
||||
|
||||
initialized_ = true;
|
||||
}
|
||||
@ -101,11 +102,9 @@ void ChromeBrowserProcessStub::Shutdown() {
|
||||
|
||||
background_printing_manager_.reset();
|
||||
|
||||
shutdown_ = true;
|
||||
}
|
||||
field_trial_list_.reset();
|
||||
|
||||
void ChromeBrowserProcessStub::ResourceDispatcherHostCreated() {
|
||||
NOTREACHED();
|
||||
shutdown_ = true;
|
||||
}
|
||||
|
||||
void ChromeBrowserProcessStub::EndSession() {
|
||||
@ -133,10 +132,6 @@ rappor::RapporServiceImpl* ChromeBrowserProcessStub::rappor_service() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IOThread* ChromeBrowserProcessStub::io_thread() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SystemNetworkContextManager*
|
||||
ChromeBrowserProcessStub::system_network_context_manager() {
|
||||
DCHECK(SystemNetworkContextManager::GetInstance());
|
||||
@ -173,12 +168,6 @@ PrefService* ChromeBrowserProcessStub::local_state() {
|
||||
return local_state_.get();
|
||||
}
|
||||
|
||||
net::URLRequestContextGetter*
|
||||
ChromeBrowserProcessStub::system_request_context() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
scoped_refptr<network::SharedURLLoaderFactory>
|
||||
ChromeBrowserProcessStub::shared_url_loader_factory() {
|
||||
NOTREACHED();
|
||||
@ -343,23 +332,6 @@ StartupData* ChromeBrowserProcessStub::startup_data() {
|
||||
void ChromeBrowserProcessStub::StartAutoupdateTimer() {}
|
||||
#endif
|
||||
|
||||
net_log::ChromeNetLog* ChromeBrowserProcessStub::net_log() {
|
||||
DCHECK(initialized_);
|
||||
if (!net_log_) {
|
||||
const base::CommandLine& command_line =
|
||||
*base::CommandLine::ForCurrentProcess();
|
||||
net_log_ = std::make_unique<net_log::ChromeNetLog>();
|
||||
if (command_line.HasSwitch(network::switches::kLogNetLog)) {
|
||||
net_log_->StartWritingToFile(
|
||||
command_line.GetSwitchValuePath(network::switches::kLogNetLog),
|
||||
net::GetNetCaptureModeFromCommandLine(command_line,
|
||||
network::switches::kLogNetLog),
|
||||
command_line.GetCommandLineString(), std::string());
|
||||
}
|
||||
}
|
||||
return net_log_.get();
|
||||
}
|
||||
|
||||
component_updater::ComponentUpdateService*
|
||||
ChromeBrowserProcessStub::component_updater() {
|
||||
NOTREACHED();
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/metrics/field_trial.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/extensions/event_router_forwarder.h"
|
||||
#include "media/media_buildflags.h"
|
||||
@ -38,20 +39,17 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
void Shutdown();
|
||||
|
||||
// BrowserProcess implementation.
|
||||
void ResourceDispatcherHostCreated() override;
|
||||
void EndSession() override;
|
||||
void FlushLocalStateAndReply(base::OnceClosure reply) override;
|
||||
metrics_services_manager::MetricsServicesManager* GetMetricsServicesManager()
|
||||
override;
|
||||
metrics::MetricsService* metrics_service() override;
|
||||
rappor::RapporServiceImpl* rappor_service() override;
|
||||
IOThread* io_thread() override;
|
||||
SystemNetworkContextManager* system_network_context_manager() override;
|
||||
network::NetworkQualityTracker* network_quality_tracker() override;
|
||||
WatchDogThread* watchdog_thread() override;
|
||||
ProfileManager* profile_manager() override;
|
||||
PrefService* local_state() override;
|
||||
net::URLRequestContextGetter* system_request_context() override;
|
||||
scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory()
|
||||
override;
|
||||
variations::VariationsService* variations_service() override;
|
||||
@ -92,7 +90,6 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
void StartAutoupdateTimer() override;
|
||||
#endif
|
||||
|
||||
net_log::ChromeNetLog* net_log() override;
|
||||
component_updater::ComponentUpdateService* component_updater() override;
|
||||
component_updater::SupervisedUserWhitelistInstaller*
|
||||
supervised_user_whitelist_installer() override;
|
||||
@ -116,7 +113,6 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
|
||||
std::unique_ptr<ChromeProfileManagerStub> profile_manager_;
|
||||
scoped_refptr<extensions::EventRouterForwarder> event_router_forwarder_;
|
||||
std::unique_ptr<net_log::ChromeNetLog> net_log_;
|
||||
scoped_refptr<printing::PrintPreviewDialogController>
|
||||
print_preview_dialog_controller_;
|
||||
std::unique_ptr<printing::BackgroundPrintingManager>
|
||||
@ -125,6 +121,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
// Must be destroyed after |local_state_|.
|
||||
std::unique_ptr<policy::ChromeBrowserPolicyConnector>
|
||||
browser_policy_connector_;
|
||||
std::unique_ptr<base::FieldTrialList> field_trial_list_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(ChromeBrowserProcessStub);
|
||||
};
|
||||
|
@ -12,6 +12,14 @@ ChromeProfileStub::ChromeProfileStub() {}
|
||||
|
||||
ChromeProfileStub::~ChromeProfileStub() {}
|
||||
|
||||
bool ChromeProfileStub::IsOffTheRecord() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ChromeProfileStub::IsOffTheRecord() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
scoped_refptr<base::SequencedTaskRunner> ChromeProfileStub::GetIOTaskRunner() {
|
||||
NOTREACHED();
|
||||
return scoped_refptr<base::SequencedTaskRunner>();
|
||||
@ -70,12 +78,6 @@ PrefService* ChromeProfileStub::GetOffTheRecordPrefs() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
base::OnceCallback<net::CookieStore*()>
|
||||
ChromeProfileStub::GetExtensionsCookieStoreGetter() {
|
||||
NOTREACHED();
|
||||
return base::OnceCallback<net::CookieStore*()>();
|
||||
}
|
||||
|
||||
bool ChromeProfileStub::IsSameProfile(Profile* profile) {
|
||||
NOTREACHED();
|
||||
return false;
|
||||
@ -106,6 +108,10 @@ bool ChromeProfileStub::WasCreatedByVersionOrLater(const std::string& version) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ChromeProfileStub::IsIndependentOffTheRecordProfile() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void ChromeProfileStub::SetExitType(ExitType exit_type) {
|
||||
NOTREACHED();
|
||||
}
|
||||
|
@ -20,6 +20,8 @@ class ChromeProfileStub : public Profile {
|
||||
|
||||
protected:
|
||||
// Profile methods.
|
||||
bool IsOffTheRecord() override;
|
||||
bool IsOffTheRecord() const override;
|
||||
scoped_refptr<base::SequencedTaskRunner> GetIOTaskRunner() override;
|
||||
std::string GetProfileUserName() const override;
|
||||
ProfileType GetProfileType() const override;
|
||||
@ -33,14 +35,13 @@ class ChromeProfileStub : public Profile {
|
||||
bool IsLegacySupervised() const override;
|
||||
ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override;
|
||||
PrefService* GetOffTheRecordPrefs() override;
|
||||
base::OnceCallback<net::CookieStore*()> GetExtensionsCookieStoreGetter()
|
||||
override;
|
||||
bool IsSameProfile(Profile* profile) override;
|
||||
base::Time GetStartTime() const override;
|
||||
base::FilePath last_selected_directory() override;
|
||||
void set_last_selected_directory(const base::FilePath& path) override;
|
||||
GURL GetHomePage() override;
|
||||
bool WasCreatedByVersionOrLater(const std::string& version) override;
|
||||
bool IsIndependentOffTheRecordProfile() override;
|
||||
void SetExitType(ExitType exit_type) override;
|
||||
ExitType GetLastSessionExitType() override;
|
||||
|
||||
|
@ -75,7 +75,7 @@
|
||||
#include "components/services/heap_profiling/heap_profiling_service.h"
|
||||
#include "components/services/heap_profiling/public/mojom/constants.mojom.h"
|
||||
#include "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h"
|
||||
#include "components/services/pdf_compositor/public/interfaces/pdf_compositor.mojom.h"
|
||||
#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h"
|
||||
#include "components/version_info/version_info.h"
|
||||
#include "content/browser/frame_host/navigation_handle_impl.h"
|
||||
#include "content/browser/frame_host/render_frame_host_impl.h"
|
||||
@ -116,7 +116,6 @@
|
||||
#include "net/ssl/ssl_cert_request_info.h"
|
||||
#include "ppapi/host/ppapi_host.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "services/proxy_resolver/proxy_resolver_service.h"
|
||||
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
|
||||
#include "services/service_manager/embedder/switches.h"
|
||||
#include "services/service_manager/public/mojom/connector.mojom.h"
|
||||
@ -723,12 +722,6 @@ void CefContentBrowserClient::RunServiceInstance(
|
||||
std::make_unique<printing::PrintingService>(std::move(*receiver)));
|
||||
return;
|
||||
}
|
||||
if (service_name == proxy_resolver::mojom::kProxyResolverServiceName) {
|
||||
service_manager::Service::RunAsyncUntilTermination(
|
||||
std::make_unique<proxy_resolver::ProxyResolverService>(
|
||||
std::move(*receiver)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RunServiceInstanceOnIOThread(
|
||||
@ -896,8 +889,7 @@ void CefContentBrowserClient::AdjustUtilityServiceProcessCommandLine(
|
||||
// On Mac, the video-capture and audio services require a CFRunLoop, provided
|
||||
// by a UI message loop, to run AVFoundation and CoreAudio code.
|
||||
// See https://crbug.com/834581
|
||||
if (identity.name() == video_capture::mojom::kServiceName ||
|
||||
identity.name() == audio::mojom::kServiceName)
|
||||
if (identity.name() == audio::mojom::kServiceName)
|
||||
command_line->AppendSwitch(switches::kMessageLoopTypeUi);
|
||||
#endif
|
||||
}
|
||||
@ -1022,7 +1014,7 @@ void CefContentBrowserClient::AllowCertificateError(
|
||||
}
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::SelectClientCertificate(
|
||||
base::OnceClosure CefContentBrowserClient::SelectClientCertificate(
|
||||
content::WebContents* web_contents,
|
||||
net::SSLCertRequestInfo* cert_request_info,
|
||||
net::ClientCertIdentityList client_certs,
|
||||
@ -1040,7 +1032,7 @@ void CefContentBrowserClient::SelectClientCertificate(
|
||||
|
||||
if (!handler.get()) {
|
||||
delegate->ContinueWithCertificate(nullptr, nullptr);
|
||||
return;
|
||||
return base::OnceClosure();
|
||||
}
|
||||
|
||||
CefRequestHandler::X509CertificateList certs;
|
||||
@ -1060,6 +1052,7 @@ void CefContentBrowserClient::SelectClientCertificate(
|
||||
if (!proceed && !certs.empty()) {
|
||||
callbackImpl->Select(certs[0]);
|
||||
}
|
||||
return base::OnceClosure();
|
||||
}
|
||||
|
||||
bool CefContentBrowserClient::CanCreateWindow(
|
||||
@ -1154,11 +1147,10 @@ CefContentBrowserClient::CreateThrottlesForNavigation(
|
||||
std::vector<std::unique_ptr<content::URLLoaderThrottle>>
|
||||
CefContentBrowserClient::CreateURLLoaderThrottles(
|
||||
const network::ResourceRequest& request,
|
||||
content::ResourceContext* resource_context,
|
||||
content::BrowserContext* resource_context,
|
||||
const base::RepeatingCallback<content::WebContents*()>& wc_getter,
|
||||
content::NavigationUIData* navigation_ui_data,
|
||||
int frame_tree_node_id) {
|
||||
CEF_REQUIRE_IOT();
|
||||
std::vector<std::unique_ptr<content::URLLoaderThrottle>> result;
|
||||
|
||||
// Used to substitute View ID for PDF contents when using the PDF plugin.
|
||||
@ -1308,15 +1300,20 @@ bool CefContentBrowserClient::WillCreateURLLoaderFactory(
|
||||
bool is_navigation,
|
||||
bool is_download,
|
||||
const url::Origin& request_initiator,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
|
||||
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
|
||||
bool* bypass_redirect_checks) {
|
||||
auto request_handler = net_service::CreateInterceptedRequestHandler(
|
||||
browser_context, frame, render_process_id, is_navigation, is_download,
|
||||
request_initiator);
|
||||
|
||||
auto proxied_receiver = std::move(*factory_receiver);
|
||||
network::mojom::URLLoaderFactoryPtrInfo target_factory_info;
|
||||
*factory_receiver = mojo::MakeRequest(&target_factory_info);
|
||||
|
||||
net_service::ProxyURLLoaderFactory::CreateProxy(
|
||||
browser_context, factory_request, header_client,
|
||||
browser_context, std::move(proxied_receiver),
|
||||
std::move(target_factory_info), header_client,
|
||||
std::move(request_handler));
|
||||
return true;
|
||||
}
|
||||
@ -1371,8 +1368,7 @@ bool CefContentBrowserClient::HandleExternalProtocol(
|
||||
bool is_main_frame,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory) {
|
||||
network::mojom::URLLoaderFactoryPtr* out_factory) {
|
||||
// Call the other HandleExternalProtocol variant.
|
||||
return false;
|
||||
}
|
||||
@ -1381,33 +1377,54 @@ bool CefContentBrowserClient::HandleExternalProtocol(
|
||||
content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
|
||||
int frame_tree_node_id,
|
||||
content::NavigationUIData* navigation_data,
|
||||
const network::ResourceRequest& request,
|
||||
const network::ResourceRequest& resource_request,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory) {
|
||||
network::mojom::URLLoaderFactoryPtr* out_factory) {
|
||||
auto request = mojo::MakeRequest(out_factory);
|
||||
// CefBrowserPlatformDelegate::HandleExternalProtocol may be called if
|
||||
// nothing handles the request.
|
||||
auto request_handler = net_service::CreateInterceptedRequestHandler(
|
||||
web_contents_getter, frame_tree_node_id, request);
|
||||
out_factory = net_service::ProxyURLLoaderFactory::CreateProxy(
|
||||
web_contents_getter, factory_request, std::move(request_handler));
|
||||
if (CEF_CURRENTLY_ON_IOT()) {
|
||||
auto request_handler = net_service::CreateInterceptedRequestHandler(
|
||||
web_contents_getter, frame_tree_node_id, resource_request);
|
||||
net_service::ProxyURLLoaderFactory::CreateProxy(
|
||||
web_contents_getter, std::move(request), std::move(request_handler));
|
||||
} else {
|
||||
auto request_handler = net_service::CreateInterceptedRequestHandler(
|
||||
web_contents_getter, frame_tree_node_id, resource_request);
|
||||
CEF_POST_TASK(CEF_IOT,
|
||||
base::BindOnce(
|
||||
[](network::mojom::URLLoaderFactoryRequest request,
|
||||
std::unique_ptr<net_service::InterceptedRequestHandler>
|
||||
request_handler,
|
||||
content::ResourceRequestInfo::WebContentsGetter
|
||||
web_contents_getter) {
|
||||
// Manages its own lifetime.
|
||||
|
||||
net_service::ProxyURLLoaderFactory::CreateProxy(
|
||||
web_contents_getter, std::move(request),
|
||||
std::move(request_handler));
|
||||
},
|
||||
std::move(request), std::move(request_handler),
|
||||
std::move(web_contents_getter)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string CefContentBrowserClient::GetProduct() const {
|
||||
std::string CefContentBrowserClient::GetProduct() {
|
||||
// Match the logic in chrome_content_browser_client.cc GetProduct().
|
||||
return ::GetProduct();
|
||||
}
|
||||
|
||||
std::string CefContentBrowserClient::GetChromeProduct() const {
|
||||
std::string CefContentBrowserClient::GetChromeProduct() {
|
||||
return version_info::GetProductNameAndVersionForUserAgent();
|
||||
}
|
||||
|
||||
std::string CefContentBrowserClient::GetUserAgent() const {
|
||||
std::string CefContentBrowserClient::GetUserAgent() {
|
||||
// Match the logic in chrome_content_browser_client.cc GetUserAgent().
|
||||
return ::GetUserAgent();
|
||||
}
|
||||
|
||||
blink::UserAgentMetadata CefContentBrowserClient::GetUserAgentMetadata() const {
|
||||
blink::UserAgentMetadata CefContentBrowserClient::GetUserAgentMetadata() {
|
||||
blink::UserAgentMetadata metadata;
|
||||
|
||||
metadata.brand = version_info::GetProductName();
|
||||
|
@ -101,7 +101,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(content::CertificateRequestResultType)>&
|
||||
callback) override;
|
||||
void SelectClientCertificate(
|
||||
base::OnceClosure SelectClientCertificate(
|
||||
content::WebContents* web_contents,
|
||||
net::SSLCertRequestInfo* cert_request_info,
|
||||
net::ClientCertIdentityList client_certs,
|
||||
@ -131,7 +131,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
std::vector<std::unique_ptr<content::URLLoaderThrottle>>
|
||||
CreateURLLoaderThrottles(
|
||||
const network::ResourceRequest& request,
|
||||
content::ResourceContext* resource_context,
|
||||
content::BrowserContext* resource_context,
|
||||
const base::RepeatingCallback<content::WebContents*()>& wc_getter,
|
||||
content::NavigationUIData* navigation_ui_data,
|
||||
int frame_tree_node_id) override;
|
||||
@ -177,7 +177,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool is_navigation,
|
||||
bool is_download,
|
||||
const url::Origin& request_initiator,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
|
||||
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
|
||||
bool* bypass_redirect_checks) override;
|
||||
void OnNetworkServiceCreated(
|
||||
@ -195,19 +195,19 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool is_main_frame,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory) override;
|
||||
network::mojom::URLLoaderFactoryPtr* out_factory) override;
|
||||
bool HandleExternalProtocol(
|
||||
content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
|
||||
int frame_tree_node_id,
|
||||
content::NavigationUIData* navigation_data,
|
||||
const network::ResourceRequest& request,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory) override;
|
||||
std::string GetProduct() const override;
|
||||
std::string GetChromeProduct() const override;
|
||||
std::string GetUserAgent() const override;
|
||||
blink::UserAgentMetadata GetUserAgentMetadata() const override;
|
||||
network::mojom::URLLoaderFactoryPtr* out_factory) override;
|
||||
|
||||
std::string GetProduct() override;
|
||||
std::string GetChromeProduct() override;
|
||||
std::string GetUserAgent() override;
|
||||
blink::UserAgentMetadata GetUserAgentMetadata() override;
|
||||
base::flat_set<std::string> GetPluginMimeTypesWithExternalHandlers(
|
||||
content::ResourceContext* resource_context) override;
|
||||
|
||||
|
@ -389,8 +389,7 @@ void CefDownloadManagerDelegate::GetNextId(
|
||||
callback.Run(next_id++);
|
||||
}
|
||||
|
||||
std::string CefDownloadManagerDelegate::ApplicationClientIdForFileScanning()
|
||||
const {
|
||||
std::string CefDownloadManagerDelegate::ApplicationClientIdForFileScanning() {
|
||||
const CefSettings& settings = CefContext::Get()->settings();
|
||||
if (settings.application_client_id_for_file_scanning.length > 0) {
|
||||
return CefString(&settings.application_client_id_for_file_scanning)
|
||||
|
@ -39,7 +39,7 @@ class CefDownloadManagerDelegate : public download::DownloadItem::Observer,
|
||||
download::DownloadItem* item,
|
||||
const content::DownloadTargetCallback& callback) override;
|
||||
void GetNextId(const content::DownloadIdCallback& callback) override;
|
||||
std::string ApplicationClientIdForFileScanning() const override;
|
||||
std::string ApplicationClientIdForFileScanning() override;
|
||||
|
||||
// CefBrowserHostImpl::Observer methods.
|
||||
void OnBrowserDestroyed(CefBrowserHostImpl* browser) override;
|
||||
|
@ -55,7 +55,7 @@ void CefComponentExtensionResourceManager::AddComponentResourceEntries(
|
||||
base::FilePath().AppendASCII(entries[i].name);
|
||||
resource_path = resource_path.NormalizePathSeparators();
|
||||
|
||||
DCHECK(!base::ContainsKey(path_to_resource_info_, resource_path));
|
||||
DCHECK(!base::Contains(path_to_resource_info_, resource_path));
|
||||
path_to_resource_info_[resource_path] = entries[i].value;
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
@ -51,7 +52,7 @@ void CefExtensionHostDelegate::ProcessMediaAccessRequest(
|
||||
bool CefExtensionHostDelegate::CheckMediaAccessPermission(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
const GURL& security_origin,
|
||||
blink::MediaStreamType type,
|
||||
blink::mojom::MediaStreamType type,
|
||||
const Extension* extension) {
|
||||
// Never routed here from CefBrowserHostImpl.
|
||||
NOTREACHED();
|
||||
@ -62,12 +63,12 @@ ExtensionHostQueue* CefExtensionHostDelegate::GetExtensionHostQueue() const {
|
||||
return CefExtensionsBrowserClient::Get()->GetExtensionHostQueue();
|
||||
}
|
||||
|
||||
gfx::Size CefExtensionHostDelegate::EnterPictureInPicture(
|
||||
content::PictureInPictureResult CefExtensionHostDelegate::EnterPictureInPicture(
|
||||
content::WebContents* web_contents,
|
||||
const viz::SurfaceId& surface_id,
|
||||
const gfx::Size& natural_size) {
|
||||
NOTREACHED();
|
||||
return gfx::Size();
|
||||
return content::PictureInPictureResult::kNotSupported;
|
||||
}
|
||||
|
||||
void CefExtensionHostDelegate::ExitPictureInPicture() {
|
||||
|
@ -32,12 +32,13 @@ class CefExtensionHostDelegate : public ExtensionHostDelegate {
|
||||
const Extension* extension) override;
|
||||
bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host,
|
||||
const GURL& security_origin,
|
||||
blink::MediaStreamType type,
|
||||
blink::mojom::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;
|
||||
content::PictureInPictureResult EnterPictureInPicture(
|
||||
content::WebContents* web_contents,
|
||||
const viz::SurfaceId& surface_id,
|
||||
const gfx::Size& natural_size) override;
|
||||
void ExitPictureInPicture() override;
|
||||
|
||||
private:
|
||||
|
@ -366,10 +366,6 @@ void CefExtensionSystem::InitForRegularProfile(bool extensions_enabled) {
|
||||
app_sorting_.reset(new NullAppSorting);
|
||||
}
|
||||
|
||||
void CefExtensionSystem::InitForIncognitoProfile() {
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
ExtensionService* CefExtensionSystem::extension_service() {
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -89,7 +89,6 @@ class CefExtensionSystem : public ExtensionSystem {
|
||||
|
||||
// ExtensionSystem implementation:
|
||||
void InitForRegularProfile(bool extensions_enabled) override;
|
||||
void InitForIncognitoProfile() override;
|
||||
ExtensionService* extension_service() override;
|
||||
RuntimeData* runtime_data() override;
|
||||
ManagementPolicy* management_policy() override;
|
||||
|
@ -107,17 +107,6 @@ bool CefExtensionsBrowserClient::CanExtensionCrossIncognito(
|
||||
return false;
|
||||
}
|
||||
|
||||
net::URLRequestJob*
|
||||
CefExtensionsBrowserClient::MaybeCreateResourceBundleRequestJob(
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate,
|
||||
const base::FilePath& directory_path,
|
||||
const std::string& content_security_policy,
|
||||
bool send_cors_header) {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
base::FilePath CefExtensionsBrowserClient::GetBundleResourcePath(
|
||||
const network::ResourceRequest& request,
|
||||
const base::FilePath& extension_resources_path,
|
||||
|
@ -43,12 +43,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||
bool CanExtensionCrossIncognito(
|
||||
const Extension* extension,
|
||||
content::BrowserContext* context) const override;
|
||||
net::URLRequestJob* MaybeCreateResourceBundleRequestJob(
|
||||
net::URLRequest* request,
|
||||
net::NetworkDelegate* network_delegate,
|
||||
const base::FilePath& directory_path,
|
||||
const std::string& content_security_policy,
|
||||
bool send_cors_header) override;
|
||||
base::FilePath GetBundleResourcePath(
|
||||
const network::ResourceRequest& request,
|
||||
const base::FilePath& extension_resources_path,
|
||||
|
@ -103,7 +103,7 @@ void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
|
||||
int render_frame_id,
|
||||
int page_request_id,
|
||||
const GURL& security_origin,
|
||||
blink::MediaStreamType stream_type,
|
||||
blink::mojom::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,
|
||||
blink::MediaStreamType stream_type,
|
||||
blink::mojom::MediaStreamType stream_type,
|
||||
bool is_secure) {}
|
||||
|
||||
const MediaStreamDevices&
|
||||
|
@ -47,14 +47,14 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
|
||||
int render_frame_id,
|
||||
int page_request_id,
|
||||
const GURL& security_origin,
|
||||
blink::MediaStreamType stream_type,
|
||||
blink::mojom::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,
|
||||
blink::MediaStreamType stream_type,
|
||||
blink::mojom::MediaStreamType stream_type,
|
||||
bool is_secure) override;
|
||||
|
||||
private:
|
||||
|
@ -50,7 +50,8 @@ void CefWindowDelegateView::Init(gfx::AcceleratedWidget parent_widget,
|
||||
// CefBrowserHostImpl::PlatformSetFocus.
|
||||
params.activatable = views::Widget::InitParams::ACTIVATABLE_YES;
|
||||
|
||||
params.keep_on_top = always_on_top_;
|
||||
params.z_order = always_on_top_ ? ui::ZOrderLevel::kFloatingWindow
|
||||
: ui::ZOrderLevel::kNormal;
|
||||
|
||||
// Results in a call to InitContent().
|
||||
widget->Init(params);
|
||||
|
@ -458,7 +458,7 @@ class CefURLDataSource : public content::URLDataSource {
|
||||
~CefURLDataSource() override = default;
|
||||
|
||||
// content::URLDataSource implementation.
|
||||
std::string GetSource() const override { return host_; }
|
||||
std::string GetSource() override { return host_; }
|
||||
|
||||
void StartDataRequest(
|
||||
const std::string& path,
|
||||
@ -467,11 +467,11 @@ class CefURLDataSource : public content::URLDataSource {
|
||||
callback.Run(output_);
|
||||
}
|
||||
|
||||
std::string GetMimeType(const std::string& path) const override {
|
||||
std::string GetMimeType(const std::string& path) override {
|
||||
return mime_type_;
|
||||
}
|
||||
|
||||
bool AllowCaching() const override { return false; }
|
||||
bool AllowCaching() override { return false; }
|
||||
|
||||
private:
|
||||
const std::string host_;
|
||||
@ -531,7 +531,7 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory {
|
||||
|
||||
std::unique_ptr<content::WebUIController> CreateWebUIControllerForURL(
|
||||
content::WebUI* web_ui,
|
||||
const GURL& url) const override {
|
||||
const GURL& url) override {
|
||||
std::unique_ptr<content::WebUIController> controller;
|
||||
if (!AllowWebUIForURL(url))
|
||||
return controller;
|
||||
@ -551,7 +551,7 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory {
|
||||
}
|
||||
|
||||
content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
|
||||
const GURL& url) const override {
|
||||
const GURL& url) override {
|
||||
content::WebUI::TypeID type = content::WebUI::kNoWebUI;
|
||||
if (!AllowWebUIForURL(url))
|
||||
return type;
|
||||
@ -575,7 +575,7 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory {
|
||||
}
|
||||
|
||||
bool UseWebUIForURL(content::BrowserContext* browser_context,
|
||||
const GURL& url) const override {
|
||||
const GURL& url) override {
|
||||
if (!AllowWebUIForURL(url))
|
||||
return false;
|
||||
|
||||
@ -595,7 +595,7 @@ class CefWebUIControllerFactory : public content::WebUIControllerFactory {
|
||||
}
|
||||
|
||||
bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
|
||||
const GURL& url) const override {
|
||||
const GURL& url) override {
|
||||
if (!AllowWebUIForURL(url))
|
||||
return false;
|
||||
|
||||
|
@ -274,7 +274,7 @@ class CefBrowserURLRequest::Context
|
||||
}
|
||||
|
||||
loader_ = network::SimpleURLLoader::Create(std::move(resource_request),
|
||||
NO_TRAFFIC_ANNOTATION_YET);
|
||||
MISSING_TRAFFIC_ANNOTATION);
|
||||
|
||||
// Associate the request with |request_id|.
|
||||
request_id_ = request_id;
|
||||
|
@ -644,8 +644,8 @@ void InterceptedRequest::InterceptResponseReceived(
|
||||
network::cors::header_names::kAccessControlAllowOrigin, origin));
|
||||
}
|
||||
|
||||
if (request_.fetch_credentials_mode ==
|
||||
network::mojom::FetchCredentialsMode::kInclude) {
|
||||
if (request_.credentials_mode ==
|
||||
network::mojom::CredentialsMode::kInclude) {
|
||||
head.headers->AddHeader(MakeHeader(
|
||||
network::cors::header_names::kAccessControlAllowCredentials, "true"));
|
||||
}
|
||||
@ -1045,9 +1045,11 @@ ProxyURLLoaderFactory::ProxyURLLoaderFactory(
|
||||
DCHECK(request_handler_);
|
||||
|
||||
// Actual creation of the factory.
|
||||
target_factory_.Bind(std::move(target_factory_info));
|
||||
target_factory_.set_connection_error_handler(base::BindOnce(
|
||||
&ProxyURLLoaderFactory::OnTargetFactoryError, base::Unretained(this)));
|
||||
if (target_factory_info) {
|
||||
target_factory_.Bind(std::move(target_factory_info));
|
||||
target_factory_.set_connection_error_handler(base::BindOnce(
|
||||
&ProxyURLLoaderFactory::OnTargetFactoryError, base::Unretained(this)));
|
||||
}
|
||||
proxy_bindings_.AddBinding(this, std::move(loader_request));
|
||||
proxy_bindings_.set_connection_error_handler(base::BindRepeating(
|
||||
&ProxyURLLoaderFactory::OnProxyBindingError, base::Unretained(this)));
|
||||
@ -1085,16 +1087,13 @@ void ProxyURLLoaderFactory::SetDisconnectCallback(
|
||||
// static
|
||||
void ProxyURLLoaderFactory::CreateProxy(
|
||||
content::BrowserContext* browser_context,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactoryRequest loader_request,
|
||||
network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
|
||||
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
|
||||
std::unique_ptr<InterceptedRequestHandler> request_handler) {
|
||||
CEF_REQUIRE_UIT();
|
||||
DCHECK(request_handler);
|
||||
|
||||
auto proxied_request = std::move(*factory_request);
|
||||
network::mojom::URLLoaderFactoryPtrInfo target_factory_info;
|
||||
*factory_request = mojo::MakeRequest(&target_factory_info);
|
||||
|
||||
network::mojom::TrustedURLLoaderHeaderClientRequest header_client_request;
|
||||
if (header_client)
|
||||
header_client_request = mojo::MakeRequest(header_client);
|
||||
@ -1106,7 +1105,7 @@ void ProxyURLLoaderFactory::CreateProxy(
|
||||
CEF_POST_TASK(
|
||||
CEF_IOT,
|
||||
base::BindOnce(
|
||||
&ProxyURLLoaderFactory::CreateOnIOThread, std::move(proxied_request),
|
||||
&ProxyURLLoaderFactory::CreateOnIOThread, std::move(loader_request),
|
||||
std::move(target_factory_info), std::move(header_client_request),
|
||||
base::Unretained(resource_context), std::move(request_handler)));
|
||||
}
|
||||
@ -1114,17 +1113,12 @@ void ProxyURLLoaderFactory::CreateProxy(
|
||||
// static
|
||||
ProxyURLLoaderFactory* ProxyURLLoaderFactory::CreateProxy(
|
||||
content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactoryRequest loader_request,
|
||||
std::unique_ptr<InterceptedRequestHandler> request_handler) {
|
||||
CEF_REQUIRE_IOT();
|
||||
DCHECK(request_handler);
|
||||
|
||||
auto proxied_request = std::move(*factory_request);
|
||||
network::mojom::URLLoaderFactoryPtrInfo target_factory_info;
|
||||
*factory_request = mojo::MakeRequest(&target_factory_info);
|
||||
|
||||
auto proxy = new ProxyURLLoaderFactory(std::move(proxied_request),
|
||||
std::move(target_factory_info),
|
||||
auto proxy = new ProxyURLLoaderFactory(std::move(loader_request), nullptr,
|
||||
nullptr, std::move(request_handler));
|
||||
CEF_POST_TASK(CEF_UIT,
|
||||
base::BindOnce(ResourceContextData::AddProxyOnUIThread,
|
||||
@ -1141,7 +1135,6 @@ void ProxyURLLoaderFactory::CreateLoaderAndStart(
|
||||
network::mojom::URLLoaderClientPtr client,
|
||||
const net::MutableNetworkTrafficAnnotationTag& traffic_annotation) {
|
||||
CEF_REQUIRE_IOT();
|
||||
|
||||
if (!CONTEXT_STATE_VALID()) {
|
||||
// Don't start a request while we're shutting down.
|
||||
return;
|
||||
@ -1157,7 +1150,8 @@ void ProxyURLLoaderFactory::CreateLoaderAndStart(
|
||||
}
|
||||
|
||||
network::mojom::URLLoaderFactoryPtr target_factory_clone;
|
||||
target_factory_->Clone(MakeRequest(&target_factory_clone));
|
||||
if (target_factory_)
|
||||
target_factory_->Clone(MakeRequest(&target_factory_clone));
|
||||
|
||||
InterceptedRequest* req = new InterceptedRequest(
|
||||
this, RequestId(request_id, routing_id), options, request,
|
||||
|
@ -137,14 +137,15 @@ class ProxyURLLoaderFactory
|
||||
// Create a proxy object on the UI thread.
|
||||
static void CreateProxy(
|
||||
content::BrowserContext* browser_context,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactoryRequest loader_request,
|
||||
network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
|
||||
network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
|
||||
std::unique_ptr<InterceptedRequestHandler> request_handler);
|
||||
|
||||
// Create a proxy object on the IO thread.
|
||||
static ProxyURLLoaderFactory* CreateProxy(
|
||||
content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactoryRequest loader_request,
|
||||
std::unique_ptr<InterceptedRequestHandler> request_handler);
|
||||
|
||||
// mojom::URLLoaderFactory methods:
|
||||
|
@ -1303,7 +1303,6 @@ std::unique_ptr<InterceptedRequestHandler> CreateInterceptedRequestHandler(
|
||||
content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
|
||||
int frame_tree_node_id,
|
||||
const network::ResourceRequest& request) {
|
||||
CEF_REQUIRE_IOT();
|
||||
auto wrapper = std::make_unique<InterceptedRequestHandlerWrapper>();
|
||||
CEF_POST_TASK(CEF_UIT, base::BindOnce(InitOnUIThread, wrapper->init_helper(),
|
||||
web_contents_getter, frame_tree_node_id,
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <queue>
|
||||
|
||||
#include "mojo/public/cpp/system/simple_watcher.h"
|
||||
#include "mojo/public/cpp/system/string_data_pipe_producer.h"
|
||||
#include "mojo/public/cpp/system/string_data_source.h"
|
||||
|
||||
namespace net_service {
|
||||
|
||||
@ -39,7 +39,7 @@ class ResponseFilterWrapper {
|
||||
mojo::ScopedDataPipeConsumerHandle source_handle_;
|
||||
base::OnceClosure error_callback_;
|
||||
|
||||
std::unique_ptr<mojo::StringDataPipeProducer> forwarder_;
|
||||
std::unique_ptr<mojo::DataPipeProducer> forwarder_;
|
||||
mojo::SimpleWatcher source_watcher_;
|
||||
|
||||
bool read_pending_ = false;
|
||||
@ -73,8 +73,8 @@ bool ResponseFilterWrapper::CreateOutputHandle(
|
||||
return false;
|
||||
}
|
||||
|
||||
forwarder_ = std::make_unique<mojo::StringDataPipeProducer>(
|
||||
std::move(forwarding_handle));
|
||||
forwarder_ =
|
||||
std::make_unique<mojo::DataPipeProducer>(std::move(forwarding_handle));
|
||||
|
||||
source_watcher_.Watch(
|
||||
source_handle_.get(),
|
||||
@ -213,9 +213,9 @@ void ResponseFilterWrapper::Write(std::unique_ptr<std::string> data) {
|
||||
write_pending_ = true;
|
||||
|
||||
base::StringPiece string_piece(*data);
|
||||
forwarder_->Write(string_piece,
|
||||
mojo::StringDataPipeProducer::AsyncWritingMode::
|
||||
STRING_STAYS_VALID_UNTIL_COMPLETION,
|
||||
forwarder_->Write(std::make_unique<mojo::StringDataSource>(
|
||||
string_piece, mojo::StringDataSource::AsyncWritingMode::
|
||||
STRING_STAYS_VALID_UNTIL_COMPLETION),
|
||||
base::BindOnce(&ResponseFilterWrapper::OnWriteComplete,
|
||||
base::Unretained(this), std::move(data)));
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ scoped_refptr<URLLoaderFactoryGetter> URLLoaderFactoryGetter::Create(
|
||||
// Create an intermediate pipe that can be used to proxy the request's
|
||||
// URLLoaderFactory.
|
||||
network::mojom::URLLoaderFactoryPtrInfo maybe_proxy_factory_ptr_info;
|
||||
network::mojom::URLLoaderFactoryRequest maybe_proxy_factory_request =
|
||||
MakeRequest(&maybe_proxy_factory_ptr_info);
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory>
|
||||
maybe_proxy_factory_request = MakeRequest(&maybe_proxy_factory_ptr_info);
|
||||
|
||||
bool should_proxy = false;
|
||||
int render_process_id = -1;
|
||||
|
@ -35,16 +35,15 @@ class CefLayeredWindowUpdaterOSR : public viz::mojom::LayeredWindowUpdater {
|
||||
gfx::Size GetPixelSize() const;
|
||||
|
||||
// viz::mojom::LayeredWindowUpdater implementation.
|
||||
void OnAllocatedSharedMemory(
|
||||
const gfx::Size& pixel_size,
|
||||
mojo::ScopedSharedBufferHandle scoped_buffer_handle) override;
|
||||
void OnAllocatedSharedMemory(const gfx::Size& pixel_size,
|
||||
base::UnsafeSharedMemoryRegion region) override;
|
||||
void Draw(const gfx::Rect& damage_rect, DrawCallback draw_callback) override;
|
||||
|
||||
private:
|
||||
CefRenderWidgetHostViewOSR* const view_;
|
||||
mojo::Binding<viz::mojom::LayeredWindowUpdater> binding_;
|
||||
bool active_ = false;
|
||||
base::ReadOnlySharedMemoryMapping shared_memory_;
|
||||
base::WritableSharedMemoryMapping shared_memory_;
|
||||
gfx::Size pixel_size_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefLayeredWindowUpdaterOSR);
|
||||
@ -71,7 +70,7 @@ gfx::Size CefLayeredWindowUpdaterOSR::GetPixelSize() const {
|
||||
|
||||
void CefLayeredWindowUpdaterOSR::OnAllocatedSharedMemory(
|
||||
const gfx::Size& pixel_size,
|
||||
mojo::ScopedSharedBufferHandle scoped_buffer_handle) {
|
||||
base::UnsafeSharedMemoryRegion region) {
|
||||
// Make sure |pixel_size| is sane.
|
||||
size_t expected_bytes;
|
||||
bool size_result = viz::ResourceSizes::MaybeSizeInBytes(
|
||||
@ -79,28 +78,8 @@ void CefLayeredWindowUpdaterOSR::OnAllocatedSharedMemory(
|
||||
if (!size_result)
|
||||
return;
|
||||
|
||||
#if !defined(OS_WIN)
|
||||
base::ReadOnlySharedMemoryRegion shm =
|
||||
mojo::UnwrapReadOnlySharedMemoryRegion(std::move(scoped_buffer_handle));
|
||||
if (!shm.IsValid()) {
|
||||
LOG(ERROR) << "Shared memory region is invalid";
|
||||
return;
|
||||
}
|
||||
#else // !defined(OS_WIN)
|
||||
base::SharedMemoryHandle shm_handle;
|
||||
MojoResult unwrap_result = mojo::UnwrapSharedMemoryHandle(
|
||||
std::move(scoped_buffer_handle), &shm_handle, nullptr, nullptr);
|
||||
if (unwrap_result != MOJO_RESULT_OK)
|
||||
return;
|
||||
|
||||
base::ReadOnlySharedMemoryRegion shm =
|
||||
base::ReadOnlySharedMemoryRegion::Deserialize(
|
||||
base::subtle::PlatformSharedMemoryRegion::TakeFromSharedMemoryHandle(
|
||||
shm_handle,
|
||||
base::subtle::PlatformSharedMemoryRegion::Mode::kReadOnly));
|
||||
#endif // !defined(OS_WIN)
|
||||
pixel_size_ = pixel_size;
|
||||
shared_memory_ = shm.Map();
|
||||
shared_memory_ = region.Map();
|
||||
DCHECK(shared_memory_.IsValid());
|
||||
}
|
||||
|
||||
|
@ -208,8 +208,11 @@ struct PopulateAxNodeAttributes {
|
||||
attributes->SetString(ToString(attr.first), ToString(state));
|
||||
}
|
||||
} break;
|
||||
case ax::mojom::IntAttribute::kAriaCellColumnSpan:
|
||||
case ax::mojom::IntAttribute::kAriaCellRowSpan:
|
||||
case ax::mojom::IntAttribute::kImageAnnotationStatus: {
|
||||
// TODO(cef): Implement support for Image Annotation Status
|
||||
// TODO(cef): Implement support for Image Annotation Status,
|
||||
// kAriaCellColumnSpan and kAriaCellRowSpan
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "media/base/video_frame.h"
|
||||
#include "ui/base/cursor/types/cursor_types.h"
|
||||
#include "ui/compositor/compositor.h"
|
||||
#include "ui/events/blink/blink_event_util.h"
|
||||
#include "ui/events/gesture_detection/gesture_provider_config_helper.h"
|
||||
@ -142,7 +143,7 @@ ui::LatencyInfo CreateLatencyInfo(const blink::WebInputEvent& event) {
|
||||
base::TimeTicks time = event.TimeStamp();
|
||||
if (!time.is_null()) {
|
||||
latency_info.AddLatencyNumberWithTimestamp(
|
||||
ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, time, 1);
|
||||
ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, time);
|
||||
}
|
||||
return latency_info;
|
||||
}
|
||||
@ -520,7 +521,7 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
|
||||
const cef_cursor_type_t cursor_type =
|
||||
static_cast<cef_cursor_type_t>(cursor_info.type);
|
||||
CefCursorInfo custom_cursor_info;
|
||||
if (cursor_info.type == blink::WebCursorInfo::kTypeCustom) {
|
||||
if (cursor_info.type == ui::CursorType::kCustom) {
|
||||
custom_cursor_info.hotspot.x = cursor_info.hotspot.x();
|
||||
custom_cursor_info.hotspot.y = cursor_info.hotspot.y();
|
||||
custom_cursor_info.image_scale_factor = cursor_info.image_scale_factor;
|
||||
@ -533,7 +534,7 @@ void CefRenderWidgetHostViewOSR::UpdateCursor(
|
||||
content::WebCursor web_cursor(cursor_info);
|
||||
|
||||
ui::PlatformCursor platform_cursor;
|
||||
if (cursor_info.type == blink::WebCursorInfo::kTypeCustom) {
|
||||
if (cursor_info.type == ui::CursorType::kCustom) {
|
||||
ui::Cursor ui_cursor(ui::CursorType::kCustom);
|
||||
SkBitmap bitmap;
|
||||
gfx::Point hotspot;
|
||||
@ -821,24 +822,6 @@ void CefRenderWidgetHostViewOSR::SetWantsAnimateOnlyBeginFrames() {
|
||||
}
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::TransformPointToLocalCoordSpaceLegacy(
|
||||
const gfx::PointF& point,
|
||||
const viz::SurfaceId& original_surface,
|
||||
gfx::PointF* transformed_point) {
|
||||
// Transformations use physical pixels rather than DIP, so conversion
|
||||
// is necessary.
|
||||
gfx::PointF point_in_pixels =
|
||||
gfx::ConvertPointToPixel(current_device_scale_factor_, point);
|
||||
if (!GetDelegatedFrameHost()->TransformPointToLocalCoordSpaceLegacy(
|
||||
point_in_pixels, original_surface, transformed_point)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*transformed_point =
|
||||
gfx::ConvertPointToDIP(current_device_scale_factor_, *transformed_point);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefRenderWidgetHostViewOSR::TransformPointToCoordSpaceForView(
|
||||
const gfx::PointF& point,
|
||||
RenderWidgetHostViewBase* target_view,
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "content/browser/renderer_host/render_widget_host_view_base.h"
|
||||
#include "content/browser/renderer_host/text_input_manager.h"
|
||||
#include "content/public/common/widget_type.h"
|
||||
#include "ui/base/cursor/types/cursor_types.h"
|
||||
#include "ui/compositor/compositor.h"
|
||||
#include "ui/compositor/external_begin_frame_client.h"
|
||||
#include "ui/events/base_event_utils.h"
|
||||
@ -175,10 +176,6 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
CreateSyntheticGestureTarget() override;
|
||||
void SetNeedsBeginFrames(bool enabled) override;
|
||||
void SetWantsAnimateOnlyBeginFrames() override;
|
||||
bool TransformPointToLocalCoordSpaceLegacy(
|
||||
const gfx::PointF& point,
|
||||
const viz::SurfaceId& original_surface,
|
||||
gfx::PointF* transformed_point) override;
|
||||
bool TransformPointToCoordSpaceForView(
|
||||
const gfx::PointF& point,
|
||||
RenderWidgetHostViewBase* target_view,
|
||||
@ -304,7 +301,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
void UpdateBackgroundColorFromRenderer(SkColor color);
|
||||
|
||||
#if defined(USE_AURA)
|
||||
ui::PlatformCursor GetPlatformCursor(blink::WebCursorInfo::Type type);
|
||||
ui::PlatformCursor GetPlatformCursor(ui::CursorType type);
|
||||
#endif
|
||||
|
||||
// The background color of the web content.
|
||||
|
@ -25,94 +25,108 @@ namespace {
|
||||
|
||||
using blink::WebCursorInfo;
|
||||
|
||||
int ToCursorID(WebCursorInfo::Type type) {
|
||||
int ToCursorID(ui::CursorType type) {
|
||||
switch (type) {
|
||||
case WebCursorInfo::kTypePointer:
|
||||
case ui::CursorType::kPointer:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeCross:
|
||||
case ui::CursorType::kCross:
|
||||
return XC_crosshair;
|
||||
case WebCursorInfo::kTypeHand:
|
||||
case ui::CursorType::kHand:
|
||||
return XC_hand2;
|
||||
case WebCursorInfo::kTypeIBeam:
|
||||
case ui::CursorType::kIBeam:
|
||||
return XC_xterm;
|
||||
case WebCursorInfo::kTypeWait:
|
||||
case ui::CursorType::kWait:
|
||||
return XC_watch;
|
||||
case WebCursorInfo::kTypeHelp:
|
||||
case ui::CursorType::kHelp:
|
||||
return XC_question_arrow;
|
||||
case WebCursorInfo::kTypeEastResize:
|
||||
case ui::CursorType::kEastResize:
|
||||
return XC_right_side;
|
||||
case WebCursorInfo::kTypeNorthResize:
|
||||
case ui::CursorType::kNorthResize:
|
||||
return XC_top_side;
|
||||
case WebCursorInfo::kTypeNorthEastResize:
|
||||
case ui::CursorType::kNorthEastResize:
|
||||
return XC_top_right_corner;
|
||||
case WebCursorInfo::kTypeNorthWestResize:
|
||||
case ui::CursorType::kNorthWestResize:
|
||||
return XC_top_left_corner;
|
||||
case WebCursorInfo::kTypeSouthResize:
|
||||
case ui::CursorType::kSouthResize:
|
||||
return XC_bottom_side;
|
||||
case WebCursorInfo::kTypeSouthEastResize:
|
||||
case ui::CursorType::kSouthEastResize:
|
||||
return XC_bottom_right_corner;
|
||||
case WebCursorInfo::kTypeSouthWestResize:
|
||||
case ui::CursorType::kSouthWestResize:
|
||||
return XC_bottom_left_corner;
|
||||
case WebCursorInfo::kTypeWestResize:
|
||||
case ui::CursorType::kWestResize:
|
||||
return XC_left_side;
|
||||
case WebCursorInfo::kTypeNorthSouthResize:
|
||||
case ui::CursorType::kNorthSouthResize:
|
||||
return XC_sb_v_double_arrow;
|
||||
case WebCursorInfo::kTypeEastWestResize:
|
||||
case ui::CursorType::kEastWestResize:
|
||||
return XC_sb_h_double_arrow;
|
||||
case WebCursorInfo::kTypeNorthEastSouthWestResize:
|
||||
case ui::CursorType::kNorthEastSouthWestResize:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeNorthWestSouthEastResize:
|
||||
case ui::CursorType::kNorthWestSouthEastResize:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeColumnResize:
|
||||
case ui::CursorType::kColumnResize:
|
||||
return XC_sb_h_double_arrow;
|
||||
case WebCursorInfo::kTypeRowResize:
|
||||
case ui::CursorType::kRowResize:
|
||||
return XC_sb_v_double_arrow;
|
||||
case WebCursorInfo::kTypeMiddlePanning:
|
||||
case ui::CursorType::kMiddlePanning:
|
||||
return XC_fleur;
|
||||
case WebCursorInfo::kTypeEastPanning:
|
||||
case ui::CursorType::kEastPanning:
|
||||
return XC_sb_right_arrow;
|
||||
case WebCursorInfo::kTypeNorthPanning:
|
||||
case ui::CursorType::kNorthPanning:
|
||||
return XC_sb_up_arrow;
|
||||
case WebCursorInfo::kTypeNorthEastPanning:
|
||||
case ui::CursorType::kNorthEastPanning:
|
||||
return XC_top_right_corner;
|
||||
case WebCursorInfo::kTypeNorthWestPanning:
|
||||
case ui::CursorType::kNorthWestPanning:
|
||||
return XC_top_left_corner;
|
||||
case WebCursorInfo::kTypeSouthPanning:
|
||||
case ui::CursorType::kSouthPanning:
|
||||
return XC_sb_down_arrow;
|
||||
case WebCursorInfo::kTypeSouthEastPanning:
|
||||
case ui::CursorType::kSouthEastPanning:
|
||||
return XC_bottom_right_corner;
|
||||
case WebCursorInfo::kTypeSouthWestPanning:
|
||||
case ui::CursorType::kSouthWestPanning:
|
||||
return XC_bottom_left_corner;
|
||||
case WebCursorInfo::kTypeWestPanning:
|
||||
case ui::CursorType::kWestPanning:
|
||||
return XC_sb_left_arrow;
|
||||
case WebCursorInfo::kTypeMove:
|
||||
case ui::CursorType::kMove:
|
||||
return XC_fleur;
|
||||
case WebCursorInfo::kTypeVerticalText:
|
||||
case ui::CursorType::kVerticalText:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeCell:
|
||||
case ui::CursorType::kCell:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeContextMenu:
|
||||
case ui::CursorType::kContextMenu:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeAlias:
|
||||
case ui::CursorType::kAlias:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeProgress:
|
||||
case ui::CursorType::kProgress:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeNoDrop:
|
||||
case ui::CursorType::kNoDrop:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeCopy:
|
||||
case ui::CursorType::kCopy:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeNotAllowed:
|
||||
case ui::CursorType::kNotAllowed:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeZoomIn:
|
||||
case ui::CursorType::kZoomIn:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeZoomOut:
|
||||
case ui::CursorType::kZoomOut:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeGrab:
|
||||
case ui::CursorType::kGrab:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeGrabbing:
|
||||
case ui::CursorType::kGrabbing:
|
||||
return XC_left_ptr;
|
||||
case WebCursorInfo::kTypeCustom:
|
||||
case WebCursorInfo::kTypeNone:
|
||||
case ui::CursorType::kMiddlePanningVertical:
|
||||
return XC_left_ptr;
|
||||
case ui::CursorType::kMiddlePanningHorizontal:
|
||||
return XC_left_ptr;
|
||||
case ui::CursorType::kDndNone:
|
||||
return XC_left_ptr;
|
||||
case ui::CursorType::kDndMove:
|
||||
return XC_left_ptr;
|
||||
case ui::CursorType::kDndCopy:
|
||||
return XC_left_ptr;
|
||||
case ui::CursorType::kDndLink:
|
||||
return XC_left_ptr;
|
||||
case ui::CursorType::kNull:
|
||||
return XC_left_ptr;
|
||||
case ui::CursorType::kCustom:
|
||||
case ui::CursorType::kNone:
|
||||
break;
|
||||
}
|
||||
NOTREACHED();
|
||||
@ -170,9 +184,9 @@ XCursorCache* cursor_cache = nullptr;
|
||||
#endif // defined(USE_X11)
|
||||
|
||||
ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor(
|
||||
blink::WebCursorInfo::Type type) {
|
||||
ui::CursorType type) {
|
||||
#if defined(USE_X11)
|
||||
if (type == WebCursorInfo::kTypeNone) {
|
||||
if (type == ui::CursorType::kNone) {
|
||||
if (!invisible_cursor_) {
|
||||
invisible_cursor_.reset(new ui::XScopedCursor(ui::CreateInvisibleCursor(),
|
||||
gfx::GetXDisplay()));
|
||||
|
@ -41,95 +41,110 @@ class CefCompositorHostWin : public gfx::WindowImpl {
|
||||
|
||||
using blink::WebCursorInfo;
|
||||
|
||||
LPCWSTR ToCursorID(WebCursorInfo::Type type) {
|
||||
LPCWSTR ToCursorID(ui::CursorType type) {
|
||||
switch (type) {
|
||||
case WebCursorInfo::kTypePointer:
|
||||
case ui::CursorType::kPointer:
|
||||
return IDC_ARROW;
|
||||
case WebCursorInfo::kTypeCross:
|
||||
case ui::CursorType::kCross:
|
||||
return IDC_CROSS;
|
||||
case WebCursorInfo::kTypeHand:
|
||||
case ui::CursorType::kHand:
|
||||
return IDC_HAND;
|
||||
case WebCursorInfo::kTypeIBeam:
|
||||
case ui::CursorType::kIBeam:
|
||||
return IDC_IBEAM;
|
||||
case WebCursorInfo::kTypeWait:
|
||||
case ui::CursorType::kWait:
|
||||
return IDC_WAIT;
|
||||
case WebCursorInfo::kTypeHelp:
|
||||
case ui::CursorType::kHelp:
|
||||
return IDC_HELP;
|
||||
case WebCursorInfo::kTypeEastResize:
|
||||
case ui::CursorType::kEastResize:
|
||||
return IDC_SIZEWE;
|
||||
case WebCursorInfo::kTypeNorthResize:
|
||||
case ui::CursorType::kNorthResize:
|
||||
return IDC_SIZENS;
|
||||
case WebCursorInfo::kTypeNorthEastResize:
|
||||
case ui::CursorType::kNorthEastResize:
|
||||
return IDC_SIZENESW;
|
||||
case WebCursorInfo::kTypeNorthWestResize:
|
||||
case ui::CursorType::kNorthWestResize:
|
||||
return IDC_SIZENWSE;
|
||||
case WebCursorInfo::kTypeSouthResize:
|
||||
case ui::CursorType::kSouthResize:
|
||||
return IDC_SIZENS;
|
||||
case WebCursorInfo::kTypeSouthEastResize:
|
||||
case ui::CursorType::kSouthEastResize:
|
||||
return IDC_SIZENWSE;
|
||||
case WebCursorInfo::kTypeSouthWestResize:
|
||||
case ui::CursorType::kSouthWestResize:
|
||||
return IDC_SIZENESW;
|
||||
case WebCursorInfo::kTypeWestResize:
|
||||
case ui::CursorType::kWestResize:
|
||||
return IDC_SIZEWE;
|
||||
case WebCursorInfo::kTypeNorthSouthResize:
|
||||
case ui::CursorType::kNorthSouthResize:
|
||||
return IDC_SIZENS;
|
||||
case WebCursorInfo::kTypeEastWestResize:
|
||||
case ui::CursorType::kEastWestResize:
|
||||
return IDC_SIZEWE;
|
||||
case WebCursorInfo::kTypeNorthEastSouthWestResize:
|
||||
case ui::CursorType::kNorthEastSouthWestResize:
|
||||
return IDC_SIZENESW;
|
||||
case WebCursorInfo::kTypeNorthWestSouthEastResize:
|
||||
case ui::CursorType::kNorthWestSouthEastResize:
|
||||
return IDC_SIZENWSE;
|
||||
case WebCursorInfo::kTypeColumnResize:
|
||||
case ui::CursorType::kColumnResize:
|
||||
return MAKEINTRESOURCE(IDC_COLRESIZE);
|
||||
case WebCursorInfo::kTypeRowResize:
|
||||
case ui::CursorType::kRowResize:
|
||||
return MAKEINTRESOURCE(IDC_ROWRESIZE);
|
||||
case WebCursorInfo::kTypeMiddlePanning:
|
||||
case ui::CursorType::kMiddlePanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_MIDDLE);
|
||||
case WebCursorInfo::kTypeEastPanning:
|
||||
case ui::CursorType::kEastPanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_EAST);
|
||||
case WebCursorInfo::kTypeNorthPanning:
|
||||
case ui::CursorType::kNorthPanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_NORTH);
|
||||
case WebCursorInfo::kTypeNorthEastPanning:
|
||||
case ui::CursorType::kNorthEastPanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_NORTH_EAST);
|
||||
case WebCursorInfo::kTypeNorthWestPanning:
|
||||
case ui::CursorType::kNorthWestPanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_NORTH_WEST);
|
||||
case WebCursorInfo::kTypeSouthPanning:
|
||||
case ui::CursorType::kSouthPanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_SOUTH);
|
||||
case WebCursorInfo::kTypeSouthEastPanning:
|
||||
case ui::CursorType::kSouthEastPanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_SOUTH_EAST);
|
||||
case WebCursorInfo::kTypeSouthWestPanning:
|
||||
case ui::CursorType::kSouthWestPanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_SOUTH_WEST);
|
||||
case WebCursorInfo::kTypeWestPanning:
|
||||
case ui::CursorType::kWestPanning:
|
||||
return MAKEINTRESOURCE(IDC_PAN_WEST);
|
||||
case WebCursorInfo::kTypeMove:
|
||||
case ui::CursorType::kMove:
|
||||
return IDC_SIZEALL;
|
||||
case WebCursorInfo::kTypeVerticalText:
|
||||
case ui::CursorType::kVerticalText:
|
||||
return MAKEINTRESOURCE(IDC_VERTICALTEXT);
|
||||
case WebCursorInfo::kTypeCell:
|
||||
case ui::CursorType::kCell:
|
||||
return MAKEINTRESOURCE(IDC_CELL);
|
||||
case WebCursorInfo::kTypeContextMenu:
|
||||
case ui::CursorType::kContextMenu:
|
||||
return IDC_ARROW;
|
||||
case WebCursorInfo::kTypeAlias:
|
||||
case ui::CursorType::kAlias:
|
||||
return MAKEINTRESOURCE(IDC_ALIAS);
|
||||
case WebCursorInfo::kTypeProgress:
|
||||
case ui::CursorType::kProgress:
|
||||
return IDC_APPSTARTING;
|
||||
case WebCursorInfo::kTypeNoDrop:
|
||||
case ui::CursorType::kNoDrop:
|
||||
return IDC_NO;
|
||||
case WebCursorInfo::kTypeCopy:
|
||||
case ui::CursorType::kCopy:
|
||||
return MAKEINTRESOURCE(IDC_COPYCUR);
|
||||
case WebCursorInfo::kTypeNone:
|
||||
case ui::CursorType::kNone:
|
||||
return MAKEINTRESOURCE(IDC_CURSOR_NONE);
|
||||
case WebCursorInfo::kTypeNotAllowed:
|
||||
case ui::CursorType::kNotAllowed:
|
||||
return IDC_NO;
|
||||
case WebCursorInfo::kTypeZoomIn:
|
||||
case ui::CursorType::kZoomIn:
|
||||
return MAKEINTRESOURCE(IDC_ZOOMIN);
|
||||
case WebCursorInfo::kTypeZoomOut:
|
||||
case ui::CursorType::kZoomOut:
|
||||
return MAKEINTRESOURCE(IDC_ZOOMOUT);
|
||||
case WebCursorInfo::kTypeGrab:
|
||||
case ui::CursorType::kGrab:
|
||||
return MAKEINTRESOURCE(IDC_HAND_GRAB);
|
||||
case WebCursorInfo::kTypeGrabbing:
|
||||
case ui::CursorType::kGrabbing:
|
||||
return MAKEINTRESOURCE(IDC_HAND_GRABBING);
|
||||
case WebCursorInfo::kTypeCustom:
|
||||
case ui::CursorType::kNull:
|
||||
return IDC_NO;
|
||||
case ui::CursorType::kMiddlePanningVertical:
|
||||
return MAKEINTRESOURCE(IDC_PAN_MIDDLE_VERTICAL);
|
||||
case ui::CursorType::kMiddlePanningHorizontal:
|
||||
return MAKEINTRESOURCE(IDC_PAN_MIDDLE_HORIZONTAL);
|
||||
// TODO(cef): Find better cursors for these things
|
||||
case ui::CursorType::kDndNone:
|
||||
return IDC_ARROW;
|
||||
case ui::CursorType::kDndMove:
|
||||
return IDC_ARROW;
|
||||
case ui::CursorType::kDndCopy:
|
||||
return IDC_ARROW;
|
||||
case ui::CursorType::kDndLink:
|
||||
return IDC_ARROW;
|
||||
case ui::CursorType::kCustom:
|
||||
break;
|
||||
}
|
||||
NOTREACHED();
|
||||
@ -143,7 +158,7 @@ bool IsSystemCursorID(LPCWSTR cursor_id) {
|
||||
} // namespace
|
||||
|
||||
ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor(
|
||||
blink::WebCursorInfo::Type type) {
|
||||
ui::CursorType type) {
|
||||
HMODULE module_handle = NULL;
|
||||
const wchar_t* cursor_id = ToCursorID(type);
|
||||
if (!IsSystemCursorID(cursor_id)) {
|
||||
|
@ -65,6 +65,13 @@ void SoftwareOutputDeviceProxy::Resize(const gfx::Size& viewport_pixel_size,
|
||||
return;
|
||||
}
|
||||
|
||||
base::UnsafeSharedMemoryRegion region =
|
||||
base::UnsafeSharedMemoryRegion::Create(required_bytes);
|
||||
if (!region.IsValid()) {
|
||||
DLOG(ERROR) << "Failed to allocate " << required_bytes << " bytes";
|
||||
return;
|
||||
}
|
||||
|
||||
#if !defined(OS_WIN)
|
||||
auto shm = mojo::CreateReadOnlySharedMemoryRegion(required_bytes);
|
||||
if (!shm.IsValid()) {
|
||||
@ -72,7 +79,7 @@ void SoftwareOutputDeviceProxy::Resize(const gfx::Size& viewport_pixel_size,
|
||||
return;
|
||||
}
|
||||
|
||||
shm_ = std::move(shm.mapping);
|
||||
shm_ = region.Map();
|
||||
if (!shm_.IsValid()) {
|
||||
DLOG(ERROR) << "Failed to map " << required_bytes << " bytes";
|
||||
return;
|
||||
@ -81,27 +88,15 @@ void SoftwareOutputDeviceProxy::Resize(const gfx::Size& viewport_pixel_size,
|
||||
canvas_ = skia::CreatePlatformCanvasWithPixels(
|
||||
viewport_pixel_size_.width(), viewport_pixel_size_.height(), false,
|
||||
static_cast<uint8_t*>(shm_.memory()), skia::CRASH_ON_FAILURE);
|
||||
|
||||
mojo::ScopedSharedBufferHandle scoped_handle =
|
||||
mojo::WrapReadOnlySharedMemoryRegion(std::move(shm.region));
|
||||
#else
|
||||
base::SharedMemory shm;
|
||||
if (!shm.CreateAnonymous(required_bytes)) {
|
||||
DLOG(ERROR) << "Failed to allocate " << required_bytes << " bytes";
|
||||
return;
|
||||
}
|
||||
canvas_ = skia::CreatePlatformCanvasWithSharedSection(
|
||||
viewport_pixel_size_.width(), viewport_pixel_size_.height(), false,
|
||||
shm.handle().GetHandle(), skia::CRASH_ON_FAILURE);
|
||||
|
||||
// Transfer handle ownership to the browser process.
|
||||
mojo::ScopedSharedBufferHandle scoped_handle = mojo::WrapSharedMemoryHandle(
|
||||
shm.GetReadOnlyHandle(), required_bytes,
|
||||
mojo::UnwrappedSharedMemoryHandleProtection::kReadOnly);
|
||||
region.GetPlatformHandle(), skia::CRASH_ON_FAILURE);
|
||||
#endif
|
||||
|
||||
// Transfer region ownership to the browser process.
|
||||
layered_window_updater_->OnAllocatedSharedMemory(viewport_pixel_size_,
|
||||
std::move(scoped_handle));
|
||||
std::move(region));
|
||||
}
|
||||
|
||||
SkCanvas* SoftwareOutputDeviceProxy::BeginPaint(const gfx::Rect& damage_rect) {
|
||||
|
@ -240,7 +240,6 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
||||
// Based on ProfileImpl::RegisterProfilePrefs.
|
||||
registry->RegisterFilePathPref(prefs::kDiskCacheDir, cache_path);
|
||||
registry->RegisterIntegerPref(prefs::kDiskCacheSize, 0);
|
||||
registry->RegisterIntegerPref(prefs::kMediaCacheSize, 0);
|
||||
|
||||
// Spell checking preferences.
|
||||
// Modify defaults from SpellcheckServiceFactory::RegisterProfilePrefs.
|
||||
|
@ -134,12 +134,12 @@ void StopWorker(int document_cookie) {
|
||||
return;
|
||||
scoped_refptr<PrintQueriesQueue> queue =
|
||||
g_browser_process->print_job_manager()->queue();
|
||||
scoped_refptr<PrinterQuery> printer_query =
|
||||
std::unique_ptr<PrinterQuery> printer_query =
|
||||
queue->PopPrinterQuery(document_cookie);
|
||||
if (printer_query.get()) {
|
||||
base::PostTaskWithTraits(
|
||||
FROM_HERE, {BrowserThread::IO},
|
||||
base::Bind(&PrinterQuery::StopWorker, printer_query));
|
||||
base::BindOnce(&PrinterQuery::StopWorker, std::move(printer_query)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,7 @@ CefPrintingMessageFilter::CefPrintingMessageFilter(int render_process_id,
|
||||
->Subscribe(base::Bind(&CefPrintingMessageFilter::ShutdownOnUIThread,
|
||||
base::Unretained(this)));
|
||||
is_printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs());
|
||||
is_printing_enabled_.MoveToThread(
|
||||
is_printing_enabled_.MoveToSequence(
|
||||
base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}));
|
||||
}
|
||||
|
||||
@ -124,10 +124,10 @@ void CefPrintingMessageFilter::OnGetDefaultPrintSettings(
|
||||
reply_msg->routing_id());
|
||||
#endif
|
||||
|
||||
scoped_refptr<PrinterQuery> printer_query;
|
||||
std::unique_ptr<PrinterQuery> printer_query;
|
||||
if (!is_printing_enabled_.GetValue()) {
|
||||
// Reply with NULL query.
|
||||
OnGetDefaultPrintSettingsReply(printer_query, reply_msg);
|
||||
OnGetDefaultPrintSettingsReply(std::move(printer_query), reply_msg);
|
||||
return;
|
||||
}
|
||||
printer_query = queue_->PopPrinterQuery(0);
|
||||
@ -138,15 +138,16 @@ void CefPrintingMessageFilter::OnGetDefaultPrintSettings(
|
||||
|
||||
// Loads default settings. This is asynchronous, only the IPC message sender
|
||||
// will hang until the settings are retrieved.
|
||||
printer_query->GetSettings(
|
||||
auto* printer_query_ptr = printer_query.get();
|
||||
printer_query_ptr->GetSettings(
|
||||
PrinterQuery::GetSettingsAskParam::DEFAULTS, 0, false, DEFAULT_MARGINS,
|
||||
false, false,
|
||||
base::Bind(&CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply,
|
||||
this, printer_query, reply_msg));
|
||||
base::BindOnce(&CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply,
|
||||
this, std::move(printer_query), reply_msg));
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply(
|
||||
scoped_refptr<PrinterQuery> printer_query,
|
||||
std::unique_ptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg) {
|
||||
PrintMsg_Print_Params params;
|
||||
if (!printer_query.get() ||
|
||||
@ -162,7 +163,7 @@ void CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply(
|
||||
if (printer_query.get()) {
|
||||
// If user hasn't cancelled.
|
||||
if (printer_query->cookie() && printer_query->settings().dpi()) {
|
||||
queue_->QueuePrinterQuery(printer_query.get());
|
||||
queue_->QueuePrinterQuery(std::move(printer_query));
|
||||
} else {
|
||||
printer_query->StopWorker();
|
||||
}
|
||||
@ -172,7 +173,7 @@ void CefPrintingMessageFilter::OnGetDefaultPrintSettingsReply(
|
||||
void CefPrintingMessageFilter::OnScriptedPrint(
|
||||
const PrintHostMsg_ScriptedPrint_Params& params,
|
||||
IPC::Message* reply_msg) {
|
||||
scoped_refptr<PrinterQuery> printer_query =
|
||||
std::unique_ptr<PrinterQuery> printer_query =
|
||||
queue_->PopPrinterQuery(params.cookie);
|
||||
if (!printer_query.get()) {
|
||||
printer_query =
|
||||
@ -182,12 +183,12 @@ void CefPrintingMessageFilter::OnScriptedPrint(
|
||||
PrinterQuery::GetSettingsAskParam::ASK_USER, params.expected_pages_count,
|
||||
params.has_selection, params.margin_type, params.is_scripted,
|
||||
params.is_modifiable,
|
||||
base::Bind(&CefPrintingMessageFilter::OnScriptedPrintReply, this,
|
||||
printer_query, reply_msg));
|
||||
base::BindOnce(&CefPrintingMessageFilter::OnScriptedPrintReply, this,
|
||||
std::move(printer_query), reply_msg));
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::OnScriptedPrintReply(
|
||||
scoped_refptr<PrinterQuery> printer_query,
|
||||
std::unique_ptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg) {
|
||||
PrintMsg_PrintPages_Params params;
|
||||
if (printer_query->last_status() != PrintingContext::OK ||
|
||||
@ -201,7 +202,7 @@ void CefPrintingMessageFilter::OnScriptedPrintReply(
|
||||
PrintHostMsg_ScriptedPrint::WriteReplyParams(reply_msg, params);
|
||||
Send(reply_msg);
|
||||
if (!params.params.dpi.IsEmpty() && params.params.document_cookie) {
|
||||
queue_->QueuePrinterQuery(printer_query.get());
|
||||
queue_->QueuePrinterQuery(std::move(printer_query));
|
||||
} else {
|
||||
printer_query->StopWorker();
|
||||
}
|
||||
@ -210,10 +211,10 @@ void CefPrintingMessageFilter::OnScriptedPrintReply(
|
||||
void CefPrintingMessageFilter::OnUpdatePrintSettings(int document_cookie,
|
||||
base::Value job_settings,
|
||||
IPC::Message* reply_msg) {
|
||||
scoped_refptr<PrinterQuery> printer_query;
|
||||
std::unique_ptr<PrinterQuery> printer_query;
|
||||
if (!is_printing_enabled_.GetValue()) {
|
||||
// Reply with NULL query.
|
||||
OnUpdatePrintSettingsReply(printer_query, reply_msg);
|
||||
OnUpdatePrintSettingsReply(std::move(printer_query), reply_msg);
|
||||
return;
|
||||
}
|
||||
printer_query = queue_->PopPrinterQuery(document_cookie);
|
||||
@ -223,12 +224,12 @@ void CefPrintingMessageFilter::OnUpdatePrintSettings(int document_cookie,
|
||||
}
|
||||
printer_query->SetSettings(
|
||||
std::move(job_settings),
|
||||
base::Bind(&CefPrintingMessageFilter::OnUpdatePrintSettingsReply, this,
|
||||
printer_query, reply_msg));
|
||||
base::BindOnce(&CefPrintingMessageFilter::OnUpdatePrintSettingsReply,
|
||||
this, std::move(printer_query), reply_msg));
|
||||
}
|
||||
|
||||
void CefPrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||
scoped_refptr<PrinterQuery> printer_query,
|
||||
std::unique_ptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg) {
|
||||
PrintMsg_PrintPages_Params params;
|
||||
if (!printer_query.get() ||
|
||||
@ -247,7 +248,7 @@ void CefPrintingMessageFilter::OnUpdatePrintSettingsReply(
|
||||
// If user hasn't cancelled.
|
||||
if (printer_query.get()) {
|
||||
if (printer_query->cookie() && printer_query->settings().dpi()) {
|
||||
queue_->QueuePrinterQuery(printer_query.get());
|
||||
queue_->QueuePrinterQuery(std::move(printer_query));
|
||||
} else {
|
||||
printer_query->StopWorker();
|
||||
}
|
||||
|
@ -49,15 +49,16 @@ class CefPrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
|
||||
// Get the default print setting.
|
||||
void OnGetDefaultPrintSettings(IPC::Message* reply_msg);
|
||||
void OnGetDefaultPrintSettingsReply(scoped_refptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
void OnGetDefaultPrintSettingsReply(
|
||||
std::unique_ptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
|
||||
// The renderer host have to show to the user the print dialog and returns
|
||||
// the selected print settings. The task is handled by the print worker
|
||||
// thread and the UI thread. The reply occurs on the IO thread.
|
||||
void OnScriptedPrint(const PrintHostMsg_ScriptedPrint_Params& params,
|
||||
IPC::Message* reply_msg);
|
||||
void OnScriptedPrintReply(scoped_refptr<PrinterQuery> printer_query,
|
||||
void OnScriptedPrintReply(std::unique_ptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
|
||||
// Modify the current print settings based on |job_settings|. The task is
|
||||
@ -66,7 +67,7 @@ class CefPrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
void OnUpdatePrintSettings(int document_cookie,
|
||||
base::Value job_settings,
|
||||
IPC::Message* reply_msg);
|
||||
void OnUpdatePrintSettingsReply(scoped_refptr<PrinterQuery> printer_query,
|
||||
void OnUpdatePrintSettingsReply(std::unique_ptr<PrinterQuery> printer_query,
|
||||
IPC::Message* reply_msg);
|
||||
|
||||
// Check to see if print preview has been cancelled.
|
||||
|
@ -237,7 +237,7 @@ void CefServerImpl::SendHttp404Response(int connection_id) {
|
||||
return;
|
||||
}
|
||||
|
||||
server_->Send404(connection_id, NO_TRAFFIC_ANNOTATION_YET);
|
||||
server_->Send404(connection_id, MISSING_TRAFFIC_ANNOTATION);
|
||||
server_->Close(connection_id);
|
||||
}
|
||||
|
||||
@ -262,7 +262,7 @@ void CefServerImpl::SendHttp500Response(int connection_id,
|
||||
return;
|
||||
}
|
||||
|
||||
server_->Send500(connection_id, error_message, NO_TRAFFIC_ANNOTATION_YET);
|
||||
server_->Send500(connection_id, error_message, MISSING_TRAFFIC_ANNOTATION);
|
||||
server_->Close(connection_id);
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ void CefServerImpl::SendHttpResponse(int connection_id,
|
||||
base::StringPrintf("%" PRIuS, static_cast<size_t>(content_length)));
|
||||
}
|
||||
|
||||
server_->SendResponse(connection_id, response, NO_TRAFFIC_ANNOTATION_YET);
|
||||
server_->SendResponse(connection_id, response, MISSING_TRAFFIC_ANNOTATION);
|
||||
if (content_length == 0) {
|
||||
server_->Close(connection_id);
|
||||
}
|
||||
@ -367,7 +367,7 @@ void CefServerImpl::ContinueWebSocketRequest(
|
||||
|
||||
if (allow) {
|
||||
server_->AcceptWebSocket(connection_id, request_info,
|
||||
NO_TRAFFIC_ANNOTATION_YET);
|
||||
MISSING_TRAFFIC_ANNOTATION);
|
||||
handler_->OnWebSocketConnected(this, connection_id);
|
||||
} else {
|
||||
server_->Close(connection_id);
|
||||
@ -399,7 +399,7 @@ void CefServerImpl::SendHttp200ResponseInternal(
|
||||
}
|
||||
|
||||
server_->Send200(connection_id, *data, content_type,
|
||||
NO_TRAFFIC_ANNOTATION_YET);
|
||||
MISSING_TRAFFIC_ANNOTATION);
|
||||
server_->Close(connection_id);
|
||||
}
|
||||
|
||||
@ -418,7 +418,7 @@ void CefServerImpl::SendRawDataInternal(int connection_id,
|
||||
if (!GetConnectionInfo(connection_id))
|
||||
return;
|
||||
|
||||
server_->SendRaw(connection_id, *data, NO_TRAFFIC_ANNOTATION_YET);
|
||||
server_->SendRaw(connection_id, *data, MISSING_TRAFFIC_ANNOTATION);
|
||||
}
|
||||
|
||||
void CefServerImpl::SendWebSocketMessageInternal(
|
||||
@ -444,7 +444,7 @@ void CefServerImpl::SendWebSocketMessageInternal(
|
||||
return;
|
||||
}
|
||||
|
||||
server_->SendOverWebSocket(connection_id, *data, NO_TRAFFIC_ANNOTATION_YET);
|
||||
server_->SendOverWebSocket(connection_id, *data, MISSING_TRAFFIC_ANNOTATION);
|
||||
}
|
||||
|
||||
void CefServerImpl::OnConnect(int connection_id) {
|
||||
|
@ -50,7 +50,7 @@ void CefSSLHostStateDelegate::HostRanInsecureContent(
|
||||
bool CefSSLHostStateDelegate::DidHostRunInsecureContent(
|
||||
const std::string& host,
|
||||
int child_id,
|
||||
InsecureContentType content_type) const {
|
||||
InsecureContentType content_type) {
|
||||
// Intentional no-op.
|
||||
return false;
|
||||
}
|
||||
@ -94,7 +94,7 @@ void CefSSLHostStateDelegate::RevokeUserAllowExceptions(
|
||||
cert_policy_for_host_.erase(host);
|
||||
}
|
||||
|
||||
bool CefSSLHostStateDelegate::HasAllowException(const std::string& host) const {
|
||||
bool CefSSLHostStateDelegate::HasAllowException(const std::string& host) {
|
||||
auto policy_iterator = cert_policy_for_host_.find(host);
|
||||
return policy_iterator != cert_policy_for_host_.end() &&
|
||||
policy_iterator->second.HasAllowException();
|
||||
|
@ -60,12 +60,11 @@ class CefSSLHostStateDelegate : public content::SSLHostStateDelegate {
|
||||
void HostRanInsecureContent(const std::string& host,
|
||||
int child_id,
|
||||
InsecureContentType content_type) override;
|
||||
bool DidHostRunInsecureContent(
|
||||
const std::string& host,
|
||||
int child_id,
|
||||
InsecureContentType content_type) const override;
|
||||
bool DidHostRunInsecureContent(const std::string& host,
|
||||
int child_id,
|
||||
InsecureContentType content_type) override;
|
||||
void RevokeUserAllowExceptions(const std::string& host) override;
|
||||
bool HasAllowException(const std::string& host) const override;
|
||||
bool HasAllowException(const std::string& host) override;
|
||||
|
||||
private:
|
||||
// Certificate policies for each host.
|
||||
|
@ -54,8 +54,8 @@ CefBoxLayoutImpl::CefBoxLayoutImpl(const CefBoxLayoutSettings& settings)
|
||||
|
||||
views::BoxLayout* CefBoxLayoutImpl::CreateLayout() {
|
||||
views::BoxLayout* layout = new views::BoxLayout(
|
||||
settings_.horizontal ? views::BoxLayout::kHorizontal
|
||||
: views::BoxLayout::kVertical,
|
||||
settings_.horizontal ? views::BoxLayout::Orientation::kHorizontal
|
||||
: views::BoxLayout::Orientation::kVertical,
|
||||
gfx::Insets(settings_.inside_border_vertical_spacing,
|
||||
settings_.inside_border_horizontal_spacing),
|
||||
settings_.between_child_spacing);
|
||||
|
@ -178,14 +178,17 @@ void CefWindowImpl::BringToTop() {
|
||||
|
||||
void CefWindowImpl::SetAlwaysOnTop(bool on_top) {
|
||||
CEF_REQUIRE_VALID_RETURN_VOID();
|
||||
if (widget_ && on_top != widget_->IsAlwaysOnTop())
|
||||
widget_->SetAlwaysOnTop(on_top);
|
||||
if (widget_ && on_top != (widget_->GetZOrderLevel() ==
|
||||
ui::ZOrderLevel::kFloatingWindow)) {
|
||||
widget_->SetZOrderLevel(on_top ? ui::ZOrderLevel::kFloatingWindow
|
||||
: ui::ZOrderLevel::kNormal);
|
||||
}
|
||||
}
|
||||
|
||||
bool CefWindowImpl::IsAlwaysOnTop() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
if (widget_)
|
||||
return widget_->IsAlwaysOnTop();
|
||||
return widget_->GetZOrderLevel() == ui::ZOrderLevel::kFloatingWindow;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,10 @@ CEF_EXPORT void cef_trace_event_begin(const char* /* category */,
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
TRACE_EVENT_COPY_BEGIN0(kCategory, name);
|
||||
TRACE_EVENT_BEGIN_WITH_FLAGS0(kCategory, name, TRACE_EVENT_FLAG_COPY);
|
||||
} else if (arg2_name == NULL) {
|
||||
TRACE_EVENT_COPY_BEGIN1(kCategory, name, arg1_name, arg1_val);
|
||||
TRACE_EVENT_BEGIN_WITH_FLAGS1(kCategory, name, TRACE_EVENT_FLAG_COPY,
|
||||
arg1_name, arg1_val);
|
||||
} else {
|
||||
TRACE_EVENT_COPY_BEGIN2(kCategory, name, arg1_name, arg1_val, arg2_name,
|
||||
arg2_val);
|
||||
@ -114,9 +115,10 @@ CEF_EXPORT void cef_trace_event_end(const char* /* category */,
|
||||
|
||||
if (copy) {
|
||||
if (arg1_name == NULL && arg2_name == NULL) {
|
||||
TRACE_EVENT_COPY_END0(kCategory, name);
|
||||
TRACE_EVENT_END_WITH_FLAGS0(kCategory, name, TRACE_EVENT_FLAG_COPY);
|
||||
} else if (arg2_name == NULL) {
|
||||
TRACE_EVENT_COPY_END1(kCategory, name, arg1_name, arg1_val);
|
||||
TRACE_EVENT_END_WITH_FLAGS1(kCategory, name, TRACE_EVENT_FLAG_COPY,
|
||||
arg1_name, arg1_val);
|
||||
} else {
|
||||
TRACE_EVENT_COPY_END2(kCategory, name, arg1_name, arg1_val, arg2_name,
|
||||
arg2_val);
|
||||
|
@ -188,7 +188,8 @@ CefContentClient::CefContentClient(CefRefPtr<CefApp> application)
|
||||
: application_(application),
|
||||
pack_loading_disabled_(false),
|
||||
allow_pack_file_load_(false),
|
||||
scheme_info_list_locked_(false) {
|
||||
scheme_info_list_locked_(false),
|
||||
resource_bundle_delegate_(this) {
|
||||
DCHECK(!g_content_client);
|
||||
g_content_client = this;
|
||||
}
|
||||
@ -236,7 +237,7 @@ void CefContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
||||
scheme_info_list_locked_ = true;
|
||||
}
|
||||
|
||||
base::string16 CefContentClient::GetLocalizedString(int message_id) const {
|
||||
base::string16 CefContentClient::GetLocalizedString(int message_id) {
|
||||
base::string16 value =
|
||||
ui::ResourceBundle::GetSharedInstance().GetLocalizedString(message_id);
|
||||
if (value.empty())
|
||||
@ -247,7 +248,7 @@ base::string16 CefContentClient::GetLocalizedString(int message_id) const {
|
||||
|
||||
base::string16 CefContentClient::GetLocalizedString(
|
||||
int message_id,
|
||||
const base::string16& replacement) const {
|
||||
const base::string16& replacement) {
|
||||
base::string16 value = l10n_util::GetStringFUTF16(message_id, replacement);
|
||||
if (value.empty())
|
||||
LOG(ERROR) << "No localized string available for id " << message_id;
|
||||
@ -257,7 +258,7 @@ base::string16 CefContentClient::GetLocalizedString(
|
||||
|
||||
base::StringPiece CefContentClient::GetDataResource(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) const {
|
||||
ui::ScaleFactor scale_factor) {
|
||||
base::StringPiece value =
|
||||
ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
|
||||
resource_id, scale_factor);
|
||||
@ -268,7 +269,7 @@ base::StringPiece CefContentClient::GetDataResource(
|
||||
}
|
||||
|
||||
base::RefCountedMemory* CefContentClient::GetDataResourceBytes(
|
||||
int resource_id) const {
|
||||
int resource_id) {
|
||||
base::RefCountedMemory* value =
|
||||
ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
||||
resource_id);
|
||||
@ -278,11 +279,11 @@ base::RefCountedMemory* CefContentClient::GetDataResourceBytes(
|
||||
return value;
|
||||
}
|
||||
|
||||
bool CefContentClient::IsDataResourceGzipped(int resource_id) const {
|
||||
bool CefContentClient::IsDataResourceGzipped(int resource_id) {
|
||||
return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id);
|
||||
}
|
||||
|
||||
gfx::Image& CefContentClient::GetNativeImageNamed(int resource_id) const {
|
||||
gfx::Image& CefContentClient::GetNativeImageNamed(int resource_id) {
|
||||
gfx::Image& value =
|
||||
ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
|
||||
if (value.IsEmpty())
|
||||
@ -329,73 +330,3 @@ void CefContentClient::SetPDFEntryFunctions(
|
||||
g_pdf_initialize_module = initialize_module;
|
||||
g_pdf_shutdown_module = shutdown_module;
|
||||
}
|
||||
|
||||
base::FilePath CefContentClient::GetPathForResourcePack(
|
||||
const base::FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
// Only allow the cef pack file to load.
|
||||
if (!pack_loading_disabled_ && allow_pack_file_load_)
|
||||
return pack_path;
|
||||
return base::FilePath();
|
||||
}
|
||||
|
||||
base::FilePath CefContentClient::GetPathForLocalePack(
|
||||
const base::FilePath& pack_path,
|
||||
const std::string& locale) {
|
||||
if (!pack_loading_disabled_)
|
||||
return pack_path;
|
||||
return base::FilePath();
|
||||
}
|
||||
|
||||
gfx::Image CefContentClient::GetImageNamed(int resource_id) {
|
||||
return gfx::Image();
|
||||
}
|
||||
|
||||
gfx::Image CefContentClient::GetNativeImageNamed(int resource_id) {
|
||||
return gfx::Image();
|
||||
}
|
||||
|
||||
base::RefCountedStaticMemory* CefContentClient::LoadDataResourceBytes(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CefContentClient::GetRawDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor,
|
||||
base::StringPiece* value) {
|
||||
if (application_.get()) {
|
||||
CefRefPtr<CefResourceBundleHandler> handler =
|
||||
application_->GetResourceBundleHandler();
|
||||
if (handler.get()) {
|
||||
void* data = NULL;
|
||||
size_t data_size = 0;
|
||||
if (scale_factor != ui::SCALE_FACTOR_NONE) {
|
||||
if (handler->GetDataResourceForScale(
|
||||
resource_id, static_cast<cef_scale_factor_t>(scale_factor),
|
||||
data, data_size)) {
|
||||
*value = base::StringPiece(static_cast<char*>(data), data_size);
|
||||
}
|
||||
} else if (handler->GetDataResource(resource_id, data, data_size)) {
|
||||
*value = base::StringPiece(static_cast<char*>(data), data_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (pack_loading_disabled_ || !value->empty());
|
||||
}
|
||||
|
||||
bool CefContentClient::GetLocalizedString(int message_id,
|
||||
base::string16* value) {
|
||||
if (application_.get()) {
|
||||
CefRefPtr<CefResourceBundleHandler> handler =
|
||||
application_->GetResourceBundleHandler();
|
||||
if (handler.get()) {
|
||||
CefString cef_str;
|
||||
if (handler->GetLocalizedString(message_id, cef_str))
|
||||
*value = cef_str;
|
||||
}
|
||||
}
|
||||
|
||||
return (pack_loading_disabled_ || !value->empty());
|
||||
}
|
||||
|
@ -12,15 +12,14 @@
|
||||
#include <vector>
|
||||
|
||||
#include "include/cef_app.h"
|
||||
#include "libcef/common/resource_bundle_delegate.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "content/public/common/pepper_plugin_info.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "url/url_util.h"
|
||||
|
||||
class CefContentClient : public content::ContentClient,
|
||||
public ui::ResourceBundle::Delegate {
|
||||
class CefContentClient : public content::ContentClient {
|
||||
public:
|
||||
static const char kPDFPluginPath[];
|
||||
|
||||
@ -37,16 +36,14 @@ class CefContentClient : public content::ContentClient,
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
||||
void AddAdditionalSchemes(Schemes* schemes) override;
|
||||
base::string16 GetLocalizedString(int message_id) const override;
|
||||
base::string16 GetLocalizedString(
|
||||
int message_id,
|
||||
const base::string16& replacement) const override;
|
||||
base::StringPiece GetDataResource(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) const override;
|
||||
base::RefCountedMemory* GetDataResourceBytes(int resource_id) const override;
|
||||
bool IsDataResourceGzipped(int resource_id) const override;
|
||||
gfx::Image& GetNativeImageNamed(int resource_id) const override;
|
||||
base::string16 GetLocalizedString(int message_id) override;
|
||||
base::string16 GetLocalizedString(int message_id,
|
||||
const base::string16& replacement) override;
|
||||
base::StringPiece GetDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;
|
||||
bool IsDataResourceGzipped(int resource_id) override;
|
||||
gfx::Image& GetNativeImageNamed(int resource_id) override;
|
||||
|
||||
// Values are registered with all processes (url/url_util.h) and with Blink
|
||||
// (SchemeRegistry) unless otherwise indicated.
|
||||
@ -104,28 +101,18 @@ class CefContentClient : public content::ContentClient,
|
||||
void set_pack_loading_disabled(bool val) { pack_loading_disabled_ = val; }
|
||||
bool pack_loading_disabled() const { return pack_loading_disabled_; }
|
||||
void set_allow_pack_file_load(bool val) { allow_pack_file_load_ = val; }
|
||||
bool allow_pack_file_load() { return allow_pack_file_load_; }
|
||||
|
||||
static void SetPDFEntryFunctions(
|
||||
content::PepperPluginInfo::GetInterfaceFunc get_interface,
|
||||
content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module,
|
||||
content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module);
|
||||
|
||||
private:
|
||||
// ui::ResourceBundle::Delegate methods.
|
||||
base::FilePath GetPathForResourcePack(const base::FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
base::FilePath GetPathForLocalePack(const base::FilePath& pack_path,
|
||||
const std::string& locale) override;
|
||||
gfx::Image GetImageNamed(int resource_id) override;
|
||||
gfx::Image GetNativeImageNamed(int resource_id) override;
|
||||
base::RefCountedStaticMemory* LoadDataResourceBytes(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
bool GetRawDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor,
|
||||
base::StringPiece* value) override;
|
||||
bool GetLocalizedString(int message_id, base::string16* value) override;
|
||||
CefResourceBundleDelegate* GetCefResourceBundleDelegate() {
|
||||
return &resource_bundle_delegate_;
|
||||
}
|
||||
|
||||
private:
|
||||
CefRefPtr<CefApp> application_;
|
||||
bool pack_loading_disabled_;
|
||||
bool allow_pack_file_load_;
|
||||
@ -133,6 +120,8 @@ class CefContentClient : public content::ContentClient,
|
||||
// Custom schemes handled by the client.
|
||||
SchemeInfoList scheme_info_list_;
|
||||
bool scheme_info_list_locked_;
|
||||
|
||||
CefResourceBundleDelegate resource_bundle_delegate_;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_COMMON_CONTENT_CLIENT_H_
|
||||
|
@ -22,19 +22,21 @@
|
||||
"channel": "stable",
|
||||
"matches": ["<all_urls>"]
|
||||
},
|
||||
"resourcesPrivate": [{
|
||||
"dependencies": ["permission:resourcesPrivate"],
|
||||
"contexts": ["blessed_extension"]
|
||||
}, {
|
||||
"channel": "stable",
|
||||
"contexts": ["webui"],
|
||||
"matches": [
|
||||
"chrome://print/*"
|
||||
]
|
||||
}],
|
||||
"resourcesPrivate": [
|
||||
{
|
||||
"dependencies": ["permission:resourcesPrivate"],
|
||||
"contexts": ["blessed_extension"]
|
||||
},
|
||||
{
|
||||
"channel": "stable",
|
||||
"contexts": ["webui"],
|
||||
"matches": ["chrome://print/*"]
|
||||
}
|
||||
],
|
||||
"tabs": {
|
||||
"channel": "stable",
|
||||
"extension_types": ["extension", "legacy_packaged_app"],
|
||||
"contexts": ["blessed_extension", "extension_service_worker"]
|
||||
"contexts": ["blessed_extension"],
|
||||
"disallow_for_service_workers": false
|
||||
}
|
||||
}
|
||||
|
@ -599,6 +599,13 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
features::kMimeHandlerViewInCrossProcessFrame.name);
|
||||
}
|
||||
|
||||
if (features::kAudioServiceAudioStreams.default_state ==
|
||||
base::FEATURE_ENABLED_BY_DEFAULT) {
|
||||
// TODO: Add support for audio service (see issue #2755)
|
||||
disable_features.push_back(
|
||||
features::kAudioServiceAudioStreams.name);
|
||||
}
|
||||
|
||||
if (!disable_features.empty()) {
|
||||
DCHECK(!base::FeatureList::GetInstance());
|
||||
std::string disable_features_str =
|
||||
@ -862,7 +869,8 @@ void CefMainDelegate::InitializeResourceBundle() {
|
||||
|
||||
const std::string loaded_locale =
|
||||
ui::ResourceBundle::InitSharedInstanceWithLocale(
|
||||
locale, &content_client_, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
|
||||
locale, content_client_.GetCefResourceBundleDelegate(),
|
||||
ui::ResourceBundle::LOAD_COMMON_RESOURCES);
|
||||
if (!loaded_locale.empty() && g_browser_process)
|
||||
g_browser_process->SetApplicationLocale(loaded_locale);
|
||||
|
||||
|
75
libcef/common/resource_bundle_delegate.cc
Normal file
75
libcef/common/resource_bundle_delegate.cc
Normal file
@ -0,0 +1,75 @@
|
||||
#include "libcef/common/resource_bundle_delegate.h"
|
||||
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
base::FilePath CefResourceBundleDelegate::GetPathForResourcePack(
|
||||
const base::FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
// Only allow the cef pack file to load.
|
||||
if (!content_client_->pack_loading_disabled() &&
|
||||
content_client_->allow_pack_file_load()) {
|
||||
return pack_path;
|
||||
}
|
||||
return base::FilePath();
|
||||
}
|
||||
|
||||
base::FilePath CefResourceBundleDelegate::GetPathForLocalePack(
|
||||
const base::FilePath& pack_path,
|
||||
const std::string& locale) {
|
||||
if (!content_client_->pack_loading_disabled())
|
||||
return pack_path;
|
||||
return base::FilePath();
|
||||
}
|
||||
|
||||
gfx::Image CefResourceBundleDelegate::GetImageNamed(int resource_id) {
|
||||
return gfx::Image();
|
||||
}
|
||||
|
||||
gfx::Image CefResourceBundleDelegate::GetNativeImageNamed(int resource_id) {
|
||||
return gfx::Image();
|
||||
}
|
||||
|
||||
base::RefCountedStaticMemory* CefResourceBundleDelegate::LoadDataResourceBytes(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool CefResourceBundleDelegate::GetRawDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor,
|
||||
base::StringPiece* value) {
|
||||
if (content_client_->application().get()) {
|
||||
CefRefPtr<CefResourceBundleHandler> handler =
|
||||
content_client_->application()->GetResourceBundleHandler();
|
||||
if (handler.get()) {
|
||||
void* data = NULL;
|
||||
size_t data_size = 0;
|
||||
if (scale_factor != ui::SCALE_FACTOR_NONE) {
|
||||
if (handler->GetDataResourceForScale(
|
||||
resource_id, static_cast<cef_scale_factor_t>(scale_factor),
|
||||
data, data_size)) {
|
||||
*value = base::StringPiece(static_cast<char*>(data), data_size);
|
||||
}
|
||||
} else if (handler->GetDataResource(resource_id, data, data_size)) {
|
||||
*value = base::StringPiece(static_cast<char*>(data), data_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (content_client_->pack_loading_disabled() || !value->empty());
|
||||
}
|
||||
|
||||
bool CefResourceBundleDelegate::GetLocalizedString(int message_id,
|
||||
base::string16* value) {
|
||||
if (content_client_->application().get()) {
|
||||
CefRefPtr<CefResourceBundleHandler> handler =
|
||||
content_client_->application()->GetResourceBundleHandler();
|
||||
if (handler.get()) {
|
||||
CefString cef_str;
|
||||
if (handler->GetLocalizedString(message_id, cef_str))
|
||||
*value = cef_str;
|
||||
}
|
||||
}
|
||||
|
||||
return (content_client_->pack_loading_disabled() || !value->empty());
|
||||
}
|
39
libcef/common/resource_bundle_delegate.h
Normal file
39
libcef/common/resource_bundle_delegate.h
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright 2019 The Chromium Embedded Framework Authors.
|
||||
// Portions copyright 2014 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_COMMON_RESOURCE_BUNDLE_DELEGATE_H_
|
||||
#define CEF_LIBCEF_COMMON_RESOURCE_BUNDLE_DELEGATE_H_
|
||||
#pragma once
|
||||
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
||||
class CefContentClient;
|
||||
|
||||
class CefResourceBundleDelegate : public ui::ResourceBundle::Delegate {
|
||||
public:
|
||||
CefResourceBundleDelegate(CefContentClient* content_client)
|
||||
: content_client_(content_client) {}
|
||||
|
||||
private:
|
||||
// ui::ResourceBundle::Delegate methods.
|
||||
base::FilePath GetPathForResourcePack(const base::FilePath& pack_path,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
base::FilePath GetPathForLocalePack(const base::FilePath& pack_path,
|
||||
const std::string& locale) override;
|
||||
gfx::Image GetImageNamed(int resource_id) override;
|
||||
gfx::Image GetNativeImageNamed(int resource_id) override;
|
||||
base::RefCountedStaticMemory* LoadDataResourceBytes(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
bool GetRawDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor,
|
||||
base::StringPiece* value) override;
|
||||
bool GetLocalizedString(int message_id, base::string16* value) override;
|
||||
|
||||
private:
|
||||
CefContentClient* content_client_;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_COMMON_RESOURCE_BUNDLE_DELEGATE_H_
|
@ -14,7 +14,7 @@
|
||||
#include "components/startup_metric_utils/common/startup_metric.mojom.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "services/proxy_resolver/public/cpp/manifest.h"
|
||||
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
|
||||
#include "services/service_manager/public/cpp/manifest_builder.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
@ -56,7 +56,6 @@ const service_manager::Manifest& GetCefManifest() {
|
||||
const std::vector<service_manager::Manifest>& GetBuiltinServiceManifests() {
|
||||
static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
|
||||
GetCefManifest(),
|
||||
proxy_resolver::GetManifest(),
|
||||
printing::GetPdfCompositorManifest(),
|
||||
GetChromePrintingManifest(),
|
||||
}};
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "components/services/heap_profiling/public/mojom/heap_profiling_client.mojom.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "extensions/common/api/mime_handler.mojom.h" // nogncheck
|
||||
#include "extensions/common/mojo/keep_alive.mojom.h" // nogncheck
|
||||
#include "extensions/common/mojom/keep_alive.mojom.h" // nogncheck
|
||||
#include "services/service_manager/public/cpp/manifest_builder.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
@ -121,6 +121,14 @@ void CefExtensionsRendererClient::OnExtensionUnloaded(
|
||||
resource_request_policy_->OnExtensionUnloaded(extension_id);
|
||||
}
|
||||
|
||||
bool CefExtensionsRendererClient::ExtensionAPIEnabledForServiceWorkerScript(
|
||||
const GURL& scope,
|
||||
const GURL& script_url) const {
|
||||
// TODO(extensions): Implement to support background sevice worker scripts
|
||||
// in extensions
|
||||
return false;
|
||||
}
|
||||
|
||||
void CefExtensionsRendererClient::RenderThreadStarted() {
|
||||
content::RenderThread* thread = content::RenderThread::Get();
|
||||
|
||||
|
@ -51,6 +51,9 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient {
|
||||
void OnExtensionLoaded(const extensions::Extension& extension) override;
|
||||
void OnExtensionUnloaded(
|
||||
const extensions::ExtensionId& extension_id) override;
|
||||
bool ExtensionAPIEnabledForServiceWorkerScript(
|
||||
const GURL& scope,
|
||||
const GURL& script_url) const override;
|
||||
|
||||
// See CefContentRendererClient methods with the same names.
|
||||
void RenderThreadStarted();
|
||||
|
@ -50,7 +50,7 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient {
|
||||
int64_t total_encoded_body_length,
|
||||
int64_t total_decoded_body_length,
|
||||
bool should_report_corb_blocking,
|
||||
const std::vector<network::cors::PreflightTimingInfo>&) override;
|
||||
const blink::WebVector<network::cors::PreflightTimingInfo>&) override;
|
||||
void DidFail(const WebURLError&,
|
||||
int64_t total_encoded_data_length,
|
||||
int64_t total_encoded_body_length,
|
||||
@ -117,6 +117,7 @@ class CefRenderURLRequest::Context
|
||||
WebURLRequest urlRequest;
|
||||
static_cast<CefRequestImpl*>(request_.get())
|
||||
->Get(urlRequest, upload_data_size_);
|
||||
urlRequest.SetPriority(blink::WebURLRequest::Priority::kMedium);
|
||||
|
||||
// Set the origin to match the request. The requirement for an origin is
|
||||
// DCHECK'd in ResourceDispatcherHostImpl::ContinuePendingBeginRequest.
|
||||
@ -379,7 +380,7 @@ void CefWebURLLoaderClient::DidFinishLoading(
|
||||
int64_t total_encoded_body_length,
|
||||
int64_t total_decoded_body_length,
|
||||
bool should_report_corb_blocking,
|
||||
const std::vector<network::cors::PreflightTimingInfo>&) {
|
||||
const blink::WebVector<network::cors::PreflightTimingInfo>&) {
|
||||
context_->OnComplete();
|
||||
}
|
||||
|
||||
|
@ -11,15 +11,15 @@
|
||||
#include "chrome/services/printing/printing_service.h"
|
||||
#include "chrome/services/printing/public/mojom/constants.mojom.h"
|
||||
#include "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h"
|
||||
#include "components/services/pdf_compositor/public/interfaces/pdf_compositor.mojom.h"
|
||||
#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h"
|
||||
#include "content/public/child/child_thread.h"
|
||||
#include "content/public/common/service_manager_connection.h"
|
||||
#include "content/public/common/simple_connection_filter.h"
|
||||
#include "content/public/utility/utility_thread.h"
|
||||
#include "mojo/public/cpp/bindings/strong_binding.h"
|
||||
#include "services/network/url_request_context_builder_mojo.h"
|
||||
#include "services/proxy_resolver/proxy_resolver_service.h" // nogncheck
|
||||
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h" // nogncheck
|
||||
#include "services/proxy_resolver/proxy_resolver_factory_impl.h" // nogncheck
|
||||
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
|
||||
#include "services/service_manager/public/cpp/binder_registry.h"
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@ -34,31 +34,6 @@ void RunServiceAsyncThenTerminateProcess(
|
||||
base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); }));
|
||||
}
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
std::unique_ptr<service_manager::Service> CreateProxyResolverService(
|
||||
service_manager::mojom::ServiceRequest request) {
|
||||
return std::make_unique<proxy_resolver::ProxyResolverService>(
|
||||
std::move(request));
|
||||
}
|
||||
#endif
|
||||
|
||||
using ServiceFactory =
|
||||
base::OnceCallback<std::unique_ptr<service_manager::Service>()>;
|
||||
void RunServiceOnIOThread(ServiceFactory factory) {
|
||||
base::OnceClosure terminate_process = base::BindOnce(
|
||||
base::IgnoreResult(&base::SequencedTaskRunner::PostTask),
|
||||
base::SequencedTaskRunnerHandle::Get(), FROM_HERE,
|
||||
base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); }));
|
||||
content::ChildThread::Get()->GetIOTaskRunner()->PostTask(
|
||||
FROM_HERE,
|
||||
base::BindOnce(
|
||||
[](ServiceFactory factory, base::OnceClosure terminate_process) {
|
||||
service_manager::Service::RunAsyncUntilTermination(
|
||||
std::move(factory).Run(), std::move(terminate_process));
|
||||
},
|
||||
std::move(factory), std::move(terminate_process)));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
CefContentUtilityClient::CefContentUtilityClient() {
|
||||
@ -95,6 +70,16 @@ bool CefContentUtilityClient::OnMessageReceived(const IPC::Message& message) {
|
||||
return handled;
|
||||
}
|
||||
|
||||
void CefContentUtilityClient::RunIOThreadService(
|
||||
mojo::GenericPendingReceiver* receiver) {
|
||||
if (auto factory_receiver =
|
||||
receiver->As<proxy_resolver::mojom::ProxyResolverFactory>()) {
|
||||
static base::NoDestructor<proxy_resolver::ProxyResolverFactoryImpl> factory(
|
||||
std::move(factory_receiver));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<service_manager::Service>
|
||||
CefContentUtilityClient::MaybeCreateMainThreadService(
|
||||
const std::string& service_name,
|
||||
@ -111,11 +96,6 @@ CefContentUtilityClient::MaybeCreateMainThreadService(
|
||||
bool CefContentUtilityClient::HandleServiceRequest(
|
||||
const std::string& service_name,
|
||||
service_manager::mojom::ServiceRequest request) {
|
||||
if (service_name == proxy_resolver::mojom::kProxyResolverServiceName) {
|
||||
RunServiceOnIOThread(
|
||||
base::BindOnce(&CreateProxyResolverService, std::move(request)));
|
||||
return true;
|
||||
}
|
||||
auto service = MaybeCreateMainThreadService(service_name, std::move(request));
|
||||
if (service) {
|
||||
RunServiceAsyncThenTerminateProcess(std::move(service));
|
||||
|
@ -27,6 +27,7 @@ class CefContentUtilityClient : public content::ContentUtilityClient {
|
||||
bool HandleServiceRequest(
|
||||
const std::string& service_name,
|
||||
service_manager::mojom::ServiceRequest request) override;
|
||||
void RunIOThreadService(mojo::GenericPendingReceiver* receiver) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<service_manager::Service> MaybeCreateMainThreadService(
|
||||
|
@ -157,13 +157,6 @@ patches = [
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/1501
|
||||
'name': 'font_family_cache_1501',
|
||||
},
|
||||
{
|
||||
# Fix crash while printing on Windows by properly initializing V8 in the PDF
|
||||
# module.
|
||||
# https://bugs.chromium.org/p/chromium/issues/detail?id=549365#c17
|
||||
'name': 'pdfium_print_549365',
|
||||
'path': 'third_party/pdfium/',
|
||||
},
|
||||
{
|
||||
# Modify views::View to extend SupportsUserData.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/1749
|
||||
@ -404,11 +397,6 @@ patches = [
|
||||
# http://crrev.com/3955c9f9eb
|
||||
'name': 'set_resize_background_color',
|
||||
},
|
||||
{
|
||||
# Remove requirement that enforces component builds
|
||||
# http://crrev.com/567d828446
|
||||
'name': 'remove_component_build_check',
|
||||
},
|
||||
{
|
||||
# Restore WebUrlLoader Cancel method.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/1617042
|
||||
@ -442,5 +430,11 @@ patches = [
|
||||
# - Remove unsupported print preview UI options.
|
||||
# https://bitbucket.org/chromiumembedded/cef/issues/123
|
||||
'name': 'print_preview_123',
|
||||
},
|
||||
{
|
||||
# Fix execution of OnAccessibilityLocationChange by adding the following
|
||||
# Chromium change:
|
||||
# https://chromium.googlesource.com/chromium/src/+/7952ae45c4
|
||||
'name': 'render_accessibility_1675917',
|
||||
}
|
||||
]
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git base/values.cc base/values.cc
|
||||
index 03acb86bbc04..b65a6d542987 100644
|
||||
index 7d042cdcd459..09eb01af5745 100644
|
||||
--- base/values.cc
|
||||
+++ base/values.cc
|
||||
@@ -23,20 +23,6 @@
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_child_frame.cc content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
index a04ca1926622..705cc77ccee0 100644
|
||||
index fbb86a38a7ac..bd1c70e53371 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
@@ -614,6 +614,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame(
|
||||
@@ -613,6 +613,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame(
|
||||
"RenderWidgetHostViewChildFrame::OnSwapCompositorFrame");
|
||||
support_->SubmitCompositorFrame(local_surface_id, std::move(frame),
|
||||
std::move(hit_test_region_list));
|
||||
@ -10,7 +10,7 @@ index a04ca1926622..705cc77ccee0 100644
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
|
||||
@@ -622,6 +623,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
|
||||
@@ -621,6 +622,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
|
||||
support_->DidNotProduceFrame(ack);
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ index a04ca1926622..705cc77ccee0 100644
|
||||
void RenderWidgetHostViewChildFrame::TransformPointToRootSurface(
|
||||
gfx::PointF* point) {
|
||||
// This function is called by RenderWidgetHostInputEventRouter only for
|
||||
@@ -806,6 +816,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
|
||||
@@ -818,6 +828,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
|
||||
void RenderWidgetHostViewChildFrame::SpeakSelection() {}
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
index dfd38d5252a5..6c178ff2a8f4 100644
|
||||
index ddb17ac729df..255d2ec9729d 100644
|
||||
--- content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -308,8 +308,11 @@ void BrowserPluginGuest::InitInternal(
|
||||
@@ -307,8 +307,11 @@ void BrowserPluginGuest::InitInternal(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ index dfd38d5252a5..6c178ff2a8f4 100644
|
||||
|
||||
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
|
||||
// be attached.
|
||||
@@ -822,10 +825,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
@@ -821,10 +824,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
||||
web_contents_view->CreateViewForWidget(
|
||||
@ -37,10 +37,10 @@ index dfd38d5252a5..6c178ff2a8f4 100644
|
||||
|
||||
attached_ = true;
|
||||
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
|
||||
index 106239c65d0e..b3b3121dec54 100644
|
||||
index 875ec8ce299b..a8e1119d4b03 100644
|
||||
--- content/browser/frame_host/interstitial_page_impl.cc
|
||||
+++ content/browser/frame_host/interstitial_page_impl.cc
|
||||
@@ -632,7 +632,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
@@ -624,7 +624,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
WebContentsView* wcv =
|
||||
static_cast<WebContentsImpl*>(web_contents())->GetView();
|
||||
RenderWidgetHostViewBase* view =
|
||||
@ -79,10 +79,10 @@ index bfb918a2cba3..a193b5a0fed8 100644
|
||||
// Creates a new View that holds a non-top-level widget and receives messages
|
||||
// for it.
|
||||
diff --git content/browser/web_contents/web_contents_view_aura.cc content/browser/web_contents/web_contents_view_aura.cc
|
||||
index ee5760ecbe0f..73521279a506 100644
|
||||
index ab27502c3509..282985c05c45 100644
|
||||
--- content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -946,7 +946,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
|
||||
@@ -947,7 +947,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
|
||||
}
|
||||
|
||||
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
@ -92,7 +92,7 @@ index ee5760ecbe0f..73521279a506 100644
|
||||
if (render_widget_host->GetView()) {
|
||||
// During testing, the view will already be set up in most cases to the
|
||||
// test view, so we don't want to clobber it with a real one. To verify that
|
||||
@@ -958,6 +959,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
@@ -959,6 +960,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
|
||||
@ -101,10 +101,10 @@ index ee5760ecbe0f..73521279a506 100644
|
||||
g_create_render_widget_host_view
|
||||
? g_create_render_widget_host_view(render_widget_host,
|
||||
diff --git content/browser/web_contents/web_contents_view_aura.h content/browser/web_contents/web_contents_view_aura.h
|
||||
index 46ca496af77b..cd6ad38ab5ae 100644
|
||||
index 9be20d50ba4b..84c5106d15f2 100644
|
||||
--- content/browser/web_contents/web_contents_view_aura.h
|
||||
+++ content/browser/web_contents/web_contents_view_aura.h
|
||||
@@ -121,7 +121,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
||||
@@ -122,7 +122,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
||||
gfx::NativeView context) override;
|
||||
RenderWidgetHostViewBase* CreateViewForWidget(
|
||||
RenderWidgetHost* render_widget_host,
|
||||
@ -208,10 +208,10 @@ index 913fbc4bb00e..731a81c72803 100644
|
||||
RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
diff --git content/browser/web_contents/web_contents_view_mac.h content/browser/web_contents/web_contents_view_mac.h
|
||||
index 1b577eacbcc2..f614825b14a6 100644
|
||||
index 35da7e53b6a6..df938f455be2 100644
|
||||
--- content/browser/web_contents/web_contents_view_mac.h
|
||||
+++ content/browser/web_contents/web_contents_view_mac.h
|
||||
@@ -74,7 +74,7 @@ class WebContentsViewMac : public WebContentsView,
|
||||
@@ -77,7 +77,7 @@ class WebContentsViewMac : public WebContentsView,
|
||||
gfx::NativeView context) override;
|
||||
RenderWidgetHostViewBase* CreateViewForWidget(
|
||||
RenderWidgetHost* render_widget_host,
|
||||
@ -221,10 +221,10 @@ index 1b577eacbcc2..f614825b14a6 100644
|
||||
RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
diff --git content/browser/web_contents/web_contents_view_mac.mm content/browser/web_contents/web_contents_view_mac.mm
|
||||
index c6adcdd2b33e..a77289b96036 100644
|
||||
index 1d1f44d6a943..275e928d6bd1 100644
|
||||
--- content/browser/web_contents/web_contents_view_mac.mm
|
||||
+++ content/browser/web_contents/web_contents_view_mac.mm
|
||||
@@ -323,7 +323,8 @@ void WebContentsViewMac::CreateView(
|
||||
@@ -327,7 +327,8 @@ void WebContentsViewMac::CreateView(
|
||||
}
|
||||
|
||||
RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
@ -234,7 +234,7 @@ index c6adcdd2b33e..a77289b96036 100644
|
||||
if (render_widget_host->GetView()) {
|
||||
// During testing, the view will already be set up in most cases to the
|
||||
// test view, so we don't want to clobber it with a real one. To verify that
|
||||
@@ -335,6 +336,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
@@ -339,6 +340,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
|
||||
@ -243,7 +243,7 @@ index c6adcdd2b33e..a77289b96036 100644
|
||||
g_create_render_widget_host_view
|
||||
? g_create_render_widget_host_view(render_widget_host,
|
||||
diff --git content/public/browser/browser_plugin_guest_delegate.h content/public/browser/browser_plugin_guest_delegate.h
|
||||
index b7db83c24fc5..edf379709ec0 100644
|
||||
index ea12af6b86b8..f1211f374328 100644
|
||||
--- content/public/browser/browser_plugin_guest_delegate.h
|
||||
+++ content/public/browser/browser_plugin_guest_delegate.h
|
||||
@@ -20,6 +20,7 @@ class GuestHost;
|
||||
@ -266,10 +266,10 @@ index b7db83c24fc5..edf379709ec0 100644
|
||||
// a BrowserPlugin even when we are using cross process frames for guests. It
|
||||
// should be removed after resolving https://crbug.com/642826).
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index cf367d30422b..619c14dc05a1 100644
|
||||
index b7cb9fc9df13..a4a81ee1c863 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -233,6 +233,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
@@ -212,6 +212,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
WebContents::CreateParams params(browser_context(),
|
||||
guest_site_instance.get());
|
||||
params.guest_delegate = this;
|
||||
@ -278,7 +278,7 @@ index cf367d30422b..619c14dc05a1 100644
|
||||
// TODO(erikchen): Fix ownership semantics for guest views.
|
||||
// https://crbug.com/832879.
|
||||
std::move(callback).Run(
|
||||
@@ -277,6 +279,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
@@ -256,6 +258,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -298,10 +298,10 @@ index cf367d30422b..619c14dc05a1 100644
|
||||
WebContents* source,
|
||||
const content::OpenURLParams& params) {
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index 7cdbfafb8b38..be080396eaae 100644
|
||||
index a608b0f31be0..025e4ed3af85 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -131,6 +131,10 @@ class MimeHandlerViewGuest
|
||||
@@ -125,6 +125,10 @@ class MimeHandlerViewGuest
|
||||
bool ZoomPropagatesFromEmbedderToGuest() const final;
|
||||
bool ShouldDestroyOnDetach() const final;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
|
||||
index d8739b1f3110..987472561468 100644
|
||||
index 3025bd308a4a..f7fb156a75d8 100644
|
||||
--- content/browser/scheduler/browser_task_executor.cc
|
||||
+++ content/browser/scheduler/browser_task_executor.cc
|
||||
@@ -133,10 +133,11 @@ void BrowserTaskExecutor::PostFeatureListSetup() {
|
||||
@@ -135,10 +135,11 @@ void BrowserTaskExecutor::PostFeatureListSetup() {
|
||||
|
||||
// static
|
||||
void BrowserTaskExecutor::Shutdown() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index a3f21b7ef850..882b4a38d14c 100644
|
||||
index 66f3b325be58..b3bdbd5c39d9 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -157,7 +157,7 @@ declare_args() {
|
||||
@@ -160,7 +160,7 @@ declare_args() {
|
||||
!use_clang_coverage && !(is_android && use_order_profiling) &&
|
||||
(use_lld ||
|
||||
(use_gold &&
|
||||
@ -11,7 +11,7 @@ index a3f21b7ef850..882b4a38d14c 100644
|
||||
!(current_cpu == "x86" || current_cpu == "x64"))))
|
||||
}
|
||||
|
||||
@@ -1703,8 +1703,6 @@ config("thin_archive") {
|
||||
@@ -1734,8 +1734,6 @@ config("thin_archive") {
|
||||
# archive names to 16 characters, which is not what we want).
|
||||
if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) {
|
||||
arflags = [ "-T" ]
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index 04aff03b621d..7e887b89a6d8 100644
|
||||
index 8ce5e842bbb2..95b0356cab27 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -9,6 +9,7 @@ import("//build/config/jumbo.gni")
|
||||
@ -10,15 +10,15 @@ index 04aff03b621d..7e887b89a6d8 100644
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/feature_engagement/features.gni")
|
||||
import("//components/feed/features.gni")
|
||||
@@ -1849,6 +1850,7 @@ jumbo_split_static_library("browser") {
|
||||
"//base/allocator:buildflags",
|
||||
@@ -1889,6 +1890,7 @@ jumbo_split_static_library("browser") {
|
||||
"//base/util/values:values_util",
|
||||
"//build:branding_buildflags",
|
||||
"//cc",
|
||||
+ "//cef/libcef/features",
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2154,6 +2156,10 @@ jumbo_split_static_library("browser") {
|
||||
@@ -2192,6 +2194,10 @@ jumbo_split_static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
index bcc5cfe3b483..7798026b7a3a 100644
|
||||
index a3797e6705b8..6b7fe2e20a3f 100644
|
||||
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
@ -36,7 +36,7 @@ index bcc5cfe3b483..7798026b7a3a 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -89,10 +100,16 @@ scoped_refptr<RefcountedKeyedService>
|
||||
@@ -85,10 +96,16 @@ scoped_refptr<RefcountedKeyedService>
|
||||
base::FeatureList::IsEnabled(features::kPermissionDelegation)));
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index 6bd5bea7ddb0..076306275b5b 100644
|
||||
index 50f7329cca40..c6cae9beda15 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -10,6 +10,7 @@ import("//build/config/jumbo.gni")
|
||||
@ -10,7 +10,7 @@ index 6bd5bea7ddb0..076306275b5b 100644
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/assistant/assistant.gni")
|
||||
import("//components/feature_engagement/features.gni")
|
||||
@@ -357,6 +358,10 @@ jumbo_split_static_library("ui") {
|
||||
@@ -368,6 +369,10 @@ jumbo_split_static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
@ -21,7 +21,7 @@ index 6bd5bea7ddb0..076306275b5b 100644
|
||||
# Since browser and browser_ui actually depend on each other,
|
||||
# we must omit the dependency from browser_ui to browser.
|
||||
# However, this means browser_ui and browser should more or less
|
||||
@@ -374,6 +379,7 @@ jumbo_split_static_library("ui") {
|
||||
@@ -385,6 +390,7 @@ jumbo_split_static_library("ui") {
|
||||
"//base:i18n",
|
||||
"//base/allocator:buildflags",
|
||||
"//cc/paint",
|
||||
@ -30,17 +30,16 @@ index 6bd5bea7ddb0..076306275b5b 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc
|
||||
index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
index c50cd8b8f779..31aa7a2a696b 100644
|
||||
--- chrome/browser/ui/webui/net_export_ui.cc
|
||||
+++ chrome/browser/ui/webui/net_export_ui.cc
|
||||
@@ -20,14 +20,13 @@
|
||||
@@ -20,13 +20,12 @@
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
-#include "chrome/browser/download/download_prefs.h"
|
||||
#include "chrome/browser/io_thread.h"
|
||||
#include "chrome/browser/net/net_export_helper.h"
|
||||
#include "chrome/browser/net/system_network_context_manager.h"
|
||||
#include "chrome/browser/platform_util.h"
|
||||
@ -49,7 +48,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
#include "chrome/common/channel_info.h"
|
||||
#include "chrome/common/url_constants.h"
|
||||
#include "components/grit/components_resources.h"
|
||||
@@ -42,7 +41,14 @@
|
||||
@@ -41,7 +40,14 @@
|
||||
#include "content/public/browser/web_ui_message_handler.h"
|
||||
#include "extensions/buildflags/buildflags.h"
|
||||
#include "net/log/net_log_capture_mode.h"
|
||||
@ -64,7 +63,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
#include "chrome/browser/android/intent_helper.h"
|
||||
@@ -68,6 +74,7 @@ content::WebUIDataSource* CreateNetExportHTMLSource() {
|
||||
@@ -67,6 +73,7 @@ content::WebUIDataSource* CreateNetExportHTMLSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
@ -72,7 +71,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
void SetIfNotNull(base::DictionaryValue* dict,
|
||||
const base::StringPiece& path,
|
||||
std::unique_ptr<base::Value> in_value) {
|
||||
@@ -75,6 +82,7 @@ void SetIfNotNull(base::DictionaryValue* dict,
|
||||
@@ -74,6 +81,7 @@ void SetIfNotNull(base::DictionaryValue* dict,
|
||||
dict->Set(path, std::move(in_value));
|
||||
}
|
||||
}
|
||||
@ -80,7 +79,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
|
||||
// This class receives javascript messages from the renderer.
|
||||
// Note that the WebUI infrastructure runs on the UI thread, therefore all of
|
||||
@@ -82,7 +90,9 @@ void SetIfNotNull(base::DictionaryValue* dict,
|
||||
@@ -81,7 +89,9 @@ void SetIfNotNull(base::DictionaryValue* dict,
|
||||
class NetExportMessageHandler
|
||||
: public WebUIMessageHandler,
|
||||
public base::SupportsWeakPtr<NetExportMessageHandler>,
|
||||
@ -90,7 +89,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
public net_log::NetExportFileWriter::StateObserver {
|
||||
public:
|
||||
NetExportMessageHandler();
|
||||
@@ -98,11 +108,13 @@ class NetExportMessageHandler
|
||||
@@ -97,11 +107,13 @@ class NetExportMessageHandler
|
||||
void OnSendNetLog(const base::ListValue* list);
|
||||
void OnShowFile(const base::ListValue* list);
|
||||
|
||||
@ -104,7 +103,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
|
||||
// net_log::NetExportFileWriter::StateObserver implementation.
|
||||
void OnNewState(const base::DictionaryValue& state) override;
|
||||
@@ -132,9 +144,16 @@ class NetExportMessageHandler
|
||||
@@ -131,9 +143,16 @@ class NetExportMessageHandler
|
||||
// renderer.
|
||||
void NotifyUIWithState(std::unique_ptr<base::DictionaryValue> state);
|
||||
|
||||
@ -121,7 +120,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
|
||||
// Cached pointer to SystemNetworkContextManager's NetExportFileWriter.
|
||||
net_log::NetExportFileWriter* file_writer_;
|
||||
@@ -150,7 +169,9 @@ class NetExportMessageHandler
|
||||
@@ -149,7 +168,9 @@ class NetExportMessageHandler
|
||||
net::NetLogCaptureMode capture_mode_;
|
||||
uint64_t max_log_file_size_;
|
||||
|
||||
@ -129,9 +128,9 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
|
||||
+#endif
|
||||
|
||||
base::WeakPtrFactory<NetExportMessageHandler> weak_ptr_factory_;
|
||||
base::WeakPtrFactory<NetExportMessageHandler> weak_ptr_factory_{this};
|
||||
|
||||
@@ -168,8 +189,10 @@ NetExportMessageHandler::NetExportMessageHandler()
|
||||
@@ -166,8 +187,10 @@ NetExportMessageHandler::NetExportMessageHandler()
|
||||
NetExportMessageHandler::~NetExportMessageHandler() {
|
||||
// There may be a pending file dialog, it needs to be told that the user
|
||||
// has gone away so that it doesn't try to call back.
|
||||
@ -142,7 +141,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
|
||||
file_writer_->StopNetLog(nullptr);
|
||||
}
|
||||
@@ -232,6 +255,7 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
@@ -230,6 +253,7 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
if (UsingMobileUI()) {
|
||||
StartNetLog(base::FilePath());
|
||||
} else {
|
||||
@ -150,7 +149,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
base::FilePath initial_dir = last_save_dir.Pointer()->empty() ?
|
||||
DownloadPrefs::FromBrowserContext(
|
||||
web_ui()->GetWebContents()->GetBrowserContext())->DownloadPath() :
|
||||
@@ -239,6 +263,9 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
@@ -237,6 +261,9 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
base::FilePath initial_path =
|
||||
initial_dir.Append(FILE_PATH_LITERAL("chrome-net-export-log.json"));
|
||||
ShowSelectFileDialog(initial_path);
|
||||
@ -160,7 +159,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,6 +275,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
@@ -246,6 +273,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
std::unique_ptr<base::DictionaryValue> ui_thread_polled_data(
|
||||
new base::DictionaryValue());
|
||||
|
||||
@ -168,7 +167,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
Profile* profile = Profile::FromWebUI(web_ui());
|
||||
SetIfNotNull(ui_thread_polled_data.get(), "prerenderInfo",
|
||||
chrome_browser_net::GetPrerenderInfo(profile));
|
||||
@@ -257,6 +285,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
@@ -255,6 +283,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
SetIfNotNull(ui_thread_polled_data.get(), "serviceProviders",
|
||||
chrome_browser_net::GetWindowsServiceProviders());
|
||||
#endif
|
||||
@ -176,7 +175,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
|
||||
file_writer_->StopNetLog(std::move(ui_thread_polled_data));
|
||||
}
|
||||
@@ -273,6 +302,7 @@ void NetExportMessageHandler::OnShowFile(const base::ListValue* list) {
|
||||
@@ -271,6 +300,7 @@ void NetExportMessageHandler::OnShowFile(const base::ListValue* list) {
|
||||
base::Bind(&NetExportMessageHandler::ShowFileInShell, AsWeakPtr()));
|
||||
}
|
||||
|
||||
@ -184,7 +183,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
void NetExportMessageHandler::FileSelected(const base::FilePath& path,
|
||||
int index,
|
||||
void* params) {
|
||||
@@ -291,6 +321,7 @@ void NetExportMessageHandler::FileSelectionCanceled(void* params) {
|
||||
@@ -289,6 +319,7 @@ void NetExportMessageHandler::FileSelectionCanceled(void* params) {
|
||||
DCHECK(select_file_dialog_);
|
||||
select_file_dialog_ = nullptr;
|
||||
}
|
||||
@ -192,7 +191,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
|
||||
void NetExportMessageHandler::OnNewState(const base::DictionaryValue& state) {
|
||||
NotifyUIWithState(state.CreateDeepCopy());
|
||||
@@ -355,6 +386,7 @@ void NetExportMessageHandler::NotifyUIWithState(
|
||||
@@ -353,6 +384,7 @@ void NetExportMessageHandler::NotifyUIWithState(
|
||||
*state);
|
||||
}
|
||||
|
||||
@ -200,7 +199,7 @@ index 1b9b3d857f47..85e2d1e5a5d5 100644
|
||||
void NetExportMessageHandler::ShowSelectFileDialog(
|
||||
const base::FilePath& default_path) {
|
||||
// User may have clicked more than once before the save dialog appears.
|
||||
@@ -373,6 +405,43 @@ void NetExportMessageHandler::ShowSelectFileDialog(
|
||||
@@ -371,6 +403,43 @@ void NetExportMessageHandler::ShowSelectFileDialog(
|
||||
ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::string16(), default_path,
|
||||
&file_type_info, 0, base::FilePath::StringType(), owning_window, nullptr);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index b5c53b099bb2..56aa2e75b114 100644
|
||||
index 0b29bc11f07c..9c0ffba4dc20 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -1079,10 +1079,6 @@ void LaunchURL(
|
||||
@@ -1067,10 +1067,6 @@ void LaunchURL(
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ index b5c53b099bb2..56aa2e75b114 100644
|
||||
void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
|
||||
// |allowlist| combines pref/policy + cmdline switch in the browser process.
|
||||
// For renderer and utility (e.g. NetworkService) processes the switch is the
|
||||
@@ -1100,6 +1096,14 @@ void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
|
||||
@@ -1088,6 +1084,14 @@ void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) {
|
||||
|
||||
} // namespace
|
||||
|
||||
@ -29,11 +29,11 @@ index b5c53b099bb2..56aa2e75b114 100644
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
if (command_line->HasSwitch(switches::kUserAgent)) {
|
||||
diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h
|
||||
index 499af0b670a1..dc6247946b8a 100644
|
||||
index 069f597633a2..e81d7718cfca 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -79,7 +79,8 @@ class Origin;
|
||||
|
||||
@@ -84,7 +84,8 @@ enum class Channel;
|
||||
class ChromeHidDelegate;
|
||||
class ChromeSerialDelegate;
|
||||
|
||||
-// Returns the user agent of Chrome.
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
|
||||
index 4cce9ca9fbf1..b1d578c0f8c2 100644
|
||||
index bd2715738d89..a61a0765301f 100644
|
||||
--- chrome/browser/profiles/profile_manager.cc
|
||||
+++ chrome/browser/profiles/profile_manager.cc
|
||||
@@ -388,7 +388,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
@@ -375,7 +375,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
|
||||
content::NotificationService::AllSources());
|
||||
|
||||
@ -12,10 +12,10 @@ index 4cce9ca9fbf1..b1d578c0f8c2 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
||||
index 257e27caed9f..4d0c4fe116c6 100644
|
||||
index 985c64458bdf..f46ddbb8c05d 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -92,7 +92,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -94,7 +94,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
// acceptable. Returns null if creation of the new profile fails.
|
||||
// TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then
|
||||
// make this method private.
|
||||
@ -24,7 +24,7 @@ index 257e27caed9f..4d0c4fe116c6 100644
|
||||
|
||||
// Returns total number of profiles available on this machine.
|
||||
size_t GetNumberOfProfiles();
|
||||
@@ -122,7 +122,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -124,7 +124,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
|
||||
// Returns true if the profile pointer is known to point to an existing
|
||||
// profile.
|
||||
@ -33,7 +33,7 @@ index 257e27caed9f..4d0c4fe116c6 100644
|
||||
|
||||
// Returns the directory where the first created profile is stored,
|
||||
// relative to the user data directory currently in use.
|
||||
@@ -131,7 +131,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
@@ -133,7 +133,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
// Get the Profile last used (the Profile to which owns the most recently
|
||||
// focused window) with this Chrome build. If no signed profile has been
|
||||
// stored in Local State, hand back the Default profile.
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
index daf826ece047..615200c4b41c 100644
|
||||
index f2223e24ec7c..8374b7f0d56d 100644
|
||||
--- chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
+++ chrome/browser/plugins/plugin_info_host_impl.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
@ -51,7 +51,7 @@ index daf826ece047..615200c4b41c 100644
|
||||
+
|
||||
allow_outdated_plugins_.Init(prefs::kPluginsAllowOutdated,
|
||||
profile->GetPrefs());
|
||||
allow_outdated_plugins_.MoveToThread(
|
||||
allow_outdated_plugins_.MoveToSequence(
|
||||
@@ -234,6 +247,7 @@ void PluginInfoHostImpl::PluginsLoaded(
|
||||
plugin_metadata->identifier(), &output->status);
|
||||
}
|
||||
@ -125,7 +125,7 @@ index daf826ece047..615200c4b41c 100644
|
||||
// If we broke out of the loop, we have found an enabled plugin.
|
||||
bool enabled = i < matching_plugins.size();
|
||||
diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc
|
||||
index 01ea0ba7f0cb..f573503df5c4 100644
|
||||
index 73d60aa7f77c..89bff0de7186 100644
|
||||
--- chrome/browser/plugins/plugin_utils.cc
|
||||
+++ chrome/browser/plugins/plugin_utils.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
@ -146,49 +146,45 @@ index 01ea0ba7f0cb..f573503df5c4 100644
|
||||
+#endif
|
||||
+
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
#include "extensions/browser/info_map.h"
|
||||
#include "extensions/common/constants.h"
|
||||
@@ -180,10 +186,26 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
@@ -251,12 +257,29 @@ base::flat_map<std::string, std::string>
|
||||
PluginUtils::GetMimeTypeToExtensionIdMap(
|
||||
content::ResourceContext* resource_context) {
|
||||
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
+
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ if (!extensions::ExtensionsEnabled())
|
||||
+ return mime_type_to_extension_id_map;
|
||||
+ return {};
|
||||
+
|
||||
+ CefResourceContext* context =
|
||||
+ static_cast<CefResourceContext*>(resource_context);
|
||||
+ bool profile_is_off_the_record = context->IsOffTheRecord();
|
||||
+ const scoped_refptr<const extensions::InfoMap> extension_info_map(
|
||||
+ context->GetExtensionInfoMap());
|
||||
+ scoped_refptr<extensions::InfoMap> extension_info_map(
|
||||
+ const_cast<extensions::InfoMap*>(context->GetExtensionInfoMap()));
|
||||
+ bool always_open_pdf_externally = !extensions::PdfExtensionEnabled();
|
||||
+#else
|
||||
ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
|
||||
bool profile_is_off_the_record = io_data->IsOffTheRecord();
|
||||
const scoped_refptr<const extensions::InfoMap> extension_info_map(
|
||||
scoped_refptr<extensions::InfoMap> extension_info_map(
|
||||
io_data->GetExtensionInfoMap());
|
||||
+ bool profile_is_off_the_record = io_data->IsOffTheRecord();
|
||||
+ bool always_open_pdf_externally =
|
||||
+ io_data->always_open_pdf_externally()->GetValue();
|
||||
+#endif
|
||||
+
|
||||
std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist();
|
||||
// Go through the white-listed extensions and try to use them to intercept
|
||||
// the URL request.
|
||||
@@ -198,7 +220,7 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
|
||||
}
|
||||
|
||||
if (extension_id == extension_misc::kPdfExtensionId &&
|
||||
- io_data->always_open_pdf_externally()->GetValue()) {
|
||||
+ always_open_pdf_externally) {
|
||||
continue;
|
||||
}
|
||||
|
||||
return GetMimeTypeToExtensionIdMapInternal(
|
||||
- io_data->IsOffTheRecord(),
|
||||
- io_data->always_open_pdf_externally()->GetValue(),
|
||||
+ profile_is_off_the_record,
|
||||
+ always_open_pdf_externally,
|
||||
base::BindRepeating(
|
||||
[](const scoped_refptr<extensions::InfoMap>& info_map,
|
||||
const std::string& extension_id) {
|
||||
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
|
||||
index 4f04b84e4899..e4f6ee474393 100644
|
||||
index ae7e07340ea4..f193040e8bca 100644
|
||||
--- chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -775,6 +775,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -794,6 +794,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
|
||||
status == chrome::mojom::PluginStatus::kBlocked) &&
|
||||
@ -196,7 +192,7 @@ index 4f04b84e4899..e4f6ee474393 100644
|
||||
observer->IsPluginTemporarilyAllowed(identifier)) {
|
||||
status = chrome::mojom::PluginStatus::kAllowed;
|
||||
}
|
||||
@@ -967,7 +968,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -994,7 +995,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
&plugin_auth_host);
|
||||
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
|
||||
@ -206,7 +202,7 @@ index 4f04b84e4899..e4f6ee474393 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlocked: {
|
||||
@@ -976,7 +978,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1003,7 +1005,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
|
||||
placeholder->AllowLoading();
|
||||
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
|
||||
@ -216,7 +212,7 @@ index 4f04b84e4899..e4f6ee474393 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
|
||||
@@ -986,7 +989,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1013,7 +1016,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
group_name));
|
||||
RenderThread::Get()->RecordAction(
|
||||
UserMetricsAction("Plugin_BlockedByPolicy"));
|
||||
@ -226,7 +222,7 @@ index 4f04b84e4899..e4f6ee474393 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
|
||||
@@ -994,7 +998,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -1021,7 +1025,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
IDR_BLOCKED_PLUGIN_HTML,
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
|
||||
group_name));
|
||||
|
@ -13,4 +13,4 @@ index b5ccdc521a36..716117c141cc 100644
|
||||
+ private:
|
||||
void UpdateRendererPreferences();
|
||||
void OnWebPrefChanged(const std::string& pref_name);
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
|
||||
index e5f98be28775..a1d2697affc8 100644
|
||||
index 4f3ed79d0500..357a0b260e85 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -4,6 +4,7 @@
|
||||
@ -10,7 +10,7 @@ index e5f98be28775..a1d2697affc8 100644
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -127,6 +128,7 @@ jumbo_static_library("renderer") {
|
||||
@@ -125,6 +126,7 @@ jumbo_static_library("renderer") {
|
||||
defines = []
|
||||
|
||||
deps = [
|
||||
@ -18,7 +18,7 @@ index e5f98be28775..a1d2697affc8 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -193,6 +195,10 @@ jumbo_static_library("renderer") {
|
||||
@@ -190,6 +192,10 @@ jumbo_static_library("renderer") {
|
||||
|
||||
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||
index 1db1b55b6da0..41187edcf3e1 100644
|
||||
index 1e9bc3b924db..eaf4ac0f22f8 100644
|
||||
--- chrome/common/chrome_content_client.cc
|
||||
+++ chrome/common/chrome_content_client.cc
|
||||
@@ -97,7 +97,8 @@
|
||||
@@ -92,7 +92,8 @@
|
||||
// Registers Widevine CDM if Widevine is enabled, the Widevine CDM is
|
||||
// bundled and not a component. When the Widevine CDM is a component, it is
|
||||
// registered in widevine_cdm_component_installer.cc.
|
||||
|
@ -13,7 +13,7 @@ index 864f2a5a315a..78b71d523e86 100644
|
||||
explicit ContentServiceManagerMainDelegate(const ContentMainParams& params);
|
||||
~ContentServiceManagerMainDelegate() override;
|
||||
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
|
||||
index 0ef3544d94bd..b27ea95697fb 100644
|
||||
index 2207045d28b6..b87d28e8e618 100644
|
||||
--- content/browser/devtools/devtools_instrumentation.h
|
||||
+++ content/browser/devtools/devtools_instrumentation.h
|
||||
@@ -12,6 +12,7 @@
|
||||
@ -23,8 +23,8 @@ index 0ef3544d94bd..b27ea95697fb 100644
|
||||
+#include "content/common/content_export.h"
|
||||
#include "content/common/navigation_params.mojom.h"
|
||||
#include "content/public/browser/certificate_request_result_type.h"
|
||||
#include "services/network/public/mojom/url_loader_factory.mojom.h"
|
||||
@@ -49,7 +50,7 @@ void ApplyNetworkRequestOverrides(FrameTreeNode* frame_tree_node,
|
||||
#include "services/network/public/mojom/network_service.mojom.h"
|
||||
@@ -52,7 +53,7 @@ void ApplyNetworkRequestOverrides(FrameTreeNode* frame_tree_node,
|
||||
mojom::BeginNavigationParams* begin_params,
|
||||
bool* report_raw_headers);
|
||||
|
||||
@ -69,7 +69,7 @@ index 886bdf0edf8f..1d714000cce5 100644
|
||||
blink::mojom::V8CacheOptions GetV8CacheOptions();
|
||||
|
||||
diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn
|
||||
index 1abc6a3a8e11..e885e78c4d54 100644
|
||||
index 45c823a5f5cd..e8f82939e163 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -26,6 +26,7 @@ jumbo_component("controller") {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
|
||||
index 3947d9d92ab4..00b5b3edf84a 100644
|
||||
index e0d2c5c42517..0849c5bf6b7e 100644
|
||||
--- chrome/browser/download/download_target_determiner.cc
|
||||
+++ chrome/browser/download/download_target_determiner.cc
|
||||
@@ -634,8 +634,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
|
||||
@@ -631,8 +631,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
|
||||
content::PluginService* plugin_service =
|
||||
content::PluginService::GetInstance();
|
||||
bool plugin_found = plugin_service->GetPluginInfo(
|
||||
@ -14,10 +14,10 @@ index 3947d9d92ab4..00b5b3edf84a 100644
|
||||
// The GetPlugins call causes the plugin list to be refreshed. Once that's
|
||||
// done we can retry the GetPluginInfo call. We break out of this cycle
|
||||
diff --git chrome/browser/plugins/chrome_plugin_service_filter.cc chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
index 5c2a2d0adf1c..54fc2db321e9 100644
|
||||
index 55801ac0fee7..8e993e959ca2 100644
|
||||
--- chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
+++ chrome/browser/plugins/chrome_plugin_service_filter.cc
|
||||
@@ -168,6 +168,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
|
||||
@@ -167,6 +167,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable(
|
||||
int render_frame_id,
|
||||
const void* context,
|
||||
const GURL& plugin_content_url,
|
||||
@ -53,7 +53,7 @@ index 2eb7f21919fd..4218d3352d70 100644
|
||||
}
|
||||
#endif
|
||||
diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc
|
||||
index 39f6dcaf9fce..faf7bd250c3c 100644
|
||||
index 786365927e71..27d32872d8d0 100644
|
||||
--- chrome/browser/ui/views/frame/browser_root_view.cc
|
||||
+++ chrome/browser/ui/views/frame/browser_root_view.cc
|
||||
@@ -70,7 +70,7 @@ void OnFindURLMimeType(const GURL& url,
|
||||
@ -66,7 +66,7 @@ index 39f6dcaf9fce..faf7bd250c3c 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index 30b2a43959da..7dbe5aad8bd2 100644
|
||||
index 83772ae8cca7..0eadd7c9a37a 100644
|
||||
--- content/browser/devtools/devtools_http_handler.cc
|
||||
+++ content/browser/devtools/devtools_http_handler.cc
|
||||
@@ -572,7 +572,7 @@ void DevToolsHttpHandler::OnJsonRequest(
|
||||
@ -79,10 +79,10 @@ index 30b2a43959da..7dbe5aad8bd2 100644
|
||||
GetContentClient()->browser()->GetUserAgent());
|
||||
version.SetString("V8-Version", V8_VERSION_STRING);
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc
|
||||
index 3bdd59c38012..9df67bd208b9 100644
|
||||
index 5815fdfd6259..307c222c0d40 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.cc
|
||||
+++ content/browser/frame_host/render_frame_message_filter.cc
|
||||
@@ -809,6 +809,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
|
||||
@@ -493,6 +493,7 @@ void RenderFrameMessageFilter::OnAre3DAPIsBlocked(int render_frame_id,
|
||||
void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
@ -90,7 +90,7 @@ index 3bdd59c38012..9df67bd208b9 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
@@ -820,8 +821,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
@@ -504,8 +505,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
bool allow_wildcard = true;
|
||||
*found = plugin_service_->GetPluginInfo(
|
||||
render_process_id_, render_frame_id, resource_context_, url,
|
||||
@ -102,10 +102,10 @@ index 3bdd59c38012..9df67bd208b9 100644
|
||||
|
||||
void RenderFrameMessageFilter::OnOpenChannelToPepperPlugin(
|
||||
diff --git content/browser/frame_host/render_frame_message_filter.h content/browser/frame_host/render_frame_message_filter.h
|
||||
index 641c7bcbf1b8..3faf6a6452c4 100644
|
||||
index e7900ef22a0d..f05d2ee128bd 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.h
|
||||
+++ content/browser/frame_host/render_frame_message_filter.h
|
||||
@@ -146,6 +146,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter
|
||||
@@ -113,6 +113,7 @@ class CONTENT_EXPORT RenderFrameMessageFilter : public BrowserMessageFilter {
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
void OnGetPluginInfo(int render_frame_id,
|
||||
const GURL& url,
|
||||
@ -114,10 +114,10 @@ index 641c7bcbf1b8..3faf6a6452c4 100644
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
diff --git content/browser/loader/mime_sniffing_resource_handler.cc content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
index 7b73b2a8a838..da5aacc31910 100644
|
||||
index b0458c1168d9..98f7ae7b7899 100644
|
||||
--- content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
+++ content/browser/loader/mime_sniffing_resource_handler.cc
|
||||
@@ -512,8 +512,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
|
||||
@@ -510,8 +510,8 @@ bool MimeSniffingResourceHandler::CheckForPluginHandler(
|
||||
WebPluginInfo plugin;
|
||||
bool has_plugin = plugin_service_->GetPluginInfo(
|
||||
info->GetChildID(), info->GetRenderFrameID(), info->GetContext(),
|
||||
@ -129,23 +129,24 @@ index 7b73b2a8a838..da5aacc31910 100644
|
||||
if (stale) {
|
||||
// Refresh the plugins asynchronously.
|
||||
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
|
||||
index 052c66044997..9501b0c242cb 100644
|
||||
index 7dafa5c27290..14d97d465f2c 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -905,6 +905,12 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
|
||||
@@ -1061,6 +1061,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
|
||||
static_cast<ui::PageTransition>(resource_request_->transition_type),
|
||||
resource_request_->has_user_gesture, &proxied_factory_request_,
|
||||
external_protocol_factory);
|
||||
resource_request_->has_user_gesture, &loader_factory);
|
||||
|
||||
+ if (!handled) {
|
||||
+ handled = GetContentClient()->browser()->HandleExternalProtocol(
|
||||
+ web_contents_getter_, frame_tree_node_id_,
|
||||
+ navigation_ui_data_.get(), *resource_request_,
|
||||
+ &proxied_factory_request_, external_protocol_factory);
|
||||
+ &proxied_factory_request_, &loader_factory);
|
||||
+ }
|
||||
|
||||
if (external_protocol_factory) {
|
||||
+
|
||||
if (loader_factory) {
|
||||
factory =
|
||||
@@ -1146,7 +1152,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
|
||||
base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
|
||||
@@ -1310,7 +1317,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
|
||||
// path does as well for navigations.
|
||||
bool has_plugin = PluginService::GetInstance()->GetPluginInfo(
|
||||
-1 /* render_process_id */, -1 /* render_frame_id */, resource_context_,
|
||||
@ -177,7 +178,7 @@ index a599f989065f..115867edec92 100644
|
||||
if (actual_mime_type)
|
||||
*actual_mime_type = mime_types[i];
|
||||
diff --git content/browser/plugin_service_impl.h content/browser/plugin_service_impl.h
|
||||
index cb19abcd26b8..12d66dd7db6e 100644
|
||||
index c4c0ed551697..b234e239bba4 100644
|
||||
--- content/browser/plugin_service_impl.h
|
||||
+++ content/browser/plugin_service_impl.h
|
||||
@@ -57,6 +57,7 @@ class CONTENT_EXPORT PluginServiceImpl : public PluginService {
|
||||
@ -189,7 +190,7 @@ index cb19abcd26b8..12d66dd7db6e 100644
|
||||
const std::string& mime_type,
|
||||
bool allow_wildcard,
|
||||
diff --git content/browser/renderer_host/plugin_registry_impl.cc content/browser/renderer_host/plugin_registry_impl.cc
|
||||
index 8dd463f4165f..e0d0e951ec8b 100644
|
||||
index 717db1507d66..d44142b67ff7 100644
|
||||
--- content/browser/renderer_host/plugin_registry_impl.cc
|
||||
+++ content/browser/renderer_host/plugin_registry_impl.cc
|
||||
@@ -27,6 +27,7 @@ void PluginRegistryImpl::Bind(blink::mojom::PluginRegistryRequest request) {
|
||||
@ -232,7 +233,7 @@ index 8dd463f4165f..e0d0e951ec8b 100644
|
||||
plugin_blink->name = plugin.name;
|
||||
plugin_blink->description = plugin.desc;
|
||||
diff --git content/browser/renderer_host/plugin_registry_impl.h content/browser/renderer_host/plugin_registry_impl.h
|
||||
index 3009401dac6b..b4c5a9e2db50 100644
|
||||
index 061dd21cbbd1..a418b8d08091 100644
|
||||
--- content/browser/renderer_host/plugin_registry_impl.h
|
||||
+++ content/browser/renderer_host/plugin_registry_impl.h
|
||||
@@ -24,17 +24,24 @@ class PluginRegistryImpl : public blink::mojom::PluginRegistry {
|
||||
@ -258,14 +259,14 @@ index 3009401dac6b..b4c5a9e2db50 100644
|
||||
mojo::BindingSet<PluginRegistry> bindings_;
|
||||
base::TimeTicks last_plugin_refresh_time_;
|
||||
+ int render_process_id_ = -1;
|
||||
base::WeakPtrFactory<PluginRegistryImpl> weak_factory_;
|
||||
base::WeakPtrFactory<PluginRegistryImpl> weak_factory_{this};
|
||||
};
|
||||
|
||||
diff --git content/common/frame_messages.h content/common/frame_messages.h
|
||||
index c81c9fb4251c..3f266302f4e0 100644
|
||||
index 60077e7ec11a..1e703ba07b4d 100644
|
||||
--- content/common/frame_messages.h
|
||||
+++ content/common/frame_messages.h
|
||||
@@ -1266,9 +1266,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
@@ -1228,9 +1228,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
// type. If there is no matching plugin, |found| is false.
|
||||
// |actual_mime_type| is the actual mime type supported by the
|
||||
// found plugin.
|
||||
@ -278,12 +279,12 @@ index c81c9fb4251c..3f266302f4e0 100644
|
||||
std::string /* mime_type */,
|
||||
bool /* found */,
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index 1a16897afa44..12439a93b151 100644
|
||||
index a14b357dca01..780861333a4b 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -1437,6 +1437,15 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory);
|
||||
@@ -1492,6 +1492,15 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
bool has_user_gesture,
|
||||
network::mojom::URLLoaderFactoryPtr* out_factory);
|
||||
|
||||
+ // Same as above, but exposing the whole ResourceRequest object.
|
||||
+ virtual bool HandleExternalProtocol(
|
||||
@ -292,27 +293,27 @@ index 1a16897afa44..12439a93b151 100644
|
||||
+ NavigationUIData* navigation_data,
|
||||
+ const network::ResourceRequest& request,
|
||||
+ network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
+ network::mojom::URLLoaderFactory*& out_factory) { return false; }
|
||||
+ network::mojom::URLLoaderFactoryPtr* out_factory) { return false; }
|
||||
+
|
||||
// Creates an OverlayWindow to be used for Picture-in-Picture. This window
|
||||
// will house the content shown when in Picture-in-Picture mode. This will
|
||||
// return a new OverlayWindow.
|
||||
@@ -1504,6 +1513,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1562,6 +1571,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct() const;
|
||||
virtual std::string GetProduct();
|
||||
|
||||
+ // Returns the Chrome-specific product string. This is used for compatibility
|
||||
+ // purposes with external tools like Selenium.
|
||||
+ virtual std::string GetChromeProduct() const { return GetProduct(); }
|
||||
+ virtual std::string GetChromeProduct() { return GetProduct(); }
|
||||
+
|
||||
// Returns the user agent. Content may cache this value.
|
||||
virtual std::string GetUserAgent() const;
|
||||
virtual std::string GetUserAgent();
|
||||
|
||||
diff --git content/public/browser/plugin_service.h content/public/browser/plugin_service.h
|
||||
index aed3085c7794..3b31542094d4 100644
|
||||
index 7646bdad2061..887ac022f2a1 100644
|
||||
--- content/public/browser/plugin_service.h
|
||||
+++ content/public/browser/plugin_service.h
|
||||
@@ -73,6 +73,7 @@ class CONTENT_EXPORT PluginService {
|
||||
@@ -75,6 +75,7 @@ class CONTENT_EXPORT PluginService {
|
||||
int render_frame_id,
|
||||
ResourceContext* context,
|
||||
const GURL& url,
|
||||
@ -333,7 +334,7 @@ index 3b610b1f554e..7c439e060779 100644
|
||||
WebPluginInfo* plugin) = 0;
|
||||
|
||||
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
|
||||
index 31fcd7d89bf8..9421e8a5db77 100644
|
||||
index bfc62d176668..b9f695eaad5a 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -74,6 +74,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@ -346,7 +347,7 @@ index 31fcd7d89bf8..9421e8a5db77 100644
|
||||
// Notifies that a new RenderFrame has been created.
|
||||
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -333,6 +336,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -326,6 +329,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// This method may invalidate the frame.
|
||||
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
|
||||
|
||||
@ -358,10 +359,10 @@ index 31fcd7d89bf8..9421e8a5db77 100644
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
|
||||
index 14f7e7a34e2b..573bd466effe 100644
|
||||
index 0e2e86e6a2af..b44e90f69263 100644
|
||||
--- content/public/renderer/render_frame_observer.h
|
||||
+++ content/public/renderer/render_frame_observer.h
|
||||
@@ -201,6 +201,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -214,6 +214,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
virtual void DidReceiveTransferSizeUpdate(int resource_id,
|
||||
int received_data_length) {}
|
||||
|
||||
@ -372,10 +373,10 @@ index 14f7e7a34e2b..573bd466effe 100644
|
||||
virtual void FocusedElementChanged(const blink::WebElement& element) {}
|
||||
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index 2ab1163b56da..329e435a479d 100644
|
||||
index e2a9d4a370f3..2919772fef77 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -4031,7 +4031,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
@@ -4095,7 +4095,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
std::string mime_type;
|
||||
bool found = false;
|
||||
Send(new FrameHostMsg_GetPluginInfo(
|
||||
@ -385,7 +386,7 @@ index 2ab1163b56da..329e435a479d 100644
|
||||
params.mime_type.Utf8(), &found, &info, &mime_type));
|
||||
if (!found)
|
||||
return nullptr;
|
||||
@@ -4464,6 +4465,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
@@ -4510,6 +4511,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
|
||||
void RenderFrameImpl::FrameFocused() {
|
||||
Send(new FrameHostMsg_FrameFocused(routing_id_));
|
||||
@ -395,10 +396,10 @@ index 2ab1163b56da..329e435a479d 100644
|
||||
|
||||
void RenderFrameImpl::DidChangeName(const blink::WebString& name) {
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index a908f83034f5..6a61c2ec8e63 100644
|
||||
index f2d4f932341e..409eabcdabc3 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -796,6 +796,8 @@ void RenderThreadImpl::Init() {
|
||||
@@ -786,6 +786,8 @@ void RenderThreadImpl::Init() {
|
||||
|
||||
StartServiceManagerConnection();
|
||||
|
||||
@ -408,31 +409,32 @@ index a908f83034f5..6a61c2ec8e63 100644
|
||||
&RenderThreadImpl::OnRendererInterfaceRequest, base::Unretained(this)));
|
||||
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index 32f5e253cee8..aaa73a259771 100644
|
||||
index a89a61d35a4b..5d8369cc2eda 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1069,6 +1069,14 @@ void RendererBlinkPlatformImpl::RecordMetricsForBackgroundedRendererPurge() {
|
||||
@@ -949,6 +949,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+void RendererBlinkPlatformImpl::DevToolsAgentAttached() {
|
||||
+ GetContentClient()->renderer()->DevToolsAgentAttached();
|
||||
+}
|
||||
+
|
||||
+void RendererBlinkPlatformImpl::DevToolsAgentDetached() {
|
||||
+ GetContentClient()->renderer()->DevToolsAgentDetached();
|
||||
+}
|
||||
+
|
||||
void RendererBlinkPlatformImpl::InitializeWebDatabaseHostIfNeeded() {
|
||||
if (!web_database_host_) {
|
||||
web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create(
|
||||
+//------------------------------------------------------------------------------
|
||||
+
|
||||
blink::mojom::CodeCacheHost& RendererBlinkPlatformImpl::GetCodeCacheHost() {
|
||||
if (!code_cache_host_) {
|
||||
code_cache_host_ = blink::mojom::ThreadSafeCodeCacheHostPtr::Create(
|
||||
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
|
||||
index ba77a976729d..8c4153718c0b 100644
|
||||
index f1bc21b53606..0706ff050349 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -226,6 +226,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
std::unique_ptr<blink::WebURLLoaderFactory> WrapSharedURLLoaderFactory(
|
||||
scoped_refptr<network::SharedURLLoaderFactory> factory) override;
|
||||
@@ -211,6 +211,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
|
||||
media::GpuVideoAcceleratorFactories* GetGpuFactories() override;
|
||||
|
||||
+ void DevToolsAgentAttached() override;
|
||||
+ void DevToolsAgentDetached() override;
|
||||
|
@ -81,7 +81,7 @@ index 381322aca895..a5622ddfe66d 100644
|
||||
g_crash_helper_enabled = true;
|
||||
return true;
|
||||
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
|
||||
index e0a839813a07..5c0d05bcc78c 100644
|
||||
index 8072b8aa696e..e15894ca788f 100644
|
||||
--- chrome/common/crash_keys.cc
|
||||
+++ chrome/common/crash_keys.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
@ -93,16 +93,16 @@ index e0a839813a07..5c0d05bcc78c 100644
|
||||
#include "base/base_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/logging.h"
|
||||
@@ -26,7 +28,7 @@
|
||||
|
||||
@@ -27,7 +29,7 @@
|
||||
namespace crash_keys {
|
||||
|
||||
// Return true if we DON'T want to upload this flag to the crash server.
|
||||
-static bool IsBoringSwitch(const std::string& flag) {
|
||||
+bool IsBoringChromeSwitch(const std::string& flag) {
|
||||
static const char* const kIgnoreSwitches[] = {
|
||||
switches::kEnableLogging,
|
||||
switches::kFlagSwitchesBegin,
|
||||
@@ -77,7 +79,7 @@ static bool IsBoringSwitch(const std::string& flag) {
|
||||
@@ -82,7 +84,7 @@ static bool IsBoringSwitch(const std::string& flag) {
|
||||
}
|
||||
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) {
|
||||
@ -127,7 +127,7 @@ index bcf172e645a2..f879aa745adf 100644
|
||||
// on the given |command_line|.
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
||||
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
|
||||
index 3ab8ad2c5aad..ba4a353c370b 100644
|
||||
index bb5ee46d3f2b..639958e189ad 100644
|
||||
--- components/crash/content/app/breakpad_linux.cc
|
||||
+++ components/crash/content/app/breakpad_linux.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
@ -138,15 +138,15 @@ index 3ab8ad2c5aad..ba4a353c370b 100644
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/linux_util.h"
|
||||
@@ -89,6 +90,7 @@ namespace {
|
||||
|
||||
#if !defined(OS_CHROMEOS)
|
||||
@@ -101,6 +102,7 @@ namespace {
|
||||
uint64_t g_crash_loop_before_time = 0;
|
||||
#else
|
||||
const char kUploadURL[] = "https://clients2.google.com/cr/report";
|
||||
+const char* g_crash_server_url = kUploadURL;
|
||||
#endif
|
||||
|
||||
bool g_is_crash_reporter_enabled = false;
|
||||
@@ -702,7 +704,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
@@ -714,7 +716,7 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
info.process_type_length = 7;
|
||||
info.distro = base::g_linux_distro;
|
||||
info.distro_length = my_strlen(base::g_linux_distro);
|
||||
@ -155,7 +155,7 @@ index 3ab8ad2c5aad..ba4a353c370b 100644
|
||||
info.process_start_time = g_process_start_time;
|
||||
info.oom_size = base::g_oom_size;
|
||||
info.pid = g_pid;
|
||||
@@ -1357,7 +1359,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
@@ -1400,7 +1402,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
header_content_encoding,
|
||||
header_content_type,
|
||||
post_file,
|
||||
@ -164,7 +164,7 @@ index 3ab8ad2c5aad..ba4a353c370b 100644
|
||||
"--timeout=10", // Set a timeout so we don't hang forever.
|
||||
"--tries=1", // Don't retry if the upload fails.
|
||||
"-O", // Output reply to the file descriptor path.
|
||||
@@ -1697,10 +1699,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1740,10 +1742,19 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
|
||||
|
||||
writer.AddBoundary();
|
||||
@ -186,7 +186,7 @@ index 3ab8ad2c5aad..ba4a353c370b 100644
|
||||
if (info.pid > 0) {
|
||||
char pid_value_buf[kUint64StringSize];
|
||||
uint64_t pid_value_len = my_uint64_len(info.pid);
|
||||
@@ -1817,10 +1828,20 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
@@ -1860,10 +1871,20 @@ void HandleCrashDump(const BreakpadInfo& info) {
|
||||
crash_reporter::internal::TransitionalCrashKeyStorage;
|
||||
CrashKeyStorage::Iterator crash_key_iterator(*info.crash_keys);
|
||||
const CrashKeyStorage::Entry* entry;
|
||||
@ -208,7 +208,7 @@ index 3ab8ad2c5aad..ba4a353c370b 100644
|
||||
writer.AddBoundary();
|
||||
writer.Flush();
|
||||
}
|
||||
@@ -2032,6 +2053,17 @@ void SetChannelCrashKey(const std::string& channel) {
|
||||
@@ -2075,6 +2096,17 @@ void SetChannelCrashKey(const std::string& channel) {
|
||||
channel_key.Set(channel);
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ index 3ab8ad2c5aad..ba4a353c370b 100644
|
||||
void InitNonBrowserCrashReporterForAndroid(const std::string& process_type) {
|
||||
SanitizationInfo sanitization_info;
|
||||
diff --git components/crash/content/app/breakpad_linux.h components/crash/content/app/breakpad_linux.h
|
||||
index 6e95af6ca7f5..061fb189d60f 100644
|
||||
index fb7f0a8af261..0d25d227fb8a 100644
|
||||
--- components/crash/content/app/breakpad_linux.h
|
||||
+++ components/crash/content/app/breakpad_linux.h
|
||||
@@ -20,6 +20,9 @@ extern void InitCrashReporter(const std::string& process_type);
|
||||
@ -597,18 +597,3 @@ index 8f55759a6f4a..5d60fc3f84eb 100644
|
||||
std::vector<std::string> arguments(start_arguments);
|
||||
|
||||
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
||||
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
|
||||
index 59396b7f26e3..31491e1b5d20 100644
|
||||
--- content/browser/frame_host/debug_urls.cc
|
||||
+++ content/browser/frame_host/debug_urls.cc
|
||||
@@ -136,7 +136,9 @@ bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
|
||||
cc::switches::kEnableGpuBenchmarking) &&
|
||||
(PageTransitionCoreTypeIs(transition, ui::PAGE_TRANSITION_TYPED));
|
||||
|
||||
- if (!(transition & ui::PAGE_TRANSITION_FROM_ADDRESS_BAR) &&
|
||||
+ // CEF does not use PAGE_TRANSITION_FROM_ADDRESS_BAR.
|
||||
+ if (!(transition & (ui::PAGE_TRANSITION_TYPED |
|
||||
+ ui::PAGE_TRANSITION_FROM_ADDRESS_BAR)) &&
|
||||
!is_telemetry_navigation)
|
||||
return false;
|
||||
|
||||
|
@ -146,7 +146,7 @@ index a2b0c74636f4..01370fdc20d9 100644
|
||||
struct Data;
|
||||
|
||||
diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
index dc32b94e651c..100a52ce25f9 100644
|
||||
index b841b0ccd3a2..94ff9177d842 100644
|
||||
--- third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
+++ third_party/crashpad/crashpad/handler/BUILD.gn
|
||||
@@ -12,6 +12,7 @@
|
||||
@ -184,10 +184,10 @@ index dc32b94e651c..100a52ce25f9 100644
|
||||
|
||||
if (crashpad_is_win) {
|
||||
diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
index 205d860f9139..e077a835a19e 100644
|
||||
index e144bddc67d1..f3d727d0b247 100644
|
||||
--- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
+++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc
|
||||
@@ -268,6 +268,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
||||
@@ -262,6 +262,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport(
|
||||
if (minidump_process_snapshot.Initialize(reader)) {
|
||||
parameters =
|
||||
BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot);
|
||||
@ -248,7 +248,7 @@ index 2ec1147d2620..8ff9a72e0bd7 100644
|
||||
//! \brief Calls ProcessPendingReports() in response to ReportPending() having
|
||||
//! been called on any thread, as well as periodically on a timer.
|
||||
diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
index 724168ee9657..ae31efb356a1 100644
|
||||
index 05a2e7b44e41..6e72c17a57e6 100644
|
||||
--- third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
+++ third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
@@ -36,8 +36,10 @@
|
||||
@ -262,7 +262,7 @@ index 724168ee9657..ae31efb356a1 100644
|
||||
#include "client/crash_report_database.h"
|
||||
#include "client/crashpad_client.h"
|
||||
#include "client/crashpad_info.h"
|
||||
@@ -93,6 +95,10 @@
|
||||
@@ -96,6 +98,10 @@
|
||||
#include "handler/linux/exception_handler_server.h"
|
||||
#endif // OS_MACOSX
|
||||
|
||||
@ -273,7 +273,7 @@ index 724168ee9657..ae31efb356a1 100644
|
||||
namespace crashpad {
|
||||
|
||||
namespace {
|
||||
@@ -185,6 +191,9 @@ struct Options {
|
||||
@@ -188,6 +194,9 @@ struct Options {
|
||||
bool periodic_tasks;
|
||||
bool rate_limit;
|
||||
bool upload_gzip;
|
||||
@ -283,7 +283,7 @@ index 724168ee9657..ae31efb356a1 100644
|
||||
};
|
||||
|
||||
// Splits |key_value| on '=' and inserts the resulting key and value into |map|.
|
||||
@@ -562,6 +571,9 @@ int HandlerMain(int argc,
|
||||
@@ -553,6 +562,9 @@ int HandlerMain(int argc,
|
||||
kOptionTraceParentWithException,
|
||||
#endif
|
||||
kOptionURL,
|
||||
@ -293,7 +293,7 @@ index 724168ee9657..ae31efb356a1 100644
|
||||
|
||||
// Standard options.
|
||||
kOptionHelp = -2,
|
||||
@@ -629,6 +641,9 @@ int HandlerMain(int argc,
|
||||
@@ -620,6 +632,9 @@ int HandlerMain(int argc,
|
||||
{"url", required_argument, nullptr, kOptionURL},
|
||||
{"help", no_argument, nullptr, kOptionHelp},
|
||||
{"version", no_argument, nullptr, kOptionVersion},
|
||||
@ -303,7 +303,7 @@ index 724168ee9657..ae31efb356a1 100644
|
||||
{nullptr, 0, nullptr, 0},
|
||||
};
|
||||
|
||||
@@ -768,6 +783,27 @@ int HandlerMain(int argc,
|
||||
@@ -759,6 +774,27 @@ int HandlerMain(int argc,
|
||||
options.url = optarg;
|
||||
break;
|
||||
}
|
||||
@ -331,7 +331,7 @@ index 724168ee9657..ae31efb356a1 100644
|
||||
case kOptionHelp: {
|
||||
Usage(me);
|
||||
MetricsRecordExit(Metrics::LifetimeMilestone::kExitedEarly);
|
||||
@@ -888,8 +924,14 @@ int HandlerMain(int argc,
|
||||
@@ -879,8 +915,14 @@ int HandlerMain(int argc,
|
||||
upload_thread_options.upload_gzip = options.upload_gzip;
|
||||
upload_thread_options.watch_pending_reports = options.periodic_tasks;
|
||||
|
||||
@ -346,7 +346,7 @@ index 724168ee9657..ae31efb356a1 100644
|
||||
upload_thread.Get()->Start();
|
||||
}
|
||||
|
||||
@@ -917,7 +959,8 @@ int HandlerMain(int argc,
|
||||
@@ -908,7 +950,8 @@ int HandlerMain(int argc,
|
||||
ScopedStoppable prune_thread;
|
||||
if (options.periodic_tasks) {
|
||||
prune_thread.Reset(new PruneCrashReportThread(
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
index 9e81f0a33ede..b796e79ae7ef 100644
|
||||
index 3841b7adf65d..41ca32ea5e2f 100644
|
||||
--- chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
+++ chrome/browser/extensions/api/streams_private/streams_private_api.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@ -10,7 +10,7 @@ index 9e81f0a33ede..b796e79ae7ef 100644
|
||||
#include "chrome/browser/extensions/extension_tab_util.h"
|
||||
#include "chrome/browser/prerender/prerender_contents.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
@@ -42,6 +43,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
|
||||
@@ -40,6 +41,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
|
||||
if (!web_contents)
|
||||
return;
|
||||
|
||||
@ -18,7 +18,7 @@ index 9e81f0a33ede..b796e79ae7ef 100644
|
||||
// If the request was for a prerender, abort the prerender and do not
|
||||
// continue. This is because plugins cancel prerender, see
|
||||
// http://crbug.com/343590.
|
||||
@@ -51,6 +53,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
|
||||
@@ -49,6 +51,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
|
||||
prerender_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
|
||||
return;
|
||||
}
|
||||
@ -27,7 +27,7 @@ index 9e81f0a33ede..b796e79ae7ef 100644
|
||||
auto* browser_context = web_contents->GetBrowserContext();
|
||||
|
||||
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
|
||||
index 8cc9503fc131..b74c385b40a2 100644
|
||||
index 5dc2d564c85a..864f2f12657c 100644
|
||||
--- extensions/browser/extension_host.cc
|
||||
+++ extensions/browser/extension_host.cc
|
||||
@@ -67,11 +67,12 @@ ExtensionHost::ExtensionHost(const Extension* extension,
|
||||
@ -97,7 +97,7 @@ index 8cc9503fc131..b74c385b40a2 100644
|
||||
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
|
||||
|
||||
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
|
||||
index 4027505469b8..de8258562bb2 100644
|
||||
index c0f80fd848d6..75b0e53ae68e 100644
|
||||
--- extensions/browser/extension_host.h
|
||||
+++ extensions/browser/extension_host.h
|
||||
@@ -52,13 +52,19 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
@ -121,7 +121,7 @@ index 4027505469b8..de8258562bb2 100644
|
||||
content::RenderViewHost* render_view_host() const;
|
||||
content::RenderProcessHost* render_process_host() const;
|
||||
bool has_loaded_once() const { return has_loaded_once_; }
|
||||
@@ -180,7 +186,8 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
@@ -181,7 +187,8 @@ class ExtensionHost : public DeferredStartRenderHost,
|
||||
content::BrowserContext* browser_context_;
|
||||
|
||||
// The host for our HTML content.
|
||||
@ -132,10 +132,10 @@ index 4027505469b8..de8258562bb2 100644
|
||||
// A weak pointer to the current or pending RenderViewHost. We don't access
|
||||
// this through the host_contents because we want to deal with the pending
|
||||
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
|
||||
index 3ed389242f67..4cc4d2a5bed8 100644
|
||||
index 2f4890b54897..84164c1170a3 100644
|
||||
--- extensions/browser/extensions_browser_client.h
|
||||
+++ extensions/browser/extensions_browser_client.h
|
||||
@@ -60,6 +60,7 @@ class ComponentExtensionResourceManager;
|
||||
@@ -54,6 +54,7 @@ class ComponentExtensionResourceManager;
|
||||
class Extension;
|
||||
class ExtensionCache;
|
||||
class ExtensionError;
|
||||
@ -143,7 +143,7 @@ index 3ed389242f67..4cc4d2a5bed8 100644
|
||||
class ExtensionHostDelegate;
|
||||
class ExtensionApiFrameIdMap;
|
||||
class ExtensionApiFrameIdMapHelper;
|
||||
@@ -213,6 +214,14 @@ class ExtensionsBrowserClient {
|
||||
@@ -195,6 +196,14 @@ class ExtensionsBrowserClient {
|
||||
virtual std::unique_ptr<ExtensionHostDelegate>
|
||||
CreateExtensionHostDelegate() = 0;
|
||||
|
||||
@ -159,10 +159,10 @@ index 3ed389242f67..4cc4d2a5bed8 100644
|
||||
// once each time the extensions system is loaded per browser_context. The
|
||||
// implementation may wish to use the BrowserContext to record the current
|
||||
diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc
|
||||
index b203c136597a..4967c176f9b8 100644
|
||||
index e0f053ce45bd..3bf13bc0ad03 100644
|
||||
--- extensions/browser/process_manager.cc
|
||||
+++ extensions/browser/process_manager.cc
|
||||
@@ -383,9 +383,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
|
||||
@@ -382,9 +382,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
|
||||
return true; // TODO(kalman): return false here? It might break things...
|
||||
|
||||
DVLOG(1) << "CreateBackgroundHost " << extension->id();
|
||||
|
@ -1,10 +1,10 @@
|
||||
diff --git .gn .gn
|
||||
index 01085ea84619..b79158a1a962 100644
|
||||
index 70856f65e720..649c347a899b 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -666,6 +666,8 @@ exec_script_whitelist =
|
||||
# in the Chromium repo outside of //build.
|
||||
"//build_overrides/build.gni",
|
||||
@@ -670,6 +670,8 @@ exec_script_whitelist =
|
||||
|
||||
"//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
|
||||
|
||||
+ "//cef/BUILD.gn",
|
||||
+
|
||||
@ -12,10 +12,10 @@ index 01085ea84619..b79158a1a962 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 8209523bebe9..84137b1a5cca 100644
|
||||
index 19fd588dfed1..30d3a9774eb3 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -202,6 +202,7 @@ group("gn_all") {
|
||||
@@ -204,6 +204,7 @@ group("gn_all") {
|
||||
|
||||
if (!is_ios && !is_fuchsia) {
|
||||
deps += [
|
||||
@ -100,7 +100,7 @@ index ef8aeda56458..5b7f057311b9 100644
|
||||
|
||||
|
||||
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
||||
index 6a0dcbdb4fe2..9902f5da105a 100755
|
||||
index 97f503bff408..fe1f0344dd77 100755
|
||||
--- build/vs_toolchain.py
|
||||
+++ build/vs_toolchain.py
|
||||
@@ -81,11 +81,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
@ -123,10 +123,10 @@ index 6a0dcbdb4fe2..9902f5da105a 100755
|
||||
# directory in order to run binaries locally, but they are needed in order
|
||||
# to create isolates or the mini_installer. Copying them to the output
|
||||
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
|
||||
index 8ff44c72636e..bb5e1a42aed4 100644
|
||||
index 93af4dcd03bb..e1a8543a5f14 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -275,7 +275,7 @@ template("chrome_paks") {
|
||||
@@ -271,7 +271,7 @@ template("chrome_paks") {
|
||||
}
|
||||
|
||||
input_locales = locales
|
||||
@ -136,10 +136,10 @@ index 8ff44c72636e..bb5e1a42aed4 100644
|
||||
if (is_mac) {
|
||||
output_locales = locales_as_mac_outputs
|
||||
diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn
|
||||
index 397c151b160b..adfc8c0e27b2 100644
|
||||
index 7a779fc3ce1a..2ba4d85fa276 100644
|
||||
--- chrome/installer/mini_installer/BUILD.gn
|
||||
+++ chrome/installer/mini_installer/BUILD.gn
|
||||
@@ -134,7 +134,7 @@ template("generate_mini_installer") {
|
||||
@@ -133,7 +133,7 @@ template("generate_mini_installer") {
|
||||
inputs = [
|
||||
"$chrome_dll_file",
|
||||
"$root_out_dir/chrome.exe",
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
|
||||
index 2a7cb2dcb562..3fef6b5dee49 100644
|
||||
index 7ac3cf37b481..0ad6d1b8c31d 100644
|
||||
--- tools/gritsettings/resource_ids
|
||||
+++ tools/gritsettings/resource_ids
|
||||
@@ -459,4 +459,11 @@
|
||||
@@ -466,4 +466,11 @@
|
||||
# Please read the header and find the right section above instead.
|
||||
|
||||
# Resource ids starting at 31000 are reserved for projects built on Chromium.
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git ui/base/ime/win/input_method_win_base.cc ui/base/ime/win/input_method_win_base.cc
|
||||
index 2627f1eae901..80c00fc9752a 100644
|
||||
index 9d014932e5cd..8fcf988f5897 100644
|
||||
--- ui/base/ime/win/input_method_win_base.cc
|
||||
+++ ui/base/ime/win/input_method_win_base.cc
|
||||
@@ -266,8 +266,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {
|
||||
@@ -264,8 +264,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {
|
||||
// receiving keyboard input as long as it is an active window. This works well
|
||||
// even when the |attached_window_handle| becomes active but has not received
|
||||
// WM_FOCUS yet.
|
||||
|
@ -12,10 +12,10 @@ index a277ffa5eb59..3935b9f8c17c 100644
|
||||
if (base::PathExists(sandbox_candidate))
|
||||
sandbox_binary = sandbox_candidate;
|
||||
diff --git ui/gl/init/gl_initializer_x11.cc ui/gl/init/gl_initializer_x11.cc
|
||||
index e3c481b97d89..5fde4a0bb388 100644
|
||||
index 3fc37d1c06bd..becd622d631e 100644
|
||||
--- ui/gl/init/gl_initializer_x11.cc
|
||||
+++ ui/gl/init/gl_initializer_x11.cc
|
||||
@@ -88,7 +88,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
|
||||
@@ -86,7 +86,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
|
||||
if (implementation == kGLImplementationSwiftShaderGL) {
|
||||
#if BUILDFLAG(ENABLE_SWIFTSHADER)
|
||||
base::FilePath module_path;
|
||||
@ -24,9 +24,9 @@ index e3c481b97d89..5fde4a0bb388 100644
|
||||
return false;
|
||||
module_path = module_path.Append("swiftshader/");
|
||||
|
||||
@@ -100,7 +100,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
|
||||
} else if (cmd->GetSwitchValueASCII(switches::kUseGL) ==
|
||||
kGLImplementationANGLEName) {
|
||||
@@ -97,7 +97,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
|
||||
#endif
|
||||
} else if (implementation == kGLImplementationEGLANGLE) {
|
||||
base::FilePath module_path;
|
||||
- if (!base::PathService::Get(base::DIR_MODULE, &module_path))
|
||||
+ if (!base::PathService::Get(base::DIR_ASSETS, &module_path))
|
||||
|
@ -39,10 +39,10 @@ index 07f06ac694f5..831fd9f82dbe 100644
|
||||
|
||||
void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
|
||||
diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn
|
||||
index 1fb3cf77f01c..dbb03ffe3333 100644
|
||||
index f60af132bcdd..626c0081b78a 100644
|
||||
--- chrome/test/BUILD.gn
|
||||
+++ chrome/test/BUILD.gn
|
||||
@@ -4286,7 +4286,7 @@ test("unit_tests") {
|
||||
@@ -4457,7 +4457,7 @@ test("unit_tests") {
|
||||
if (use_gio) {
|
||||
configs += [ "//build/linux:gio_config" ]
|
||||
}
|
||||
@ -51,7 +51,7 @@ index 1fb3cf77f01c..dbb03ffe3333 100644
|
||||
deps += [ "//chrome/browser/ui/libgtkui" ]
|
||||
}
|
||||
|
||||
@@ -5286,7 +5286,7 @@ if (!is_android) {
|
||||
@@ -5471,7 +5471,7 @@ if (!is_android) {
|
||||
# suites, it seems like one or another starts timing out too.
|
||||
"../browser/ui/views/keyboard_access_browsertest.cc",
|
||||
]
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
|
||||
index 0ff8924fed4d..6c079b38e730 100644
|
||||
index 4b727c37c4f3..ba97a9e38ae7 100644
|
||||
--- base/files/file_path_watcher_linux.cc
|
||||
+++ base/files/file_path_watcher_linux.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
|
||||
index 8d690474060f..03059842b1a4 100644
|
||||
index cadd51581c1b..d266c9ddc225 100644
|
||||
--- ui/gl/init/gl_initializer_mac.cc
|
||||
+++ ui/gl/init/gl_initializer_mac.cc
|
||||
@@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() {
|
||||
|
@ -25,7 +25,7 @@ index a1d6acc4e78d..f9518bc96ce4 100644
|
||||
#if defined(OS_IOS)
|
||||
// On iOS, the main message loop cannot be Run(). Instead call Attach(),
|
||||
diff --git base/message_loop/message_loop_current.cc base/message_loop/message_loop_current.cc
|
||||
index 71a45d077a6a..fded5cf39adc 100644
|
||||
index 54e2d2b41dbd..cd299c90618b 100644
|
||||
--- base/message_loop/message_loop_current.cc
|
||||
+++ base/message_loop/message_loop_current.cc
|
||||
@@ -47,6 +47,8 @@ void MessageLoopCurrent::AddDestructionObserver(
|
||||
@ -38,10 +38,10 @@ index 71a45d077a6a..fded5cf39adc 100644
|
||||
current_->RemoveDestructionObserver(destruction_observer);
|
||||
}
|
||||
diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h
|
||||
index f259d89d429c..ffcc61ee95c2 100644
|
||||
index 08a1c5e36735..48c5f8d102d0 100644
|
||||
--- base/message_loop/message_loop_current.h
|
||||
+++ base/message_loop/message_loop_current.h
|
||||
@@ -129,6 +129,12 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
@@ -124,6 +124,12 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
// posted tasks.
|
||||
void SetAddQueueTimeToTasks(bool enable);
|
||||
|
||||
@ -54,7 +54,7 @@ index f259d89d429c..ffcc61ee95c2 100644
|
||||
// Enables or disables the recursive task processing. This happens in the case
|
||||
// of recursive message loops. Some unwanted message loops may occur when
|
||||
// using common controls or printer functions. By default, recursive task
|
||||
@@ -199,6 +205,13 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
@@ -194,6 +200,13 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
friend class web::TestWebThreadBundle;
|
||||
|
||||
sequence_manager::internal::SequenceManagerImpl* current_;
|
||||
|
@ -1,35 +0,0 @@
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 42f20931a..2a14a60e7 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -199,6 +199,10 @@ jumbo_component("pdfium") {
|
||||
if (is_component_build) {
|
||||
deps += [ "testing/fuzzers:fuzzer_impls" ]
|
||||
}
|
||||
+
|
||||
+ include_dirs = [
|
||||
+ "//v8/include",
|
||||
+ ]
|
||||
}
|
||||
|
||||
# Targets below this are only visible within this file (and to the
|
||||
diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp
|
||||
index 63374d2e9..7e9c32146 100644
|
||||
--- fpdfsdk/fpdf_view.cpp
|
||||
+++ fpdfsdk/fpdf_view.cpp
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "fpdfsdk/cpdfsdk_helpers.h"
|
||||
#include "fpdfsdk/cpdfsdk_pageview.h"
|
||||
#include "fpdfsdk/ipdfsdk_pauseadapter.h"
|
||||
+#include "fxjs/cfxjs_engine.h"
|
||||
#include "fxjs/ijs_runtime.h"
|
||||
#include "public/fpdf_formfill.h"
|
||||
#include "third_party/base/ptr_util.h"
|
||||
@@ -184,6 +185,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
|
||||
|
||||
CPDF_ModuleMgr::Destroy();
|
||||
CFX_GEModule::Destroy();
|
||||
+ FXJS_Release();
|
||||
|
||||
IJS_Runtime::Destroy();
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
|
||||
index 9ad8ad0bfa50..2724dab2f003 100644
|
||||
index c0c22fa5429f..f0a6215f3f54 100644
|
||||
--- content/public/common/common_param_traits_macros.h
|
||||
+++ content/public/common/common_param_traits_macros.h
|
||||
@@ -188,6 +188,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
@@ -191,6 +191,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes)
|
||||
IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale)
|
||||
IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled)
|
||||
@ -11,11 +11,11 @@ index 9ad8ad0bfa50..2724dab2f003 100644
|
||||
IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop)
|
||||
IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled)
|
||||
diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc
|
||||
index e2f3d5b5e1f9..3bf01af841ac 100644
|
||||
index 678bd07c0753..1ae838c3de32 100644
|
||||
--- content/public/common/web_preferences.cc
|
||||
+++ content/public/common/web_preferences.cc
|
||||
@@ -168,6 +168,7 @@ WebPreferences::WebPreferences()
|
||||
spatial_navigation_enabled(false),
|
||||
@@ -169,6 +169,7 @@ WebPreferences::WebPreferences()
|
||||
caret_browsing_enabled(false),
|
||||
use_solid_color_scrollbars(false),
|
||||
navigate_on_drag_drop(true),
|
||||
+ base_background_color(0xFFFFFFFF), // Color::white
|
||||
@ -23,11 +23,11 @@ index e2f3d5b5e1f9..3bf01af841ac 100644
|
||||
record_whole_document(false),
|
||||
cookie_enabled(true),
|
||||
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
|
||||
index f9a996476d5d..09d69329e037 100644
|
||||
index ca883e52fee0..0bc16d1e8330 100644
|
||||
--- content/public/common/web_preferences.h
|
||||
+++ content/public/common/web_preferences.h
|
||||
@@ -184,6 +184,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
bool spatial_navigation_enabled;
|
||||
@@ -186,6 +186,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
bool caret_browsing_enabled;
|
||||
bool use_solid_color_scrollbars;
|
||||
bool navigate_on_drag_drop;
|
||||
+ uint32_t base_background_color;
|
||||
@ -35,10 +35,10 @@ index f9a996476d5d..09d69329e037 100644
|
||||
bool record_whole_document;
|
||||
|
||||
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
|
||||
index 1aa52af90279..e3107e93c866 100644
|
||||
index d0ca81590d2b..8f2f30878650 100644
|
||||
--- content/renderer/render_view_impl.cc
|
||||
+++ content/renderer/render_view_impl.cc
|
||||
@@ -1012,6 +1012,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
@@ -1018,6 +1018,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
#endif
|
||||
|
||||
WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available);
|
||||
|
@ -34,18 +34,18 @@ index 323534a720c1..72b232f0ed85 100644
|
||||
|
||||
bool DownloadPrefs::IsFromTrustedSource(const download::DownloadItem& item) {
|
||||
diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc
|
||||
index c26ddaa9aa12..ad181fdc7478 100644
|
||||
index d2a3be7590a0..883825bfc996 100644
|
||||
--- chrome/browser/printing/print_preview_dialog_controller.cc
|
||||
+++ chrome/browser/printing/print_preview_dialog_controller.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "base/path_service.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/chrome_notification_types.h"
|
||||
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
|
||||
@@ -420,8 +421,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog(
|
||||
#include "chrome/browser/printing/print_view_manager.h"
|
||||
@@ -440,8 +441,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog(
|
||||
content::HostZoomMap::Get(preview_dialog->GetSiteInstance())
|
||||
->SetZoomLevelForHostAndScheme(print_url.scheme(), print_url.host(), 0);
|
||||
PrintViewManager::CreateForWebContents(preview_dialog);
|
||||
@ -58,22 +58,22 @@ index c26ddaa9aa12..ad181fdc7478 100644
|
||||
// Add an entry to the map.
|
||||
preview_dialog_map_[preview_dialog] = initiator;
|
||||
diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html
|
||||
index 624b32bd370e..69b6134bcc41 100644
|
||||
index a941dae7276b..73e875985b8e 100644
|
||||
--- chrome/browser/resources/print_preview/ui/destination_dialog.html
|
||||
+++ chrome/browser/resources/print_preview/ui/destination_dialog.html
|
||||
@@ -180,9 +180,7 @@
|
||||
@@ -182,9 +182,7 @@
|
||||
</print-preview-provisional-destination-resolver>
|
||||
</div>
|
||||
<div slot="button-container">
|
||||
- <paper-button on-click="onOpenSettingsPrintPage_">
|
||||
- <cr-button on-click="onOpenSettingsPrintPage_">
|
||||
- $i18n{manage}
|
||||
- </paper-button>
|
||||
- </cr-button>
|
||||
+ <div></div>
|
||||
<paper-button class="cancel-button" on-click="onCancelButtonClick_">
|
||||
<cr-button class="cancel-button" on-click="onCancelButtonClick_">
|
||||
$i18n{cancel}
|
||||
</paper-button>
|
||||
</cr-button>
|
||||
diff --git chrome/browser/resources/print_preview/ui/destination_select.html chrome/browser/resources/print_preview/ui/destination_select.html
|
||||
index d8369b509661..a0791e34b570 100644
|
||||
index 2b7cb3cec173..af79ac632cb4 100644
|
||||
--- chrome/browser/resources/print_preview/ui/destination_select.html
|
||||
+++ chrome/browser/resources/print_preview/ui/destination_select.html
|
||||
@@ -47,10 +47,6 @@
|
||||
@ -112,11 +112,11 @@ index 12f77178ea92..470b13bd7879 100644
|
||||
|
||||
ConstrainedWebDialogUI::~ConstrainedWebDialogUI() {
|
||||
diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
|
||||
index e0d6a9034332..250cbeedd842 100644
|
||||
index 6147b07f6dad..a68b5bfaf193 100644
|
||||
--- chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
|
||||
@@ -144,8 +144,10 @@ PdfPrinterHandler::PdfPrinterHandler(Profile* profile,
|
||||
weak_ptr_factory_(this) {}
|
||||
@@ -143,8 +143,10 @@ PdfPrinterHandler::PdfPrinterHandler(Profile* profile,
|
||||
sticky_settings_(sticky_settings) {}
|
||||
|
||||
PdfPrinterHandler::~PdfPrinterHandler() {
|
||||
+#if !BUILDFLAG(ENABLE_CEF)
|
||||
@ -126,7 +126,7 @@ index e0d6a9034332..250cbeedd842 100644
|
||||
}
|
||||
|
||||
void PdfPrinterHandler::Reset() {
|
||||
@@ -180,12 +182,14 @@ void PdfPrinterHandler::StartPrint(
|
||||
@@ -179,12 +181,14 @@ void PdfPrinterHandler::StartPrint(
|
||||
return;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ index e0d6a9034332..250cbeedd842 100644
|
||||
|
||||
DCHECK(!print_callback_);
|
||||
print_callback_ = std::move(callback);
|
||||
@@ -324,7 +328,11 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
@@ -323,7 +327,11 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
// If the directory is empty there is no reason to create it or use the
|
||||
// default location.
|
||||
if (path.empty()) {
|
||||
@ -153,7 +153,7 @@ index e0d6a9034332..250cbeedd842 100644
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -334,8 +342,14 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
@@ -333,8 +341,14 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
|
||||
base::PostTaskWithTraitsAndReplyWithResult(
|
||||
FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT},
|
||||
base::BindOnce(&SelectSaveDirectory, path, default_path),
|
||||
@ -168,7 +168,7 @@ index e0d6a9034332..250cbeedd842 100644
|
||||
}
|
||||
|
||||
void PdfPrinterHandler::PostPrintToPdfTask() {
|
||||
@@ -351,6 +365,7 @@ void PdfPrinterHandler::OnGotUniqueFileName(const base::FilePath& path) {
|
||||
@@ -350,6 +364,7 @@ void PdfPrinterHandler::OnGotUniqueFileName(const base::FilePath& path) {
|
||||
FileSelected(path, 0, nullptr);
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ index e0d6a9034332..250cbeedd842 100644
|
||||
void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
|
||||
const base::FilePath& directory) {
|
||||
base::FilePath path = directory.Append(filename);
|
||||
@@ -375,5 +390,36 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
|
||||
@@ -374,5 +389,36 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
|
||||
&file_type_info, 0, base::FilePath::StringType(),
|
||||
platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL);
|
||||
}
|
||||
@ -214,7 +214,7 @@ index e0d6a9034332..250cbeedd842 100644
|
||||
|
||||
} // namespace printing
|
||||
diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.h chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
|
||||
index eae9098f2136..1a4c4419e736 100644
|
||||
index 06f5799efbb9..6119691b2700 100644
|
||||
--- chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
|
||||
+++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
|
||||
@@ -11,9 +11,14 @@
|
||||
@ -262,7 +262,7 @@ index eae9098f2136..1a4c4419e736 100644
|
||||
Profile* const profile_;
|
||||
StickySettings* const sticky_settings_;
|
||||
diff --git chrome/browser/ui/webui/print_preview/print_preview_handler.cc chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||||
index 47528eaccd78..2ecd9e3d5c03 100644
|
||||
index e3d7c5f14cd5..70d1b47d35c9 100644
|
||||
--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@ -273,7 +273,7 @@ index 47528eaccd78..2ecd9e3d5c03 100644
|
||||
#include "chrome/browser/app_mode/app_mode_utils.h"
|
||||
#include "chrome/browser/bad_message.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
@@ -1243,6 +1244,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
@@ -1226,6 +1227,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
|
||||
}
|
||||
return privet_printer_handler_.get();
|
||||
}
|
||||
@ -283,7 +283,7 @@ index 47528eaccd78..2ecd9e3d5c03 100644
|
||||
#endif
|
||||
if (printer_type == PrinterType::kPdfPrinter) {
|
||||
if (!pdf_printer_handler_) {
|
||||
@@ -1325,6 +1329,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
|
||||
@@ -1308,6 +1312,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
|
||||
}
|
||||
|
||||
void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
@ -291,7 +291,7 @@ index 47528eaccd78..2ecd9e3d5c03 100644
|
||||
DCHECK(!identity_manager_);
|
||||
cloud_print_enabled_ =
|
||||
GetPrefs()->GetBoolean(prefs::kCloudPrintSubmitEnabled);
|
||||
@@ -1340,6 +1345,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
@@ -1323,6 +1328,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
|
||||
|
||||
identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
|
||||
identity_manager_->AddObserver(this);
|
||||
@ -300,7 +300,7 @@ index 47528eaccd78..2ecd9e3d5c03 100644
|
||||
|
||||
void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
|
||||
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
index f90198efcf2a..d866bf90c13a 100644
|
||||
index 2dfc91469b8e..c6fd71452fb9 100644
|
||||
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
@ -311,7 +311,7 @@ index f90198efcf2a..d866bf90c13a 100644
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/printing/background_printing_manager.h"
|
||||
#include "chrome/browser/printing/print_preview_data_service.h"
|
||||
@@ -73,12 +74,16 @@ namespace printing {
|
||||
@@ -72,12 +73,16 @@ namespace printing {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc
|
||||
index 691c476708b6..f198e2d0584f 100644
|
||||
index 63f432b58371..fe664e69427a 100644
|
||||
--- chrome/browser/printing/print_job_worker.cc
|
||||
+++ chrome/browser/printing/print_job_worker.cc
|
||||
@@ -148,6 +148,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
|
||||
thread_("Printing_Worker"),
|
||||
weak_factory_(this) {
|
||||
@@ -130,6 +130,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id)
|
||||
PrintingContext::Create(printing_context_delegate_.get())),
|
||||
thread_("Printing_Worker") {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
||||
+ printing_context_->set_render_ids(render_process_id, render_frame_id);
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
diff --git build/config/compiler/compiler.gni build/config/compiler/compiler.gni
|
||||
index c351d6babb8d..db5b4f0b973a 100644
|
||||
--- build/config/compiler/compiler.gni
|
||||
+++ build/config/compiler/compiler.gni
|
||||
@@ -248,18 +248,6 @@ if (symbol_level == -1) {
|
||||
}
|
||||
}
|
||||
|
||||
-# Non-component debug builds with symbol_level = 2 are an undesirable (very slow
|
||||
-# build times) and unsupported (some test binaries will fail with > 4 GB PDBs)
|
||||
-# combination. This is only checked when current_toolchain == default_toolchain
|
||||
-# because the is_component_build flag is set to false in various components of
|
||||
-# the build (like nacl) and we don't want to assert on those.
|
||||
-# iOS does not support component builds so add an exception for this platform.
|
||||
-if (build_with_chromium) {
|
||||
- assert(symbol_level != 2 || current_toolchain != default_toolchain ||
|
||||
- is_component_build || !is_debug || is_ios,
|
||||
- "Can't do non-component debug builds at symbol_level=2")
|
||||
-}
|
||||
-
|
||||
# Assert that the configuration isn't going to hit https://crbug.com/648948.
|
||||
# An exception is made when target_os == "chromeos" as we only use the Android
|
||||
# toolchain there to build relatively small binaries.
|
51
patch/patches/render_accessibility_1675917.patch
Normal file
51
patch/patches/render_accessibility_1675917.patch
Normal file
@ -0,0 +1,51 @@
|
||||
diff --git content/renderer/accessibility/render_accessibility_impl.cc content/renderer/accessibility/render_accessibility_impl.cc
|
||||
index 96ac02ca4dda..8812c390b681 100644
|
||||
--- content/renderer/accessibility/render_accessibility_impl.cc
|
||||
+++ content/renderer/accessibility/render_accessibility_impl.cc
|
||||
@@ -194,7 +194,6 @@ void RenderAccessibilityImpl::DidCreateNewDocument() {
|
||||
void RenderAccessibilityImpl::DidCommitProvisionalLoad(
|
||||
bool is_same_document_navigation,
|
||||
ui::PageTransition transition) {
|
||||
- is_initial_load_processed_ = false;
|
||||
has_injected_stylesheet_ = false;
|
||||
// Remove the image annotator if the page is loading and it was added for
|
||||
// the one-shot image annotation (i.e. AXMode for image annotation is not
|
||||
@@ -642,8 +641,6 @@ void RenderAccessibilityImpl::SendPendingAccessibilityEvents() {
|
||||
// ids to locations.
|
||||
for (size_t j = 0; j < update.nodes.size(); ++j) {
|
||||
ui::AXNodeData& src = update.nodes[j];
|
||||
- // TODO(accessibility) What if location hasn't been set yet?
|
||||
- // Get cached location for this node or create a new entry if none exists.
|
||||
ui::AXRelativeBounds& dst = locations_[update.nodes[j].id];
|
||||
dst = src.relative_bounds;
|
||||
}
|
||||
@@ -663,13 +660,11 @@ void RenderAccessibilityImpl::SendPendingAccessibilityEvents() {
|
||||
ack_token_));
|
||||
reset_token_ = 0;
|
||||
|
||||
- if (had_layout_complete_messages && is_initial_load_processed_)
|
||||
+ if (had_layout_complete_messages)
|
||||
SendLocationChanges();
|
||||
|
||||
- if (had_load_complete_messages) {
|
||||
+ if (had_load_complete_messages)
|
||||
has_injected_stylesheet_ = false;
|
||||
- is_initial_load_processed_ = true;
|
||||
- }
|
||||
|
||||
if (image_annotation_debugging_)
|
||||
AddImageAnnotationDebuggingAttributes(bundle.updates);
|
||||
diff --git content/renderer/accessibility/render_accessibility_impl.h content/renderer/accessibility/render_accessibility_impl.h
|
||||
index e5e6325c1cf6..ebc2db666772 100644
|
||||
--- content/renderer/accessibility/render_accessibility_impl.h
|
||||
+++ content/renderer/accessibility/render_accessibility_impl.h
|
||||
@@ -238,9 +238,6 @@ class CONTENT_EXPORT RenderAccessibilityImpl
|
||||
// for debugging.
|
||||
bool image_annotation_debugging_ = false;
|
||||
|
||||
- // Has all data related to the initial page load been processed.
|
||||
- bool is_initial_load_processed_ = false;
|
||||
-
|
||||
// So we can queue up tasks to be executed later.
|
||||
base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_{this};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user