mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-16 20:20:51 +01:00
Update to Chromium version 76.0.3809.0 (#665002)
OSR tests will be fixed by a follow-up merge of Viz support (see issue #2575).
This commit is contained in:
parent
5892ffc382
commit
cc0db5f166
10
BUILD.gn
10
BUILD.gn
@ -763,7 +763,7 @@ static_library("libcef_static") {
|
||||
|
||||
deps += [
|
||||
"//chrome/install_static:secondary_module",
|
||||
"//chrome_elf",
|
||||
"//chrome/chrome_elf",
|
||||
]
|
||||
|
||||
if (is_component_build) {
|
||||
@ -1145,10 +1145,10 @@ source_set("cef_content_utility_overlay_manifest") {
|
||||
]
|
||||
}
|
||||
|
||||
source_set("cef_packaged_service_manifests") {
|
||||
source_set("builtin_service_manifests") {
|
||||
sources = [
|
||||
"libcef/common/service_manifests/cef_packaged_service_manifests.cc",
|
||||
"libcef/common/service_manifests/cef_packaged_service_manifests.h",
|
||||
"libcef/common/service_manifests/builtin_service_manifests.cc",
|
||||
"libcef/common/service_manifests/builtin_service_manifests.h",
|
||||
]
|
||||
|
||||
configs += [
|
||||
@ -1193,7 +1193,7 @@ source_set("cef_service_manifests") {
|
||||
":cef_content_gpu_overlay_manifest",
|
||||
":cef_content_renderer_overlay_manifest",
|
||||
":cef_content_utility_overlay_manifest",
|
||||
":cef_packaged_service_manifests",
|
||||
":builtin_service_manifests",
|
||||
":cef_renderer_manifest",
|
||||
]
|
||||
}
|
||||
|
@ -7,5 +7,5 @@
|
||||
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
|
||||
|
||||
{
|
||||
'chromium_checkout': 'refs/tags/75.0.3770.0'
|
||||
'chromium_checkout': 'refs/tags/76.0.3809.0'
|
||||
}
|
||||
|
@ -547,6 +547,7 @@
|
||||
'tests/shared/browser/resource_util.h',
|
||||
'tests/shared/browser/resource_util_mac.mm',
|
||||
'tests/shared/browser/resource_util_posix.cc',
|
||||
'tests/ceftests/audio_output_unittest.cc',
|
||||
'tests/ceftests/client_app_delegates.cc',
|
||||
'tests/ceftests/cookie_unittest.cc',
|
||||
'tests/ceftests/dom_unittest.cc',
|
||||
|
@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=81babf6211a1e99886028bfc4fb9107ef7517c1f$
|
||||
// $hash=973d3f764a42f1bf255b52dcd1041aaba1f1475b$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_LABEL_BUTTON_CAPI_H_
|
||||
@ -148,16 +148,11 @@ typedef struct _cef_label_button_t {
|
||||
///
|
||||
// Create a new LabelButton. A |delegate| must be provided to handle the button
|
||||
// click. |text| will be shown on the LabelButton and used as the default
|
||||
// accessible name. If |with_frame| is true (1) the button will have a visible
|
||||
// frame at all times, center alignment, additional padding and a default
|
||||
// minimum size of 70x33 DIP. If |with_frame| is false (0) the button will only
|
||||
// have a visible frame on hover/press, left alignment, less padding and no
|
||||
// default minimum size.
|
||||
// accessible name.
|
||||
///
|
||||
CEF_EXPORT cef_label_button_t* cef_label_button_create(
|
||||
struct _cef_button_delegate_t* delegate,
|
||||
const cef_string_t* text,
|
||||
int with_frame);
|
||||
const cef_string_t* text);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
// by hand. See the translator.README.txt file in the tools directory for
|
||||
// more information.
|
||||
//
|
||||
// $hash=f375009823015557083997f5a1c2033739de9c22$
|
||||
// $hash=889104f0418508aaa66ed8808b627fdd6652102c$
|
||||
//
|
||||
|
||||
#ifndef CEF_INCLUDE_CAPI_VIEWS_CEF_MENU_BUTTON_CAPI_H_
|
||||
@ -89,8 +89,7 @@ typedef struct _cef_menu_button_t {
|
||||
///
|
||||
CEF_EXPORT cef_menu_button_t* cef_menu_button_create(
|
||||
struct _cef_menu_button_delegate_t* delegate,
|
||||
const cef_string_t* text,
|
||||
int with_frame);
|
||||
const cef_string_t* text);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -54,17 +54,12 @@ class CefLabelButton : public CefButton {
|
||||
///
|
||||
// Create a new LabelButton. A |delegate| must be provided to handle the
|
||||
// button click. |text| will be shown on the LabelButton and used as the
|
||||
// default accessible name. If |with_frame| is true the button will have a
|
||||
// visible frame at all times, center alignment, additional padding and a
|
||||
// default minimum size of 70x33 DIP. If |with_frame| is false the button will
|
||||
// only have a visible frame on hover/press, left alignment, less padding and
|
||||
// no default minimum size.
|
||||
// default accessible name.
|
||||
///
|
||||
/*--cef(optional_param=text)--*/
|
||||
static CefRefPtr<CefLabelButton> CreateLabelButton(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame);
|
||||
const CefString& text);
|
||||
|
||||
///
|
||||
// Returns this LabelButton as a MenuButton or NULL if this is not a
|
||||
|
@ -63,8 +63,7 @@ class CefMenuButton : public CefLabelButton {
|
||||
/*--cef(optional_param=text)--*/
|
||||
static CefRefPtr<CefMenuButton> CreateMenuButton(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame);
|
||||
const CefString& text);
|
||||
|
||||
///
|
||||
// Show a menu with contents |menu_model|. |screen_point| specifies the menu
|
||||
|
@ -165,8 +165,8 @@ void CefAudioPushSink::Close() {
|
||||
stop_stream_ = true;
|
||||
cef_audio_handler_->OnAudioStreamStopped(browser_.get(), audio_stream_id_);
|
||||
|
||||
const CloseCallback& cb = base::ResetAndReturn(&close_callback_);
|
||||
if (!cb.is_null())
|
||||
cb.Run(this);
|
||||
if (!close_callback_.is_null()) {
|
||||
std::move(close_callback_).Run(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -569,6 +569,28 @@ ProfileKey* CefBrowserContext::GetProfileKey() const {
|
||||
return key_.get();
|
||||
}
|
||||
|
||||
policy::SchemaRegistryService*
|
||||
CefBrowserContext::GetPolicySchemaRegistryService() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
policy::UserCloudPolicyManager* CefBrowserContext::GetUserCloudPolicyManager() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
policy::ProfilePolicyConnector* CefBrowserContext::GetProfilePolicyConnector() {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const policy::ProfilePolicyConnector*
|
||||
CefBrowserContext::GetProfilePolicyConnector() const {
|
||||
NOTREACHED();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const CefRequestContextSettings& CefBrowserContext::GetSettings() const {
|
||||
return settings_;
|
||||
}
|
||||
@ -581,7 +603,7 @@ HostContentSettingsMap* CefBrowserContext::GetHostContentSettingsMap() {
|
||||
// that can be stored in the settings map (for example, default values set
|
||||
// via DefaultProvider::SetWebsiteSetting).
|
||||
host_content_settings_map_ =
|
||||
new HostContentSettingsMap(GetPrefs(), false, false, false, false);
|
||||
new HostContentSettingsMap(GetPrefs(), false, false, false);
|
||||
|
||||
// Change the default plugin policy.
|
||||
const base::CommandLine* command_line =
|
||||
|
@ -180,6 +180,11 @@ class CefBrowserContext : public ChromeProfileStub,
|
||||
bool AllowsBrowserWindows() const override { return false; }
|
||||
const PrefService* GetPrefs() const override;
|
||||
ProfileKey* GetProfileKey() const override;
|
||||
policy::SchemaRegistryService* GetPolicySchemaRegistryService() override;
|
||||
policy::UserCloudPolicyManager* GetUserCloudPolicyManager() override;
|
||||
policy::ProfilePolicyConnector* GetProfilePolicyConnector() override;
|
||||
const policy::ProfilePolicyConnector* GetProfilePolicyConnector()
|
||||
const override;
|
||||
|
||||
// Values checked in ProfileNetworkContextService::CreateNetworkContextParams
|
||||
// when creating the NetworkContext.
|
||||
|
@ -2153,7 +2153,7 @@ void CefBrowserHostImpl::UpdateTargetURL(content::WebContents* source,
|
||||
|
||||
bool CefBrowserHostImpl::DidAddMessageToConsole(
|
||||
content::WebContents* source,
|
||||
int32_t level,
|
||||
blink::mojom::ConsoleMessageLevel level,
|
||||
const base::string16& message,
|
||||
int32_t line_no,
|
||||
const base::string16& source_id) {
|
||||
@ -2163,13 +2163,16 @@ bool CefBrowserHostImpl::DidAddMessageToConsole(
|
||||
// Use LOGSEVERITY_DEBUG for unrecognized |level| values.
|
||||
cef_log_severity_t log_level = LOGSEVERITY_DEBUG;
|
||||
switch (level) {
|
||||
case 0:
|
||||
case blink::mojom::ConsoleMessageLevel::kVerbose:
|
||||
log_level = LOGSEVERITY_DEBUG;
|
||||
break;
|
||||
case blink::mojom::ConsoleMessageLevel::kInfo:
|
||||
log_level = LOGSEVERITY_INFO;
|
||||
break;
|
||||
case 1:
|
||||
case blink::mojom::ConsoleMessageLevel::kWarning:
|
||||
log_level = LOGSEVERITY_WARNING;
|
||||
break;
|
||||
case 2:
|
||||
case blink::mojom::ConsoleMessageLevel::kError:
|
||||
log_level = LOGSEVERITY_ERROR;
|
||||
break;
|
||||
}
|
||||
|
@ -387,7 +387,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
|
||||
void CloseContents(content::WebContents* source) override;
|
||||
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
|
||||
bool DidAddMessageToConsole(content::WebContents* source,
|
||||
int32_t level,
|
||||
blink::mojom::ConsoleMessageLevel log_level,
|
||||
const base::string16& message,
|
||||
int32_t line_no,
|
||||
const base::string16& source_id) override;
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
#include "base/message_loop/message_pump.h"
|
||||
#include "base/message_loop/message_pump_for_ui.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
@ -108,6 +108,6 @@ std::unique_ptr<base::MessagePump> MessagePumpFactoryForUI() {
|
||||
void InitMessagePumpFactoryForUI() {
|
||||
const CefSettings& settings = CefContext::Get()->settings();
|
||||
if (settings.external_message_pump) {
|
||||
base::MessageLoop::InitMessagePumpForUIFactory(MessagePumpFactoryForUI);
|
||||
base::MessagePump::OverrideMessagePumpForUIFactory(MessagePumpFactoryForUI);
|
||||
}
|
||||
}
|
||||
|
@ -14,15 +14,16 @@
|
||||
#include "libcef/common/net_service/util.h"
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "chrome/browser/net/chrome_net_log_helper.h"
|
||||
#include "chrome/browser/net/system_network_context_manager.h"
|
||||
#include "chrome/browser/policy/chrome_browser_policy_connector.h"
|
||||
#include "chrome/browser/printing/print_job_manager.h"
|
||||
#include "chrome/browser/ui/prefs/pref_watcher.h"
|
||||
#include "components/net_log/chrome_net_log.h"
|
||||
#include "components/net_log/net_export_file_writer.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "content/browser/startup_helper.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "net/log/net_log_capture_mode.h"
|
||||
#include "services/network/public/cpp/network_switches.h"
|
||||
#include "services/network/public/cpp/shared_url_loader_factory.h"
|
||||
|
||||
@ -34,7 +35,6 @@ ChromeBrowserProcessStub::ChromeBrowserProcessStub()
|
||||
|
||||
ChromeBrowserProcessStub::~ChromeBrowserProcessStub() {
|
||||
DCHECK((!initialized_ && !context_initialized_) || shutdown_);
|
||||
g_browser_process = NULL;
|
||||
}
|
||||
|
||||
void ChromeBrowserProcessStub::Initialize() {
|
||||
@ -81,6 +81,14 @@ void ChromeBrowserProcessStub::Shutdown() {
|
||||
SystemNetworkContextManager::DeleteInstance();
|
||||
}
|
||||
|
||||
// Release any references to |local_state_| that are held by objects
|
||||
// associated with a Profile. The Profile will be deleted later.
|
||||
for (const auto& profile : CefBrowserContext::GetAll()) {
|
||||
PrefWatcher* pref_watcher = PrefWatcher::Get(profile);
|
||||
if (pref_watcher)
|
||||
pref_watcher->Shutdown();
|
||||
}
|
||||
|
||||
local_state_.reset();
|
||||
browser_policy_connector_.reset();
|
||||
|
||||
@ -319,6 +327,11 @@ ChromeBrowserProcessStub::optimization_guide_service() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
StartupData* ChromeBrowserProcessStub::startup_data() {
|
||||
NOTREACHED();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
void ChromeBrowserProcessStub::StartAutoupdateTimer() {}
|
||||
#endif
|
||||
@ -332,7 +345,8 @@ net_log::ChromeNetLog* ChromeBrowserProcessStub::net_log() {
|
||||
if (command_line.HasSwitch(network::switches::kLogNetLog)) {
|
||||
net_log_->StartWritingToFile(
|
||||
command_line.GetSwitchValuePath(network::switches::kLogNetLog),
|
||||
GetNetCaptureModeFromCommandLine(command_line),
|
||||
net::GetNetCaptureModeFromCommandLine(command_line,
|
||||
network::switches::kLogNetLog),
|
||||
command_line.GetCommandLineString(), std::string());
|
||||
}
|
||||
}
|
||||
|
@ -87,6 +87,7 @@ class ChromeBrowserProcessStub : public BrowserProcess {
|
||||
override;
|
||||
optimization_guide::OptimizationGuideService* optimization_guide_service()
|
||||
override;
|
||||
StartupData* startup_data() override;
|
||||
|
||||
#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
|
||||
void StartAutoupdateTimer() override;
|
||||
|
@ -40,11 +40,11 @@
|
||||
#include "libcef/common/net/scheme_registration.h"
|
||||
#include "libcef/common/net_service/util.h"
|
||||
#include "libcef/common/request_impl.h"
|
||||
#include "libcef/common/service_manifests/builtin_service_manifests.h"
|
||||
#include "libcef/common/service_manifests/cef_content_browser_overlay_manifest.h"
|
||||
#include "libcef/common/service_manifests/cef_content_gpu_overlay_manifest.h"
|
||||
#include "libcef/common/service_manifests/cef_content_renderer_overlay_manifest.h"
|
||||
#include "libcef/common/service_manifests/cef_content_utility_overlay_manifest.h"
|
||||
#include "libcef/common/service_manifests/cef_packaged_service_manifests.h"
|
||||
#include "libcef/common/service_manifests/cef_renderer_manifest.h"
|
||||
|
||||
#include "base/base_switches.h"
|
||||
@ -69,9 +69,13 @@
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#include "chrome/grit/browser_resources.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "chrome/services/printing/printing_service.h"
|
||||
#include "chrome/services/printing/public/mojom/constants.mojom.h"
|
||||
#include "components/navigation_interception/intercept_navigation_throttle.h"
|
||||
#include "components/navigation_interception/navigation_params.h"
|
||||
#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/version_info/version_info.h"
|
||||
#include "content/browser/frame_host/navigation_handle_impl.h"
|
||||
@ -108,9 +112,12 @@
|
||||
#include "extensions/browser/io_thread_extension_message_filter.h"
|
||||
#include "extensions/common/constants.h"
|
||||
#include "extensions/common/switches.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
#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"
|
||||
#include "services/service_manager/sandbox/switches.h"
|
||||
@ -519,12 +526,13 @@ CefContentBrowserClient* CefContentBrowserClient::Get() {
|
||||
CefContentClient::Get()->browser());
|
||||
}
|
||||
|
||||
content::BrowserMainParts* CefContentBrowserClient::CreateBrowserMainParts(
|
||||
std::unique_ptr<content::BrowserMainParts>
|
||||
CefContentBrowserClient::CreateBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters) {
|
||||
browser_main_parts_ = new CefBrowserMainParts(parameters);
|
||||
browser_main_parts_->AddParts(
|
||||
ChromeService::GetInstance()->CreateExtraParts());
|
||||
return browser_main_parts_;
|
||||
return base::WrapUnique(browser_main_parts_);
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RenderProcessWillLaunch(
|
||||
@ -553,16 +561,16 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
|
||||
host->Send(
|
||||
new CefProcessMsg_SetIsIncognitoProcess(profile->IsOffTheRecord()));
|
||||
|
||||
service_manager::mojom::ServicePtr service;
|
||||
service_manager::mojom::ServicePtrInfo service;
|
||||
*service_request = mojo::MakeRequest(&service);
|
||||
service_manager::mojom::PIDReceiverPtr pid_receiver;
|
||||
service_manager::Identity renderer_identity = host->GetChildIdentity();
|
||||
mojo::Remote<service_manager::mojom::ProcessMetadata> metadata;
|
||||
ChromeService::GetInstance()->connector()->RegisterServiceInstance(
|
||||
service_manager::Identity(chrome::mojom::kRendererServiceName,
|
||||
renderer_identity.instance_group(),
|
||||
renderer_identity.instance_id(),
|
||||
base::Token::CreateRandom()),
|
||||
std::move(service), mojo::MakeRequest(&pid_receiver));
|
||||
std::move(service), metadata.BindNewPipeAndPassReceiver());
|
||||
}
|
||||
|
||||
bool CefContentBrowserClient::ShouldUseProcessPerSite(
|
||||
@ -701,23 +709,41 @@ void CefContentBrowserClient::SiteInstanceDeleting(
|
||||
site_instance->GetId()));
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::RegisterIOThreadServiceHandlers(
|
||||
content::ServiceManagerConnection* connection) {
|
||||
// For spell checking.
|
||||
connection->AddServiceRequestHandler(
|
||||
chrome::mojom::kServiceName,
|
||||
ChromeService::GetInstance()->CreateChromeServiceRequestHandler());
|
||||
void CefContentBrowserClient::RunServiceInstance(
|
||||
const service_manager::Identity& identity,
|
||||
mojo::PendingReceiver<service_manager::mojom::Service>* receiver) {
|
||||
const std::string& service_name = identity.name();
|
||||
if (service_name == printing::mojom::kServiceName) {
|
||||
service_manager::Service::RunAsyncUntilTermination(
|
||||
printing::CreatePdfCompositorService(std::move(*receiver)));
|
||||
return;
|
||||
}
|
||||
if (service_name == printing::mojom::kChromePrintingServiceName) {
|
||||
service_manager::Service::RunAsyncUntilTermination(
|
||||
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::RegisterOutOfProcessServices(
|
||||
OutOfProcessServiceMap* services) {
|
||||
(*services)[printing::mojom::kServiceName] =
|
||||
base::BindRepeating(&base::ASCIIToUTF16, "PDF Compositor Service");
|
||||
(*services)[printing::mojom::kChromePrintingServiceName] =
|
||||
base::BindRepeating(&base::ASCIIToUTF16, "Printing Service");
|
||||
(*services)[proxy_resolver::mojom::kProxyResolverServiceName] =
|
||||
base::BindRepeating(&l10n_util::GetStringUTF16,
|
||||
IDS_UTILITY_PROCESS_PROXY_RESOLVER_NAME);
|
||||
void CefContentBrowserClient::RunServiceInstanceOnIOThread(
|
||||
const service_manager::Identity& identity,
|
||||
mojo::PendingReceiver<service_manager::mojom::Service>* receiver) {
|
||||
if (identity.name() == chrome::mojom::kServiceName) {
|
||||
ChromeService::GetInstance()->CreateChromeServiceRequestHandler().Run(
|
||||
std::move(*receiver));
|
||||
return;
|
||||
}
|
||||
if (identity.name() == heap_profiling::mojom::kServiceName) {
|
||||
heap_profiling::HeapProfilingService::GetServiceFactory().Run(
|
||||
std::move(*receiver));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
base::Optional<service_manager::Manifest>
|
||||
@ -726,10 +752,6 @@ CefContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
|
||||
return GetCefContentBrowserOverlayManifest();
|
||||
} else if (name == content::mojom::kGpuServiceName) {
|
||||
return GetCefContentGpuOverlayManifest();
|
||||
} else if (name == content::mojom::kPackagedServicesServiceName) {
|
||||
service_manager::Manifest overlay;
|
||||
overlay.packaged_services = GetCefPackagedServiceManifests();
|
||||
return overlay;
|
||||
} else if (name == content::mojom::kRendererServiceName) {
|
||||
return GetCefContentRendererOverlayManifest();
|
||||
} else if (name == content::mojom::kUtilityServiceName) {
|
||||
@ -741,7 +763,9 @@ CefContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
|
||||
|
||||
std::vector<service_manager::Manifest>
|
||||
CefContentBrowserClient::GetExtraServiceManifests() {
|
||||
return std::vector<service_manager::Manifest>{GetCefRendererManifest()};
|
||||
auto manifests = GetBuiltinServiceManifests();
|
||||
manifests.push_back(GetCefRendererManifest());
|
||||
return manifests;
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
@ -949,14 +973,14 @@ void CefContentBrowserClient::AllowCertificateError(
|
||||
int cert_error,
|
||||
const net::SSLInfo& ssl_info,
|
||||
const GURL& request_url,
|
||||
content::ResourceType resource_type,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(content::CertificateRequestResultType)>&
|
||||
callback) {
|
||||
CEF_REQUIRE_UIT();
|
||||
|
||||
if (resource_type != content::ResourceType::kMainFrame) {
|
||||
if (!is_main_frame_request) {
|
||||
// A sub-resource has a certificate error. The user doesn't really
|
||||
// have a context for making the right decision, so block the request
|
||||
// hard.
|
||||
@ -1339,8 +1363,6 @@ bool CefContentBrowserClient::HandleExternalProtocol(
|
||||
bool is_main_frame,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
const std::string& method,
|
||||
const net::HttpRequestHeaders& headers,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory) {
|
||||
if (net_service::IsEnabled()) {
|
||||
@ -1350,8 +1372,6 @@ bool CefContentBrowserClient::HandleExternalProtocol(
|
||||
|
||||
CefRefPtr<CefRequestImpl> requestPtr = new CefRequestImpl();
|
||||
requestPtr->SetURL(url.spec());
|
||||
requestPtr->SetMethod(method);
|
||||
requestPtr->Set(headers);
|
||||
requestPtr->SetReadOnly(true);
|
||||
|
||||
net_util::HandleExternalProtocol(requestPtr, web_contents_getter);
|
||||
|
@ -41,7 +41,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
static CefContentBrowserClient* Get();
|
||||
|
||||
// ContentBrowserClient implementation.
|
||||
content::BrowserMainParts* CreateBrowserMainParts(
|
||||
std::unique_ptr<content::BrowserMainParts> CreateBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters) override;
|
||||
void RenderProcessWillLaunch(
|
||||
content::RenderProcessHost* host,
|
||||
@ -61,9 +61,14 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool IsHandledURL(const GURL& url) override;
|
||||
void SiteInstanceGotProcess(content::SiteInstance* site_instance) override;
|
||||
void SiteInstanceDeleting(content::SiteInstance* site_instance) override;
|
||||
void RegisterIOThreadServiceHandlers(
|
||||
content::ServiceManagerConnection* connection) override;
|
||||
void RegisterOutOfProcessServices(OutOfProcessServiceMap* services) override;
|
||||
void RunServiceInstance(
|
||||
const service_manager::Identity& identity,
|
||||
mojo::PendingReceiver<service_manager::mojom::Service>* receiver)
|
||||
override;
|
||||
void RunServiceInstanceOnIOThread(
|
||||
const service_manager::Identity& identity,
|
||||
mojo::PendingReceiver<service_manager::mojom::Service>* receiver)
|
||||
override;
|
||||
base::Optional<service_manager::Manifest> GetServiceManifestOverlay(
|
||||
base::StringPiece name) override;
|
||||
std::vector<service_manager::Manifest> GetExtraServiceManifests() override;
|
||||
@ -93,7 +98,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
int cert_error,
|
||||
const net::SSLInfo& ssl_info,
|
||||
const GURL& request_url,
|
||||
content::ResourceType resource_type,
|
||||
bool is_main_frame_request,
|
||||
bool strict_enforcement,
|
||||
bool expired_previous_decision,
|
||||
const base::Callback<void(content::CertificateRequestResultType)>&
|
||||
@ -186,8 +191,6 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
|
||||
bool is_main_frame,
|
||||
ui::PageTransition page_transition,
|
||||
bool has_user_gesture,
|
||||
const std::string& method,
|
||||
const net::HttpRequestHeaders& headers,
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory) override;
|
||||
bool HandleExternalProtocol(
|
||||
|
@ -35,8 +35,8 @@
|
||||
|
||||
#if defined(OS_WIN)
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/chrome_elf/chrome_elf_main.h"
|
||||
#include "chrome/install_static/initialize_from_primary_module.h"
|
||||
#include "chrome_elf/chrome_elf_main.h"
|
||||
#include "components/crash/content/app/crashpad.h"
|
||||
#include "content/public/app/sandbox_helper_win.h"
|
||||
#include "sandbox/win/src/sandbox_types.h"
|
||||
@ -636,4 +636,7 @@ void CefContext::FinalizeShutdown() {
|
||||
sm_main_params_.reset(NULL);
|
||||
sm_main_delegate_.reset(NULL);
|
||||
main_delegate_.reset(NULL);
|
||||
|
||||
delete g_browser_process;
|
||||
g_browser_process = NULL;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ CefComponentExtensionResourceManager::~CefComponentExtensionResourceManager() {}
|
||||
bool CefComponentExtensionResourceManager::IsComponentExtensionResource(
|
||||
const base::FilePath& extension_path,
|
||||
const base::FilePath& resource_path,
|
||||
ComponentExtensionResourceInfo* resource_info) const {
|
||||
int* resource_id) const {
|
||||
base::FilePath directory_path = extension_path;
|
||||
base::FilePath resources_dir;
|
||||
base::FilePath relative_path;
|
||||
@ -34,7 +34,7 @@ bool CefComponentExtensionResourceManager::IsComponentExtensionResource(
|
||||
|
||||
auto entry = path_to_resource_info_.find(relative_path);
|
||||
if (entry != path_to_resource_info_.end()) {
|
||||
*resource_info = entry->second;
|
||||
*resource_id = entry->second;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ CefComponentExtensionResourceManager::GetTemplateReplacementsForExtension(
|
||||
}
|
||||
|
||||
void CefComponentExtensionResourceManager::AddComponentResourceEntries(
|
||||
const GzippedGritResourceMap* entries,
|
||||
const GritResourceMap* entries,
|
||||
size_t size) {
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
base::FilePath resource_path =
|
||||
@ -56,8 +56,7 @@ void CefComponentExtensionResourceManager::AddComponentResourceEntries(
|
||||
resource_path = resource_path.NormalizePathSeparators();
|
||||
|
||||
DCHECK(!base::ContainsKey(path_to_resource_info_, resource_path));
|
||||
path_to_resource_info_[resource_path] = {entries[i].value,
|
||||
entries[i].gzipped};
|
||||
path_to_resource_info_[resource_path] = entries[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "base/files/file_path.h"
|
||||
#include "extensions/browser/component_extension_resource_manager.h"
|
||||
|
||||
struct GzippedGritResourceMap;
|
||||
struct GritResourceMap;
|
||||
|
||||
namespace extensions {
|
||||
|
||||
@ -21,21 +21,18 @@ class CefComponentExtensionResourceManager
|
||||
~CefComponentExtensionResourceManager() override;
|
||||
|
||||
// Overridden from ComponentExtensionResourceManager:
|
||||
bool IsComponentExtensionResource(
|
||||
const base::FilePath& extension_path,
|
||||
const base::FilePath& resource_path,
|
||||
ComponentExtensionResourceInfo* resource_info) const override;
|
||||
bool IsComponentExtensionResource(const base::FilePath& extension_path,
|
||||
const base::FilePath& resource_path,
|
||||
int* resource_id) const override;
|
||||
const ui::TemplateReplacements* GetTemplateReplacementsForExtension(
|
||||
const std::string& extension_id) const override;
|
||||
|
||||
private:
|
||||
void AddComponentResourceEntries(const GzippedGritResourceMap* entries,
|
||||
size_t size);
|
||||
void AddComponentResourceEntries(const GritResourceMap* entries, size_t size);
|
||||
|
||||
// A map from a resource path to the resource ID. Used by
|
||||
// IsComponentExtensionResource.
|
||||
std::map<base::FilePath, ComponentExtensionResourceInfo>
|
||||
path_to_resource_info_;
|
||||
std::map<base::FilePath, int> path_to_resource_info_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(CefComponentExtensionResourceManager);
|
||||
};
|
||||
|
@ -122,21 +122,21 @@ CefExtensionsBrowserClient::MaybeCreateResourceBundleRequestJob(
|
||||
base::FilePath CefExtensionsBrowserClient::GetBundleResourcePath(
|
||||
const network::ResourceRequest& request,
|
||||
const base::FilePath& extension_resources_path,
|
||||
ComponentExtensionResourceInfo* resource_info) const {
|
||||
int* resource_id) const {
|
||||
return chrome_url_request_util::GetBundleResourcePath(
|
||||
request, extension_resources_path, resource_info);
|
||||
request, extension_resources_path, resource_id);
|
||||
}
|
||||
|
||||
void CefExtensionsBrowserClient::LoadResourceFromResourceBundle(
|
||||
const network::ResourceRequest& request,
|
||||
network::mojom::URLLoaderRequest loader,
|
||||
const base::FilePath& resource_relative_path,
|
||||
const ComponentExtensionResourceInfo& resource_info,
|
||||
const int resource_id,
|
||||
const std::string& content_security_policy,
|
||||
network::mojom::URLLoaderClientPtr client,
|
||||
bool send_cors_header) {
|
||||
chrome_url_request_util::LoadResourceFromResourceBundle(
|
||||
request, std::move(loader), resource_relative_path, resource_info,
|
||||
request, std::move(loader), resource_relative_path, resource_id,
|
||||
content_security_policy, std::move(client), send_cors_header);
|
||||
}
|
||||
|
||||
@ -167,7 +167,7 @@ PrefService* CefExtensionsBrowserClient::GetPrefServiceForContext(
|
||||
|
||||
void CefExtensionsBrowserClient::GetEarlyExtensionPrefsObservers(
|
||||
content::BrowserContext* context,
|
||||
std::vector<ExtensionPrefsObserver*>* observers) const {}
|
||||
std::vector<EarlyExtensionPrefsObserver*>* observers) const {}
|
||||
|
||||
ProcessManagerDelegate* CefExtensionsBrowserClient::GetProcessManagerDelegate()
|
||||
const {
|
||||
@ -299,10 +299,6 @@ void CefExtensionsBrowserClient::BroadcastEventToRenderers(
|
||||
GURL());
|
||||
}
|
||||
|
||||
net::NetLog* CefExtensionsBrowserClient::GetNetLog() {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ExtensionCache* CefExtensionsBrowserClient::GetExtensionCache() {
|
||||
// Only used by Chrome via ExtensionService.
|
||||
NOTREACHED();
|
||||
|
@ -52,12 +52,12 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||
base::FilePath GetBundleResourcePath(
|
||||
const network::ResourceRequest& request,
|
||||
const base::FilePath& extension_resources_path,
|
||||
ComponentExtensionResourceInfo* resource_info) const override;
|
||||
int* resource_id) const override;
|
||||
void LoadResourceFromResourceBundle(
|
||||
const network::ResourceRequest& request,
|
||||
network::mojom::URLLoaderRequest loader,
|
||||
const base::FilePath& resource_relative_path,
|
||||
const ComponentExtensionResourceInfo& resource_info,
|
||||
const int resource_id,
|
||||
const std::string& content_security_policy,
|
||||
network::mojom::URLLoaderClientPtr client,
|
||||
bool send_cors_header) override;
|
||||
@ -73,7 +73,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||
content::BrowserContext* context) override;
|
||||
void GetEarlyExtensionPrefsObservers(
|
||||
content::BrowserContext* context,
|
||||
std::vector<ExtensionPrefsObserver*>* observers) const override;
|
||||
std::vector<EarlyExtensionPrefsObserver*>* observers) const override;
|
||||
ProcessManagerDelegate* GetProcessManagerDelegate() const override;
|
||||
std::unique_ptr<ExtensionHostDelegate> CreateExtensionHostDelegate() override;
|
||||
bool CreateBackgroundExtensionHost(const Extension* extension,
|
||||
@ -100,7 +100,6 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient {
|
||||
events::HistogramValue histogram_value,
|
||||
const std::string& event_name,
|
||||
std::unique_ptr<base::ListValue> args) override;
|
||||
net::NetLog* GetNetLog() override;
|
||||
ExtensionCache* GetExtensionCache() override;
|
||||
bool IsBackgroundUpdateAllowed() override;
|
||||
bool IsMinBrowserVersionSupported(const std::string& min_version) override;
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "libcef/common/cef_switches.h"
|
||||
#include "libcef/common/content_client.h"
|
||||
|
||||
#include "base/build_time.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
@ -160,8 +161,7 @@ CreateLogVerifiersForKnownLogs() {
|
||||
for (const auto& log : certificate_transparency::GetKnownLogs()) {
|
||||
scoped_refptr<const net::CTLogVerifier> log_verifier =
|
||||
net::CTLogVerifier::Create(
|
||||
base::StringPiece(log.log_key, log.log_key_length), log.log_name,
|
||||
log.log_dns_domain);
|
||||
base::StringPiece(log.log_key, log.log_key_length), log.log_name);
|
||||
// Make sure no null logs enter verifiers. Parsing of all statically
|
||||
// configured logs should always succeed, unless there has been binary or
|
||||
// memory corruption.
|
||||
@ -308,7 +308,8 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||
|
||||
io_state_->storage_->set_host_resolver(
|
||||
net::HostResolver::CreateStandaloneResolver(io_state_->net_log_));
|
||||
io_state_->storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
|
||||
io_state_->storage_->set_cert_verifier(
|
||||
net::CertVerifier::CreateDefault(/*cert_net_fetcher=*/nullptr));
|
||||
|
||||
std::unique_ptr<net::TransportSecurityState> transport_security_state(
|
||||
new net::TransportSecurityState);
|
||||
@ -323,12 +324,11 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
|
||||
new net::MultiLogCTVerifier());
|
||||
ct_verifier->AddLogs(ct_logs);
|
||||
io_state_->storage_->set_cert_transparency_verifier(std::move(ct_verifier));
|
||||
|
||||
std::unique_ptr<certificate_transparency::ChromeCTPolicyEnforcer>
|
||||
ct_policy_enforcer(
|
||||
new certificate_transparency::ChromeCTPolicyEnforcer);
|
||||
ct_policy_enforcer->set_enforce_net_security_expiration(
|
||||
settings_.enable_net_security_expiration ? true : false);
|
||||
ct_policy_enforcer(new certificate_transparency::ChromeCTPolicyEnforcer(
|
||||
base::GetBuildTime(),
|
||||
certificate_transparency::GetDisqualifiedLogs(),
|
||||
certificate_transparency::GetLogsOperatedByGoogle()));
|
||||
io_state_->storage_->set_ct_policy_enforcer(std::move(ct_policy_enforcer));
|
||||
|
||||
std::unique_ptr<net::ProxyResolutionService> system_proxy_service =
|
||||
|
@ -148,7 +148,7 @@ class InterceptedRequest : public network::mojom::URLLoader,
|
||||
void OnUploadProgress(int64_t current_position,
|
||||
int64_t total_size,
|
||||
OnUploadProgressCallback callback) override;
|
||||
void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override;
|
||||
void OnReceiveCachedMetadata(mojo_base::BigBuffer data) override;
|
||||
void OnTransferSizeUpdated(int32_t transfer_size_diff) override;
|
||||
void OnStartLoadingResponseBody(
|
||||
mojo::ScopedDataPipeConsumerHandle body) override;
|
||||
@ -528,9 +528,8 @@ void InterceptedRequest::OnUploadProgress(int64_t current_position,
|
||||
std::move(callback).Run();
|
||||
}
|
||||
|
||||
void InterceptedRequest::OnReceiveCachedMetadata(
|
||||
const std::vector<uint8_t>& data) {
|
||||
target_client_->OnReceiveCachedMetadata(data);
|
||||
void InterceptedRequest::OnReceiveCachedMetadata(mojo_base::BigBuffer data) {
|
||||
target_client_->OnReceiveCachedMetadata(std::move(data));
|
||||
}
|
||||
|
||||
void InterceptedRequest::OnTransferSizeUpdated(int32_t transfer_size_diff) {
|
||||
|
@ -104,6 +104,7 @@ struct PopulateAxNodeAttributes {
|
||||
case ax::mojom::IntAttribute::kInPageLinkTargetId:
|
||||
case ax::mojom::IntAttribute::kErrormessageId:
|
||||
case ax::mojom::IntAttribute::kDetailsId:
|
||||
case ax::mojom::IntAttribute::kDropeffect:
|
||||
case ax::mojom::IntAttribute::kMemberOfId:
|
||||
case ax::mojom::IntAttribute::kNextFocusId:
|
||||
case ax::mojom::IntAttribute::kNextOnLineId:
|
||||
@ -111,6 +112,7 @@ struct PopulateAxNodeAttributes {
|
||||
case ax::mojom::IntAttribute::kPreviousOnLineId:
|
||||
case ax::mojom::IntAttribute::kSetSize:
|
||||
case ax::mojom::IntAttribute::kPosInSet:
|
||||
case ax::mojom::IntAttribute::kPopupForId:
|
||||
attributes->SetInt(ToString(attr.first), attr.second);
|
||||
break;
|
||||
case ax::mojom::IntAttribute::kDefaultActionVerb:
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "media/base/video_frame.h"
|
||||
#include "ui/compositor/compositor_vsync_manager.h"
|
||||
#include "ui/compositor/compositor.h"
|
||||
#include "ui/events/blink/blink_event_util.h"
|
||||
#include "ui/events/gesture_detection/gesture_provider_config_helper.h"
|
||||
#include "ui/events/gesture_detection/motion_event.h"
|
||||
@ -521,13 +521,14 @@ void CefRenderWidgetHostViewOSR::Show() {
|
||||
delegated_frame_host_->AttachToCompositor(compositor_.get());
|
||||
delegated_frame_host_->WasShown(
|
||||
GetLocalSurfaceIdAllocation().local_surface_id(),
|
||||
GetRootLayer()->bounds().size(), false);
|
||||
GetRootLayer()->bounds().size(), base::nullopt);
|
||||
#endif
|
||||
|
||||
// Note that |render_widget_host_| will retrieve size parameters from the
|
||||
// DelegatedFrameHost, so it must have WasShown called after.
|
||||
if (render_widget_host_)
|
||||
render_widget_host_->WasShown(false);
|
||||
render_widget_host_->WasShown(
|
||||
base::nullopt /* record_tab_switch_time_request */);
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::Hide() {
|
||||
@ -898,9 +899,7 @@ void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) {
|
||||
forward_touch_to_popup_ = false;
|
||||
}
|
||||
|
||||
void CefRenderWidgetHostViewOSR::RenderProcessGone(
|
||||
base::TerminationStatus status,
|
||||
int error_code) {
|
||||
void CefRenderWidgetHostViewOSR::RenderProcessGone() {
|
||||
Destroy();
|
||||
}
|
||||
|
||||
@ -1729,11 +1728,19 @@ void CefRenderWidgetHostViewOSR::SetFrameRate() {
|
||||
|
||||
frame_rate_threshold_us_ = 1000000 / frame_rate;
|
||||
|
||||
if (compositor) {
|
||||
compositor->vsync_manager()->UpdateVSyncParameters(
|
||||
#if defined(OS_MACOSX)
|
||||
if (browser_compositor_) {
|
||||
browser_compositor_->UpdateVSyncParameters(
|
||||
base::TimeTicks::Now(),
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
#else
|
||||
if (compositor) {
|
||||
compositor->SetDisplayVSyncParameters(
|
||||
base::TimeTicks::Now(),
|
||||
base::TimeDelta::FromMicroseconds(frame_rate_threshold_us_));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (copy_frame_generator_.get()) {
|
||||
copy_frame_generator_->set_frame_rate_threshold_us(
|
||||
|
@ -160,8 +160,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||
content::RenderWidgetHostViewGuest* guest_view) override;
|
||||
void UpdateCursor(const content::WebCursor& cursor) override;
|
||||
void SetIsLoading(bool is_loading) override;
|
||||
void RenderProcessGone(base::TerminationStatus status,
|
||||
int error_code) override;
|
||||
void RenderProcessGone() override;
|
||||
void Destroy() override;
|
||||
void SetTooltipText(const base::string16& tooltip_text) override;
|
||||
content::CursorManager* GetCursorManager() override;
|
||||
|
@ -183,6 +183,10 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile,
|
||||
#endif
|
||||
}
|
||||
|
||||
// Browser process preferences.
|
||||
// Based on chrome/browser/browser_process_impl.cc RegisterPrefs.
|
||||
registry->RegisterBooleanPref(prefs::kAllowCrossOriginAuthPrompt, false);
|
||||
|
||||
// Browser UI preferences.
|
||||
// Based on chrome/browser/ui/browser_ui_prefs.cc RegisterBrowserPrefs.
|
||||
registry->RegisterBooleanPref(prefs::kAllowFileSelectionDialogs, true);
|
||||
|
@ -9,25 +9,20 @@
|
||||
// static
|
||||
CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
return CefBasicLabelButtonImpl::Create(delegate, text, with_frame);
|
||||
const CefString& text) {
|
||||
return CefBasicLabelButtonImpl::Create(delegate, text);
|
||||
}
|
||||
|
||||
// static
|
||||
CefRefPtr<CefBasicLabelButtonImpl> CefBasicLabelButtonImpl::Create(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
const CefString& text) {
|
||||
CEF_REQUIRE_UIT_RETURN(nullptr);
|
||||
CefRefPtr<CefBasicLabelButtonImpl> label_button =
|
||||
new CefBasicLabelButtonImpl(delegate);
|
||||
label_button->Initialize();
|
||||
if (!text.empty())
|
||||
label_button->SetText(text);
|
||||
if (with_frame) {
|
||||
label_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
|
||||
}
|
||||
return label_button;
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,7 @@ class CefBasicLabelButtonImpl : public CefLabelButtonImpl<views::LabelButton,
|
||||
// Create a new CefLabelButton instance. |delegate| may be nullptr.
|
||||
static CefRefPtr<CefBasicLabelButtonImpl> Create(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame);
|
||||
const CefString& text);
|
||||
|
||||
// CefViewAdapter methods:
|
||||
std::string GetDebugType() override { return "LabelButton"; }
|
||||
|
@ -12,16 +12,14 @@
|
||||
// static
|
||||
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
return CefMenuButtonImpl::Create(delegate, text, with_frame);
|
||||
const CefString& text) {
|
||||
return CefMenuButtonImpl::Create(delegate, text);
|
||||
}
|
||||
|
||||
// static
|
||||
CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
const CefString& text) {
|
||||
CEF_REQUIRE_UIT_RETURN(nullptr);
|
||||
DCHECK(delegate);
|
||||
if (!delegate)
|
||||
@ -30,9 +28,6 @@ CefRefPtr<CefMenuButtonImpl> CefMenuButtonImpl::Create(
|
||||
menu_button->Initialize();
|
||||
if (!text.empty())
|
||||
menu_button->SetText(text);
|
||||
if (with_frame) {
|
||||
menu_button->root_view()->SetStyleDeprecated(views::Button::STYLE_BUTTON);
|
||||
}
|
||||
return menu_button;
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,7 @@ class CefMenuButtonImpl : public CefLabelButtonImpl<views::MenuButton,
|
||||
// Create a new CefMenuButton instance. |delegate| must not be nullptr.
|
||||
static CefRefPtr<CefMenuButtonImpl> Create(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame);
|
||||
const CefString& text);
|
||||
|
||||
// CefMenuButton methods:
|
||||
void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
|
||||
|
@ -53,12 +53,12 @@ CEF_PANEL_IMPL_T class CefPanelImpl : public CEF_VIEW_IMPL_D {
|
||||
bool include_children) override {
|
||||
ParentClass::GetDebugInfo(info, include_children);
|
||||
if (include_children) {
|
||||
const size_t count = ParentClass::content_view()->child_count();
|
||||
const size_t count = ParentClass::content_view()->children().size();
|
||||
if (count > 0U) {
|
||||
std::unique_ptr<base::ListValue> children(new base::ListValue());
|
||||
|
||||
for (size_t i = 0U; i < count; ++i) {
|
||||
views::View* view = ParentClass::content_view()->child_at(i);
|
||||
views::View* view = ParentClass::content_view()->children()[i];
|
||||
CefViewAdapter* adapter = CefViewAdapter::GetFor(view);
|
||||
if (adapter) {
|
||||
std::unique_ptr<base::DictionaryValue> child_info(
|
||||
@ -128,9 +128,11 @@ CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::AddChildViewAt(CefRefPtr<CefView> view,
|
||||
DCHECK(view->IsValid());
|
||||
DCHECK(!view->IsAttached());
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LE(index, ParentClass::content_view()->child_count());
|
||||
DCHECK_LE(static_cast<unsigned int>(index),
|
||||
ParentClass::content_view()->children().size());
|
||||
if (!view.get() || !view->IsValid() || view->IsAttached() || index < 0 ||
|
||||
index > ParentClass::content_view()->child_count()) {
|
||||
(static_cast<unsigned int>(index) >
|
||||
ParentClass::content_view()->children().size())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -179,27 +181,29 @@ CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::RemoveChildView(
|
||||
CEF_PANEL_IMPL_T void CEF_PANEL_IMPL_D::RemoveAllChildViews() {
|
||||
CEF_REQUIRE_VALID_RETURN_VOID();
|
||||
while (!ParentClass::content_view()->children().empty()) {
|
||||
CefRefPtr<CefView> view =
|
||||
view_util::GetFor(ParentClass::content_view()->child_at(0), false);
|
||||
CefRefPtr<CefView> view = view_util::GetFor(
|
||||
ParentClass::content_view()->children().front(), false);
|
||||
RemoveChildView(view);
|
||||
}
|
||||
}
|
||||
|
||||
CEF_PANEL_IMPL_T size_t CEF_PANEL_IMPL_D::GetChildViewCount() {
|
||||
CEF_REQUIRE_VALID_RETURN(0U);
|
||||
return ParentClass::content_view()->child_count();
|
||||
return ParentClass::content_view()->children().size();
|
||||
}
|
||||
|
||||
CEF_PANEL_IMPL_T CefRefPtr<CefView> CEF_PANEL_IMPL_D::GetChildViewAt(
|
||||
int index) {
|
||||
CEF_REQUIRE_VALID_RETURN(nullptr);
|
||||
DCHECK_GE(index, 0);
|
||||
DCHECK_LT(index, ParentClass::content_view()->child_count());
|
||||
if (index < 0 || index >= ParentClass::content_view()->child_count())
|
||||
DCHECK_LT(static_cast<unsigned int>(index),
|
||||
ParentClass::content_view()->children().size());
|
||||
if (index < 0 || (static_cast<unsigned int>(index) >=
|
||||
ParentClass::content_view()->children().size()))
|
||||
return nullptr;
|
||||
|
||||
CefRefPtr<CefView> view =
|
||||
view_util::GetFor(ParentClass::content_view()->child_at(index), false);
|
||||
view_util::GetFor(ParentClass::content_view()->children()[index], false);
|
||||
DCHECK(view);
|
||||
return view;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ CefRect CefScrollViewImpl::GetVisibleContentRect() {
|
||||
bool CefScrollViewImpl::HasHorizontalScrollbar() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
const views::ScrollBar* scrollbar = root_view()->horizontal_scroll_bar();
|
||||
return scrollbar && scrollbar->visible();
|
||||
return scrollbar && scrollbar->GetVisible();
|
||||
}
|
||||
|
||||
int CefScrollViewImpl::GetHorizontalScrollbarHeight() {
|
||||
@ -55,7 +55,7 @@ int CefScrollViewImpl::GetHorizontalScrollbarHeight() {
|
||||
bool CefScrollViewImpl::HasVerticalScrollbar() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
const views::ScrollBar* scrollbar = root_view()->vertical_scroll_bar();
|
||||
return scrollbar && scrollbar->visible();
|
||||
return scrollbar && scrollbar->GetVisible();
|
||||
}
|
||||
|
||||
int CefScrollViewImpl::GetVerticalScrollbarWidth() {
|
||||
|
@ -344,7 +344,7 @@ CEF_VIEW_IMPL_T class CefViewImpl : public CefViewAdapter, public CefViewClass {
|
||||
void GetDebugInfo(base::DictionaryValue* info,
|
||||
bool include_children) override {
|
||||
info->SetString("type", GetDebugType());
|
||||
info->SetInteger("id", root_view()->id());
|
||||
info->SetInteger("id", root_view()->GetID());
|
||||
|
||||
// Use GetBounds() because some subclasses (like CefWindowImpl) override it.
|
||||
const CefRect& bounds = GetBounds();
|
||||
@ -493,12 +493,12 @@ CEF_VIEW_IMPL_T CefRefPtr<CefWindow> CEF_VIEW_IMPL_D::GetWindow() {
|
||||
|
||||
CEF_VIEW_IMPL_T int CEF_VIEW_IMPL_D::GetID() {
|
||||
CEF_REQUIRE_VALID_RETURN(0);
|
||||
return root_view()->id();
|
||||
return root_view()->GetID();
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetID(int id) {
|
||||
CEF_REQUIRE_VALID_RETURN_VOID();
|
||||
root_view()->set_id(id);
|
||||
root_view()->SetID(id);
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T int CEF_VIEW_IMPL_D::GetGroupID() {
|
||||
@ -611,7 +611,7 @@ CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetVisible(bool visible) {
|
||||
|
||||
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsVisible() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
return root_view()->visible();
|
||||
return root_view()->GetVisible();
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsDrawn() {
|
||||
@ -626,7 +626,7 @@ CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetEnabled(bool enabled) {
|
||||
|
||||
CEF_VIEW_IMPL_T bool CEF_VIEW_IMPL_D::IsEnabled() {
|
||||
CEF_REQUIRE_VALID_RETURN(false);
|
||||
return root_view()->enabled();
|
||||
return root_view()->GetEnabled();
|
||||
}
|
||||
|
||||
CEF_VIEW_IMPL_T void CEF_VIEW_IMPL_D::SetFocusable(bool focusable) {
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include "ui/base/test/ui_controls.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/views/controls/button/menu_button.h"
|
||||
#include "ui/views/controls/menu/menu_runner.h"
|
||||
|
||||
#if defined(USE_AURA)
|
||||
@ -37,9 +38,8 @@ void InitializeUITesting() {
|
||||
if (!initialized) {
|
||||
ui_controls::EnableUIControls();
|
||||
|
||||
|
||||
#if defined(USE_AURA)
|
||||
#if defined(OS_LINUX) && defined(USE_X11)
|
||||
#if defined(OS_LINUX) && defined(USE_X11)
|
||||
ui_controls::InstallUIControlsAura(
|
||||
views::test::CreateUIControlsDesktopAura());
|
||||
#else
|
||||
@ -437,7 +437,7 @@ void CefWindowImpl::ShowMenu(views::MenuButton* menu_button,
|
||||
base::Bind(&CefWindowImpl::MenuClosed, this)));
|
||||
|
||||
menu_runner_->RunMenuAt(
|
||||
widget_, menu_button,
|
||||
widget_, menu_button->button_controller(),
|
||||
gfx::Rect(gfx::Point(screen_point.x, screen_point.y), gfx::Size()),
|
||||
static_cast<views::MenuAnchorPosition>(anchor_position),
|
||||
ui::MENU_SOURCE_NONE);
|
||||
|
@ -249,7 +249,7 @@ base::string16 CefContentClient::GetLocalizedString(
|
||||
int message_id,
|
||||
const base::string16& replacement) const {
|
||||
base::string16 value = l10n_util::GetStringFUTF16(message_id, replacement);
|
||||
if (value.empty())
|
||||
if (value.empty())
|
||||
LOG(ERROR) << "No localized string available for id " << message_id;
|
||||
|
||||
return value;
|
||||
@ -278,6 +278,10 @@ base::RefCountedMemory* CefContentClient::GetDataResourceBytes(
|
||||
return value;
|
||||
}
|
||||
|
||||
bool CefContentClient::IsDataResourceGzipped(int resource_id) const {
|
||||
return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id);
|
||||
}
|
||||
|
||||
gfx::Image& CefContentClient::GetNativeImageNamed(int resource_id) const {
|
||||
gfx::Image& value =
|
||||
ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
|
||||
|
@ -45,6 +45,7 @@ class CefContentClient : public content::ContentClient,
|
||||
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;
|
||||
|
||||
// Values are registered with all processes (url/url_util.h) and with Blink
|
||||
|
@ -80,12 +80,6 @@ bool CefExtensionsClient::IsScriptableURL(const GURL& url,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CefExtensionsClient::ShouldSuppressFatalErrors() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void CefExtensionsClient::RecordDidSuppressFatalError() {}
|
||||
|
||||
const GURL& CefExtensionsClient::GetWebstoreBaseURL() const {
|
||||
return webstore_base_url_;
|
||||
}
|
||||
|
@ -35,8 +35,6 @@ class CefExtensionsClient : public ExtensionsClient {
|
||||
const Extension* extension,
|
||||
const APIPermissionSet& api_permissions) const override;
|
||||
bool IsScriptableURL(const GURL& url, std::string* error) const override;
|
||||
bool ShouldSuppressFatalErrors() const override;
|
||||
void RecordDidSuppressFatalError() override;
|
||||
const GURL& GetWebstoreBaseURL() const override;
|
||||
const GURL& GetWebstoreUpdateURL() const override;
|
||||
bool IsBlacklistUpdateURL(const GURL& url) const override;
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "extensions/common/constants.h"
|
||||
#include "ipc/ipc_buildflags.h"
|
||||
#include "pdf/pdf_ppapi.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "services/service_manager/sandbox/switches.h"
|
||||
#include "ui/base/layout.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
@ -566,6 +567,12 @@ bool CefMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
}
|
||||
}
|
||||
|
||||
if (network::features::kOutOfBlinkCors.default_state ==
|
||||
base::FEATURE_ENABLED_BY_DEFAULT) {
|
||||
// TODO: Add support for out-of-Blink CORS (see issue #2716)
|
||||
disable_features.push_back(network::features::kOutOfBlinkCors.name);
|
||||
}
|
||||
|
||||
if (!disable_features.empty()) {
|
||||
DCHECK(!base::FeatureList::GetInstance());
|
||||
std::string disable_features_str =
|
||||
|
@ -130,7 +130,8 @@ CefString CefURIDecode(const CefString& text,
|
||||
const net::UnescapeRule::Type type =
|
||||
static_cast<net::UnescapeRule::Type>(unescape_rule);
|
||||
if (convert_to_utf8)
|
||||
return net::UnescapeAndDecodeUTF8URLComponent(text.ToString(), type);
|
||||
return net::UnescapeAndDecodeUTF8URLComponentWithAdjustments(
|
||||
text.ToString(), type, NULL);
|
||||
else
|
||||
return net::UnescapeURLComponent(text.ToString(), type);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "libcef/common/service_manifests/cef_packaged_service_manifests.h"
|
||||
#include "libcef/common/service_manifests/builtin_service_manifests.h"
|
||||
|
||||
#include "base/no_destructor.h"
|
||||
#include "build/build_config.h"
|
||||
@ -28,13 +28,16 @@ const service_manager::Manifest& GetCefManifest() {
|
||||
service_manager::ManifestBuilder()
|
||||
.WithServiceName(chrome::mojom::kServiceName)
|
||||
.WithDisplayName("CEF")
|
||||
.WithOptions(service_manager::ManifestOptionsBuilder()
|
||||
.WithInstanceSharingPolicy(
|
||||
service_manager::Manifest::InstanceSharingPolicy::
|
||||
kSharedAcrossGroups)
|
||||
.CanConnectToInstancesWithAnyId(true)
|
||||
.CanRegisterOtherServiceInstances(true)
|
||||
.Build())
|
||||
.WithOptions(
|
||||
service_manager::ManifestOptionsBuilder()
|
||||
.WithExecutionMode(
|
||||
service_manager::Manifest::ExecutionMode::kInProcessBuiltin)
|
||||
.WithInstanceSharingPolicy(
|
||||
service_manager::Manifest::InstanceSharingPolicy::
|
||||
kSharedAcrossGroups)
|
||||
.CanConnectToInstancesWithAnyId(true)
|
||||
.CanRegisterOtherServiceInstances(true)
|
||||
.Build())
|
||||
.ExposeCapability("renderer",
|
||||
service_manager::Manifest::InterfaceList<
|
||||
#if defined(OS_MACOSX)
|
||||
@ -50,7 +53,7 @@ const service_manager::Manifest& GetCefManifest() {
|
||||
|
||||
} // namespace
|
||||
|
||||
const std::vector<service_manager::Manifest>& GetCefPackagedServiceManifests() {
|
||||
const std::vector<service_manager::Manifest>& GetBuiltinServiceManifests() {
|
||||
static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
|
||||
GetCefManifest(),
|
||||
proxy_resolver::GetManifest(),
|
@ -12,6 +12,6 @@
|
||||
// Returns manifests for all shared (i.e. cross-profile) services packaged by
|
||||
// CEF but not packaged by Content. This includes both in- and out-of-process
|
||||
// services.
|
||||
const std::vector<service_manager::Manifest>& GetCefPackagedServiceManifests();
|
||||
const std::vector<service_manager::Manifest>& GetBuiltinServiceManifests();
|
||||
|
||||
#endif // CEF_LIBCEF_COMMON_SERVICE_MANIFESTS_CEF_PACKAGED_SERVICE_MANIFESTS_H_
|
@ -355,19 +355,6 @@ void CefBrowserImpl::OnDestruct() {
|
||||
CefContentRendererClient::Get()->OnBrowserDestroyed(this);
|
||||
}
|
||||
|
||||
void CefBrowserImpl::DidFailProvisionalLoad(blink::WebLocalFrame* frame,
|
||||
const blink::WebURLError& error) {
|
||||
OnLoadError(frame, error);
|
||||
}
|
||||
|
||||
void CefBrowserImpl::DidCommitProvisionalLoad(blink::WebLocalFrame* frame,
|
||||
bool is_new_navigation) {
|
||||
if (frame->Parent() == nullptr) {
|
||||
OnLoadingStateChange(true);
|
||||
}
|
||||
OnLoadStart(frame);
|
||||
}
|
||||
|
||||
void CefBrowserImpl::FrameDetached(int64_t frame_id) {
|
||||
if (!frames_.empty()) {
|
||||
// Remove the frame from the map.
|
||||
@ -412,37 +399,3 @@ void CefBrowserImpl::OnLoadingStateChange(bool isLoading) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserImpl::OnLoadStart(blink::WebLocalFrame* frame) {
|
||||
CefRefPtr<CefApp> app = CefContentClient::Get()->application();
|
||||
if (app.get()) {
|
||||
CefRefPtr<CefRenderProcessHandler> handler = app->GetRenderProcessHandler();
|
||||
if (handler.get()) {
|
||||
CefRefPtr<CefLoadHandler> load_handler = handler->GetLoadHandler();
|
||||
if (load_handler.get()) {
|
||||
CefRefPtr<CefFrameImpl> cef_frame = GetWebFrameImpl(frame);
|
||||
load_handler->OnLoadStart(this, cef_frame.get(), TT_EXPLICIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CefBrowserImpl::OnLoadError(blink::WebLocalFrame* frame,
|
||||
const blink::WebURLError& error) {
|
||||
CefRefPtr<CefApp> app = CefContentClient::Get()->application();
|
||||
if (app.get()) {
|
||||
CefRefPtr<CefRenderProcessHandler> handler = app->GetRenderProcessHandler();
|
||||
if (handler.get()) {
|
||||
CefRefPtr<CefLoadHandler> load_handler = handler->GetLoadHandler();
|
||||
if (load_handler.get()) {
|
||||
CefRefPtr<CefFrameImpl> cef_frame = GetWebFrameImpl(frame);
|
||||
const cef_errorcode_t errorCode =
|
||||
static_cast<cef_errorcode_t>(error.reason());
|
||||
const std::string& errorText = net::ErrorToString(error.reason());
|
||||
const GURL& failedUrl = error.url();
|
||||
load_handler->OnLoadError(this, cef_frame.get(), errorCode, errorText,
|
||||
failedUrl.spec());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,20 +83,11 @@ class CefBrowserImpl : public CefBrowser, public content::RenderViewObserver {
|
||||
|
||||
// RenderViewObserver methods.
|
||||
void OnDestruct() override;
|
||||
void DidFailProvisionalLoad(blink::WebLocalFrame* frame,
|
||||
const blink::WebURLError& error) override;
|
||||
void DidCommitProvisionalLoad(blink::WebLocalFrame* frame,
|
||||
bool is_new_navigation) override;
|
||||
|
||||
void FrameDetached(int64_t frame_id);
|
||||
|
||||
void OnLoadingStateChange(bool isLoading);
|
||||
|
||||
private:
|
||||
void OnLoadStart(blink::WebLocalFrame* frame);
|
||||
void OnLoadError(blink::WebLocalFrame* frame,
|
||||
const blink::WebURLError& error);
|
||||
|
||||
// ID of the browser that this RenderView is associated with. During loading
|
||||
// of cross-origin requests multiple RenderViews may be associated with the
|
||||
// same browser ID.
|
||||
|
@ -292,7 +292,11 @@ void CefContentRendererClient::WebKitInitialized() {
|
||||
blink::WebSecurityPolicy::AddOriginAccessAllowListEntry(
|
||||
gurl, blink::WebString::FromUTF8(entry.target_protocol),
|
||||
blink::WebString::FromUTF8(entry.target_domain),
|
||||
entry.allow_target_subdomains,
|
||||
/*destination_port=*/0,
|
||||
entry.allow_target_subdomains
|
||||
? network::mojom::CorsDomainMatchMode::kAllowSubdomains
|
||||
: network::mojom::CorsDomainMatchMode::kDisallowSubdomains,
|
||||
network::mojom::CorsPortMatchMode::kAllowAnyPort,
|
||||
network::mojom::CorsOriginAccessMatchPriority::kDefaultPriority);
|
||||
}
|
||||
cross_origin_whitelist_entries_.clear();
|
||||
@ -418,7 +422,8 @@ void CefContentRendererClient::RenderThreadStarted() {
|
||||
pdf::PepperPDFHost::SetPrintClient(pdf_print_client_.get());
|
||||
}
|
||||
|
||||
for (auto& origin_or_hostname_pattern : network::GetSecureOriginAllowlist()) {
|
||||
for (auto& origin_or_hostname_pattern :
|
||||
network::SecureOriginAllowlist::GetInstance().GetCurrentAllowlist()) {
|
||||
blink::WebSecurityPolicy::AddOriginToTrustworthySafelist(
|
||||
blink::WebString::FromUTF8(origin_or_hostname_pattern));
|
||||
}
|
||||
|
@ -51,16 +51,16 @@ bool CefPrintRenderFrameHelperDelegate::OverridePrint(
|
||||
if (!frame->GetDocument().IsPluginDocument())
|
||||
return false;
|
||||
|
||||
auto mime_handlers = extensions::MimeHandlerViewContainer::FromRenderFrame(
|
||||
content::RenderFrame::FromWebFrame(frame));
|
||||
if (!mime_handlers.empty()) {
|
||||
auto* post_message_support =
|
||||
extensions::PostMessageSupport::FromWebLocalFrame(frame);
|
||||
if (post_message_support) {
|
||||
// This message is handled in chrome/browser/resources/pdf/pdf.js and
|
||||
// instructs the PDF plugin to print. This is to make window.print() on a
|
||||
// PDF plugin document correctly print the PDF. See
|
||||
// https://crbug.com/448720.
|
||||
base::DictionaryValue message;
|
||||
message.SetString("type", "print");
|
||||
mime_handlers.front()->PostMessageFromValue(message);
|
||||
post_message_support->PostMessageFromValue(message);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -230,13 +230,6 @@ CefString CefFrameImpl::GetURL() {
|
||||
|
||||
if (frame_) {
|
||||
GURL gurl = frame_->GetDocument().Url();
|
||||
if (gurl.is_empty()) {
|
||||
// For popups the main document URL will be empty during loading. Return
|
||||
// the provisional document URL instead.
|
||||
blink::WebDocumentLoader* loader = frame_->GetProvisionalDocumentLoader();
|
||||
if (loader)
|
||||
gurl = loader->GetUrl();
|
||||
}
|
||||
url = gurl.spec();
|
||||
}
|
||||
return url;
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "libcef/renderer/v8_impl.h"
|
||||
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "content/public/renderer/render_view.h"
|
||||
#include "third_party/blink/public/web/blink.h"
|
||||
#include "third_party/blink/public/web/web_document.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
@ -41,6 +42,28 @@ void CefRenderFrameObserver::OnInterfaceRequestForFrame(
|
||||
registry_.TryBindInterface(interface_name, interface_pipe);
|
||||
}
|
||||
|
||||
void CefRenderFrameObserver::DidCommitProvisionalLoad(
|
||||
bool is_same_document_navigation,
|
||||
ui::PageTransition transition) {
|
||||
if (!frame_)
|
||||
return;
|
||||
|
||||
if (frame_->GetParent() == nullptr) {
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
CefRefPtr<CefBrowserImpl> browserPtr =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(frame->Top());
|
||||
browserPtr->OnLoadingStateChange(true);
|
||||
}
|
||||
OnLoadStart();
|
||||
}
|
||||
|
||||
void CefRenderFrameObserver::DidFailProvisionalLoad(
|
||||
const blink::WebURLError& error) {
|
||||
if (frame_) {
|
||||
OnLoadError(error);
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderFrameObserver::DidFinishLoad() {
|
||||
if (frame_) {
|
||||
frame_->OnDidFinishLoad();
|
||||
@ -60,7 +83,11 @@ void CefRenderFrameObserver::FrameFocused() {
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderFrameObserver::FocusedNodeChanged(const blink::WebNode& node) {
|
||||
void CefRenderFrameObserver::FocusedElementChanged(
|
||||
const blink::WebElement& element) {
|
||||
if (!frame_)
|
||||
return;
|
||||
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
CefRefPtr<CefBrowserImpl> browserPtr =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(frame->Top());
|
||||
@ -76,18 +103,18 @@ void CefRenderFrameObserver::FocusedNodeChanged(const blink::WebNode& node) {
|
||||
|
||||
CefRefPtr<CefFrameImpl> framePtr = browserPtr->GetWebFrameImpl(frame);
|
||||
|
||||
if (node.IsNull()) {
|
||||
if (element.IsNull()) {
|
||||
handler->OnFocusedNodeChanged(browserPtr.get(), framePtr.get(), nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.GetDocument().IsNull())
|
||||
if (element.GetDocument().IsNull())
|
||||
return;
|
||||
|
||||
CefRefPtr<CefDOMDocumentImpl> documentImpl =
|
||||
new CefDOMDocumentImpl(browserPtr.get(), frame);
|
||||
handler->OnFocusedNodeChanged(browserPtr.get(), framePtr.get(),
|
||||
documentImpl->GetOrCreateNode(node));
|
||||
documentImpl->GetOrCreateNode(element));
|
||||
documentImpl->Detach();
|
||||
}
|
||||
|
||||
@ -100,6 +127,9 @@ void CefRenderFrameObserver::DraggableRegionsChanged() {
|
||||
void CefRenderFrameObserver::DidCreateScriptContext(
|
||||
v8::Handle<v8::Context> context,
|
||||
int world_id) {
|
||||
if (!frame_)
|
||||
return;
|
||||
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
CefRefPtr<CefBrowserImpl> browserPtr =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(frame->Top());
|
||||
@ -178,6 +208,43 @@ void CefRenderFrameObserver::AttachFrame(CefFrameImpl* frame) {
|
||||
frame_->OnAttached();
|
||||
}
|
||||
|
||||
void CefRenderFrameObserver::OnLoadStart() {
|
||||
CefRefPtr<CefApp> app = CefContentClient::Get()->application();
|
||||
if (app.get()) {
|
||||
CefRefPtr<CefRenderProcessHandler> handler = app->GetRenderProcessHandler();
|
||||
if (handler.get()) {
|
||||
CefRefPtr<CefLoadHandler> load_handler = handler->GetLoadHandler();
|
||||
if (load_handler.get()) {
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
CefRefPtr<CefBrowserImpl> browserPtr =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(frame->Top());
|
||||
load_handler->OnLoadStart(browserPtr.get(), frame_, TT_EXPLICIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CefRenderFrameObserver::OnLoadError(const blink::WebURLError& error) {
|
||||
CefRefPtr<CefApp> app = CefContentClient::Get()->application();
|
||||
if (app.get()) {
|
||||
CefRefPtr<CefRenderProcessHandler> handler = app->GetRenderProcessHandler();
|
||||
if (handler.get()) {
|
||||
CefRefPtr<CefLoadHandler> load_handler = handler->GetLoadHandler();
|
||||
if (load_handler.get()) {
|
||||
const cef_errorcode_t errorCode =
|
||||
static_cast<cef_errorcode_t>(error.reason());
|
||||
const std::string& errorText = net::ErrorToString(error.reason());
|
||||
const GURL& failedUrl = error.url();
|
||||
blink::WebLocalFrame* frame = render_frame()->GetWebFrame();
|
||||
CefRefPtr<CefBrowserImpl> browserPtr =
|
||||
CefBrowserImpl::GetBrowserForMainFrame(frame->Top());
|
||||
load_handler->OnLoadError(browserPtr.get(), frame_, errorCode,
|
||||
errorText, failedUrl.spec());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Enable deprecation warnings on Windows. See http://crbug.com/585142.
|
||||
#if defined(OS_WIN)
|
||||
#if defined(__clang__)
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
namespace content {
|
||||
class RenderFrame;
|
||||
}
|
||||
class RenderView;
|
||||
} // namespace content
|
||||
|
||||
class CefFrameImpl;
|
||||
|
||||
@ -23,10 +24,13 @@ class CefRenderFrameObserver : public content::RenderFrameObserver {
|
||||
void OnInterfaceRequestForFrame(
|
||||
const std::string& interface_name,
|
||||
mojo::ScopedMessagePipeHandle* interface_pipe) override;
|
||||
void DidCommitProvisionalLoad(bool is_same_document_navigation,
|
||||
ui::PageTransition transition) override;
|
||||
void DidFailProvisionalLoad(const blink::WebURLError& error) override;
|
||||
void DidFinishLoad() override;
|
||||
void FrameDetached() override;
|
||||
void FrameFocused() override;
|
||||
void FocusedNodeChanged(const blink::WebNode& node) override;
|
||||
void FocusedElementChanged(const blink::WebElement& element) override;
|
||||
void DraggableRegionsChanged() override;
|
||||
void DidCreateScriptContext(v8::Handle<v8::Context> context,
|
||||
int world_id) override;
|
||||
@ -40,6 +44,9 @@ class CefRenderFrameObserver : public content::RenderFrameObserver {
|
||||
void AttachFrame(CefFrameImpl* frame);
|
||||
|
||||
private:
|
||||
void OnLoadStart();
|
||||
void OnLoadError(const blink::WebURLError& error);
|
||||
|
||||
service_manager::BinderRegistry registry_;
|
||||
CefFrameImpl* frame_ = nullptr;
|
||||
|
||||
|
@ -68,7 +68,11 @@ void CefRenderThreadObserver::OnModifyCrossOriginWhitelistEntry(
|
||||
blink::WebSecurityPolicy::AddOriginAccessAllowListEntry(
|
||||
gurl, blink::WebString::FromUTF8(params.target_protocol),
|
||||
blink::WebString::FromUTF8(params.target_domain),
|
||||
params.allow_target_subdomains,
|
||||
/*destination_port=*/0,
|
||||
params.allow_target_subdomains
|
||||
? network::mojom::CorsDomainMatchMode::kAllowSubdomains
|
||||
: network::mojom::CorsDomainMatchMode::kDisallowSubdomains,
|
||||
network::mojom::CorsPortMatchMode::kAllowAnyPort,
|
||||
network::mojom::CorsOriginAccessMatchPriority::kDefaultPriority);
|
||||
} else {
|
||||
blink::WebSecurityPolicy::ClearOriginAccessListForOrigin(gurl);
|
||||
|
@ -1942,9 +1942,11 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(const CefString& key) {
|
||||
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
v8::Local<v8::Value> ret_value = obj->Get(GetV8String(isolate, key));
|
||||
if (!HasCaught(context, try_catch) && !ret_value.IsEmpty())
|
||||
return new CefV8ValueImpl(isolate, context, ret_value);
|
||||
v8::MaybeLocal<v8::Value> ret_value =
|
||||
obj->Get(context, GetV8String(isolate, key));
|
||||
if (!HasCaught(context, try_catch) && !ret_value.IsEmpty()) {
|
||||
return new CefV8ValueImpl(isolate, context, ret_value.ToLocalChecked());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1970,9 +1972,11 @@ CefRefPtr<CefV8Value> CefV8ValueImpl::GetValue(int index) {
|
||||
|
||||
v8::TryCatch try_catch(isolate);
|
||||
try_catch.SetVerbose(true);
|
||||
v8::Local<v8::Value> ret_value = obj->Get(v8::Number::New(isolate, index));
|
||||
if (!HasCaught(context, try_catch) && !ret_value.IsEmpty())
|
||||
return new CefV8ValueImpl(isolate, context, ret_value);
|
||||
v8::MaybeLocal<v8::Value> ret_value =
|
||||
obj->Get(context, v8::Number::New(isolate, index));
|
||||
if (!HasCaught(context, try_catch) && !ret_value.IsEmpty()) {
|
||||
return new CefV8ValueImpl(isolate, context, ret_value.ToLocalChecked());
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2110,7 +2114,8 @@ bool CefV8ValueImpl::GetKeys(std::vector<CefString>& keys) {
|
||||
|
||||
uint32_t len = arr_keys->Length();
|
||||
for (uint32_t i = 0; i < len; ++i) {
|
||||
v8::Local<v8::Value> value = arr_keys->Get(v8::Integer::New(isolate, i));
|
||||
v8::Local<v8::Value> value =
|
||||
arr_keys->Get(context, v8::Integer::New(isolate, i)).ToLocalChecked();
|
||||
CefString str;
|
||||
GetCefString(isolate, value->ToString(context).ToLocalChecked(), str);
|
||||
keys.push_back(str);
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=ade8463314c8fc448c4e5ec3d3957406136b7093$
|
||||
// $hash=df8ed09a4f57cf6673ec186b5caebe35406b9a0c$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/label_button_cpptoc.h"
|
||||
@ -30,8 +30,7 @@
|
||||
|
||||
CEF_EXPORT cef_label_button_t* cef_label_button_create(
|
||||
cef_button_delegate_t* delegate,
|
||||
const cef_string_t* text,
|
||||
int with_frame) {
|
||||
const cef_string_t* text) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@ -44,8 +43,7 @@ CEF_EXPORT cef_label_button_t* cef_label_button_create(
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefLabelButton> _retval = CefLabelButton::CreateLabelButton(
|
||||
CefButtonDelegateCToCpp::Wrap(delegate), CefString(text),
|
||||
with_frame ? true : false);
|
||||
CefButtonDelegateCToCpp::Wrap(delegate), CefString(text));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefLabelButtonCppToC::Wrap(_retval);
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=e89e1ff0724489e14eef305e8e32093c8dc00c8d$
|
||||
// $hash=9253db077e6fc32d5b7a2b4cf2aebe061f97f43d$
|
||||
//
|
||||
|
||||
#include "libcef_dll/cpptoc/views/menu_button_cpptoc.h"
|
||||
@ -31,8 +31,7 @@
|
||||
|
||||
CEF_EXPORT cef_menu_button_t* cef_menu_button_create(
|
||||
cef_menu_button_delegate_t* delegate,
|
||||
const cef_string_t* text,
|
||||
int with_frame) {
|
||||
const cef_string_t* text) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@ -45,8 +44,7 @@ CEF_EXPORT cef_menu_button_t* cef_menu_button_create(
|
||||
|
||||
// Execute
|
||||
CefRefPtr<CefMenuButton> _retval = CefMenuButton::CreateMenuButton(
|
||||
CefMenuButtonDelegateCToCpp::Wrap(delegate), CefString(text),
|
||||
with_frame ? true : false);
|
||||
CefMenuButtonDelegateCToCpp::Wrap(delegate), CefString(text));
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefMenuButtonCppToC::Wrap(_retval);
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=06d1a2ceda1286960241c582b7ac4abba2319835$
|
||||
// $hash=41970661c30de858da045839a76401593ae4f11a$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/views/label_button_ctocpp.h"
|
||||
@ -31,8 +31,7 @@
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
const CefString& text) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@ -45,7 +44,7 @@ CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
|
||||
|
||||
// Execute
|
||||
cef_label_button_t* _retval = cef_label_button_create(
|
||||
CefButtonDelegateCppToC::Wrap(delegate), text.GetStruct(), with_frame);
|
||||
CefButtonDelegateCppToC::Wrap(delegate), text.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefLabelButtonCToCpp::Wrap(_retval);
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=65bbd880228104da2b65abf2c2a75acd5d698ecd$
|
||||
// $hash=0d2a3ffb1ec2b78d3784650f8720bd24a44dfd17$
|
||||
//
|
||||
|
||||
#include "libcef_dll/ctocpp/views/menu_button_ctocpp.h"
|
||||
@ -32,8 +32,7 @@
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
const CefString& text) {
|
||||
shutdown_checker::AssertNotShutdown();
|
||||
|
||||
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
||||
@ -45,9 +44,8 @@ CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
|
||||
// Unverified params: text
|
||||
|
||||
// Execute
|
||||
cef_menu_button_t* _retval =
|
||||
cef_menu_button_create(CefMenuButtonDelegateCppToC::Wrap(delegate),
|
||||
text.GetStruct(), with_frame);
|
||||
cef_menu_button_t* _retval = cef_menu_button_create(
|
||||
CefMenuButtonDelegateCppToC::Wrap(delegate), text.GetStruct());
|
||||
|
||||
// Return type: refptr_same
|
||||
return CefMenuButtonCToCpp::Wrap(_retval);
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=03444846894791bdea24dbd8b059570cda5b801f$
|
||||
// $hash=13555da36aa665884dfafb4c2d66d33f200e34c7$
|
||||
//
|
||||
|
||||
#include "include/views/cef_browser_view.h"
|
||||
@ -78,8 +78,7 @@ void CefDisplay::GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays) {
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
|
||||
CefRefPtr<CefButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
const CefString& text) {
|
||||
NOTIMPLEMENTED();
|
||||
return NULL;
|
||||
}
|
||||
@ -87,8 +86,7 @@ CefRefPtr<CefLabelButton> CefLabelButton::CreateLabelButton(
|
||||
NO_SANITIZE("cfi-icall")
|
||||
CefRefPtr<CefMenuButton> CefMenuButton::CreateMenuButton(
|
||||
CefRefPtr<CefMenuButtonDelegate> delegate,
|
||||
const CefString& text,
|
||||
bool with_frame) {
|
||||
const CefString& text) {
|
||||
NOTIMPLEMENTED();
|
||||
return NULL;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=436002ae114825124a9a52a24928a974fcf5408a$
|
||||
// $hash=231f2dd6f300c93a38ef8c18e19141691b3337ac$
|
||||
//
|
||||
|
||||
#include <dlfcn.h>
|
||||
@ -317,12 +317,10 @@ typedef size_t (*cef_display_get_count_ptr)();
|
||||
typedef void (*cef_display_get_alls_ptr)(size_t*, struct _cef_display_t**);
|
||||
typedef struct _cef_label_button_t* (*cef_label_button_create_ptr)(
|
||||
struct _cef_button_delegate_t*,
|
||||
const cef_string_t*,
|
||||
int);
|
||||
const cef_string_t*);
|
||||
typedef struct _cef_menu_button_t* (*cef_menu_button_create_ptr)(
|
||||
struct _cef_menu_button_delegate_t*,
|
||||
const cef_string_t*,
|
||||
int);
|
||||
const cef_string_t*);
|
||||
typedef struct _cef_panel_t* (*cef_panel_create_ptr)(
|
||||
struct _cef_panel_delegate_t*);
|
||||
typedef struct _cef_scroll_view_t* (*cef_scroll_view_create_ptr)(
|
||||
@ -1091,8 +1089,8 @@ int cef_create_url(const struct _cef_urlparts_t* parts, cef_string_t* url) {
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
cef_string_userfree_t cef_format_url_for_security_display(
|
||||
const cef_string_t* origin_url) {
|
||||
cef_string_userfree_t
|
||||
cef_format_url_for_security_display(const cef_string_t* origin_url) {
|
||||
return g_libcef_pointers.cef_format_url_for_security_display(origin_url);
|
||||
}
|
||||
|
||||
@ -1571,46 +1569,54 @@ struct _cef_translator_test_t* cef_translator_test_create() {
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
struct _cef_translator_test_ref_ptr_library_t*
|
||||
cef_translator_test_ref_ptr_library_create(int value) {
|
||||
struct
|
||||
_cef_translator_test_ref_ptr_library_t* cef_translator_test_ref_ptr_library_create(
|
||||
int value) {
|
||||
return g_libcef_pointers.cef_translator_test_ref_ptr_library_create(value);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
struct _cef_translator_test_ref_ptr_library_child_t*
|
||||
cef_translator_test_ref_ptr_library_child_create(int value, int other_value) {
|
||||
struct
|
||||
_cef_translator_test_ref_ptr_library_child_t* cef_translator_test_ref_ptr_library_child_create(
|
||||
int value,
|
||||
int other_value) {
|
||||
return g_libcef_pointers.cef_translator_test_ref_ptr_library_child_create(
|
||||
value, other_value);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
struct _cef_translator_test_ref_ptr_library_child_child_t*
|
||||
cef_translator_test_ref_ptr_library_child_child_create(int value,
|
||||
int other_value,
|
||||
int other_other_value) {
|
||||
struct
|
||||
_cef_translator_test_ref_ptr_library_child_child_t* cef_translator_test_ref_ptr_library_child_child_create(
|
||||
int value,
|
||||
int other_value,
|
||||
int other_other_value) {
|
||||
return g_libcef_pointers
|
||||
.cef_translator_test_ref_ptr_library_child_child_create(
|
||||
value, other_value, other_other_value);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
struct _cef_translator_test_scoped_library_t*
|
||||
cef_translator_test_scoped_library_create(int value) {
|
||||
struct
|
||||
_cef_translator_test_scoped_library_t* cef_translator_test_scoped_library_create(
|
||||
int value) {
|
||||
return g_libcef_pointers.cef_translator_test_scoped_library_create(value);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
struct _cef_translator_test_scoped_library_child_t*
|
||||
cef_translator_test_scoped_library_child_create(int value, int other_value) {
|
||||
struct
|
||||
_cef_translator_test_scoped_library_child_t* cef_translator_test_scoped_library_child_create(
|
||||
int value,
|
||||
int other_value) {
|
||||
return g_libcef_pointers.cef_translator_test_scoped_library_child_create(
|
||||
value, other_value);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
struct _cef_translator_test_scoped_library_child_child_t*
|
||||
cef_translator_test_scoped_library_child_child_create(int value,
|
||||
int other_value,
|
||||
int other_other_value) {
|
||||
struct
|
||||
_cef_translator_test_scoped_library_child_child_t* cef_translator_test_scoped_library_child_child_create(
|
||||
int value,
|
||||
int other_value,
|
||||
int other_other_value) {
|
||||
return g_libcef_pointers
|
||||
.cef_translator_test_scoped_library_child_child_create(value, other_value,
|
||||
other_other_value);
|
||||
@ -1665,17 +1671,15 @@ void cef_display_get_alls(size_t* displaysCount,
|
||||
NO_SANITIZE("cfi-icall")
|
||||
struct _cef_label_button_t* cef_label_button_create(
|
||||
struct _cef_button_delegate_t* delegate,
|
||||
const cef_string_t* text,
|
||||
int with_frame) {
|
||||
return g_libcef_pointers.cef_label_button_create(delegate, text, with_frame);
|
||||
const cef_string_t* text) {
|
||||
return g_libcef_pointers.cef_label_button_create(delegate, text);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
struct _cef_menu_button_t* cef_menu_button_create(
|
||||
struct _cef_menu_button_delegate_t* delegate,
|
||||
const cef_string_t* text,
|
||||
int with_frame) {
|
||||
return g_libcef_pointers.cef_menu_button_create(delegate, text, with_frame);
|
||||
const cef_string_t* text) {
|
||||
return g_libcef_pointers.cef_menu_button_create(delegate, text);
|
||||
}
|
||||
|
||||
NO_SANITIZE("cfi-icall")
|
||||
|
@ -441,14 +441,24 @@ patches = [
|
||||
'name': 'remove_component_build_check',
|
||||
},
|
||||
{
|
||||
# Fix CompositorFrameReportingController usage of DCHECK_NE to compare
|
||||
# unique_ptr types.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/1584292
|
||||
'name': 'compositor_frame_reporting_controller_1584292',
|
||||
# Restore WebUrlLoader Cancel method.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/1617042
|
||||
'name': 'web_url_loader_cancel_1617042',
|
||||
},
|
||||
{
|
||||
# Fix AssertContextWasntDestroyed due to pointer reuse.
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/1590418
|
||||
'name': 'simple_dependency_manager_1590418',
|
||||
}
|
||||
# Avoid a shutdown crash with multi-threaded message loop caused by
|
||||
# |g_browser_task_executor->browser_ui_thread_scheduler_| being null when
|
||||
# BrowserTaskExecutor::Shutdown is called via CefContext::FinalizeShutdown.
|
||||
# This crash was introduced by https://crrev.com/5f6212babf.
|
||||
'name': 'browser_scheduler',
|
||||
},
|
||||
{
|
||||
# Avoid a shutdown crash caused by PrefWatcher holding a reference to
|
||||
# |g_browser_process->local_state()|, and the local_state being deleted
|
||||
# before the PrefWatcher object (which is associated with a Profile).
|
||||
# PrefWatcher::Shutdown will now be called from ChromeBrowserProcessStub::
|
||||
# Shutdown for all Profiles before local_state deletion.
|
||||
# This crash was introduced by https://crrev.com/7d032b378c.
|
||||
'name': 'chrome_pref_watcher',
|
||||
}
|
||||
]
|
||||
|
@ -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 e098a5261725..001670b0a7aa 100644
|
||||
index a04ca1926622..705cc77ccee0 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
@@ -649,6 +649,7 @@ void RenderWidgetHostViewChildFrame::SubmitCompositorFrame(
|
||||
@@ -614,6 +614,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 e098a5261725..001670b0a7aa 100644
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
|
||||
@@ -657,6 +658,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
|
||||
@@ -622,6 +623,15 @@ void RenderWidgetHostViewChildFrame::OnDidNotProduceFrame(
|
||||
support_->DidNotProduceFrame(ack);
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ index e098a5261725..001670b0a7aa 100644
|
||||
void RenderWidgetHostViewChildFrame::TransformPointToRootSurface(
|
||||
gfx::PointF* point) {
|
||||
// This function is called by RenderWidgetHostInputEventRouter only for
|
||||
@@ -841,6 +851,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
|
||||
@@ -806,6 +816,11 @@ void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() {
|
||||
void RenderWidgetHostViewChildFrame::SpeakSelection() {}
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
|
@ -12,10 +12,10 @@ index de89d291e5cb..9ce7bf4cb250 100644
|
||||
// Force a new surface id to be allocated. Returns true if the
|
||||
// RenderWidgetHostImpl sent the resulting surface id to the renderer.
|
||||
diff --git content/browser/renderer_host/browser_compositor_view_mac.mm content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
index 625566d5ad25..64e2732caf24 100644
|
||||
index 4b3f3c7e97e7..0ce693402b99 100644
|
||||
--- content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
+++ content/browser/renderer_host/browser_compositor_view_mac.mm
|
||||
@@ -84,6 +84,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
|
||||
@@ -85,6 +85,12 @@ DelegatedFrameHost* BrowserCompositorMac::GetDelegatedFrameHost() {
|
||||
return delegated_frame_host_.get();
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
index 5ec2e8461380..4ba494dad4ba 100644
|
||||
index dfd38d5252a5..6c178ff2a8f4 100644
|
||||
--- content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
+++ content/browser/browser_plugin/browser_plugin_guest.cc
|
||||
@@ -348,8 +348,11 @@ void BrowserPluginGuest::InitInternal(
|
||||
@@ -308,8 +308,11 @@ void BrowserPluginGuest::InitInternal(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ index 5ec2e8461380..4ba494dad4ba 100644
|
||||
|
||||
// Once a BrowserPluginGuest has an embedder WebContents, it's considered to
|
||||
// be attached.
|
||||
@@ -862,10 +865,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
@@ -822,10 +825,19 @@ void BrowserPluginGuest::OnWillAttachComplete(
|
||||
static_cast<WebContentsViewGuest*>(GetWebContents()->GetView());
|
||||
if (!web_contents()->GetRenderViewHost()->GetWidget()->GetView()) {
|
||||
web_contents_view->CreateViewForWidget(
|
||||
@ -37,7 +37,7 @@ index 5ec2e8461380..4ba494dad4ba 100644
|
||||
|
||||
attached_ = true;
|
||||
diff --git content/browser/frame_host/interstitial_page_impl.cc content/browser/frame_host/interstitial_page_impl.cc
|
||||
index dbc6281ef737..e413bf418b25 100644
|
||||
index 106239c65d0e..b3b3121dec54 100644
|
||||
--- content/browser/frame_host/interstitial_page_impl.cc
|
||||
+++ content/browser/frame_host/interstitial_page_impl.cc
|
||||
@@ -632,7 +632,7 @@ WebContentsView* InterstitialPageImpl::CreateWebContentsView() {
|
||||
@ -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 74f537d11618..85110e2e6ecf 100644
|
||||
index ee5760ecbe0f..73521279a506 100644
|
||||
--- content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -818,7 +818,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
|
||||
@@ -946,7 +946,8 @@ void WebContentsViewAura::CreateView(const gfx::Size& initial_size,
|
||||
}
|
||||
|
||||
RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
@ -92,7 +92,7 @@ index 74f537d11618..85110e2e6ecf 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
|
||||
@@ -830,6 +831,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
@@ -958,6 +959,7 @@ RenderWidgetHostViewBase* WebContentsViewAura::CreateViewForWidget(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
|
||||
@ -101,10 +101,10 @@ index 74f537d11618..85110e2e6ecf 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 a1395dab81d4..b8c33779fef4 100644
|
||||
index 46ca496af77b..cd6ad38ab5ae 100644
|
||||
--- content/browser/web_contents/web_contents_view_aura.h
|
||||
+++ content/browser/web_contents/web_contents_view_aura.h
|
||||
@@ -109,7 +109,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
||||
@@ -121,7 +121,7 @@ class CONTENT_EXPORT WebContentsViewAura
|
||||
gfx::NativeView context) override;
|
||||
RenderWidgetHostViewBase* CreateViewForWidget(
|
||||
RenderWidgetHost* render_widget_host,
|
||||
@ -140,10 +140,10 @@ index 8aaa80183dd1..b9df8a87be07 100644
|
||||
RenderWidgetHost* render_widget_host) override;
|
||||
void SetPageTitle(const base::string16& title) override;
|
||||
diff --git content/browser/web_contents/web_contents_view_guest.cc content/browser/web_contents/web_contents_view_guest.cc
|
||||
index 9d91d225fd9f..381b5a1743ae 100644
|
||||
index ecaf30bcb7b9..7c65a61fe158 100644
|
||||
--- content/browser/web_contents/web_contents_view_guest.cc
|
||||
+++ content/browser/web_contents/web_contents_view_guest.cc
|
||||
@@ -69,6 +69,8 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const {
|
||||
@@ -68,6 +68,8 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const {
|
||||
|
||||
void WebContentsViewGuest::OnGuestAttached(WebContentsView* parent_view) {
|
||||
#if defined(USE_AURA)
|
||||
@ -152,16 +152,16 @@ index 9d91d225fd9f..381b5a1743ae 100644
|
||||
// In aura, ScreenPositionClient doesn't work properly if we do
|
||||
// not have the native view associated with this WebContentsViewGuest in the
|
||||
// view hierarchy. We add this view as embedder's child here.
|
||||
@@ -80,6 +82,8 @@ void WebContentsViewGuest::OnGuestAttached(WebContentsView* parent_view) {
|
||||
@@ -78,6 +80,8 @@ void WebContentsViewGuest::OnGuestAttached(WebContentsView* parent_view) {
|
||||
}
|
||||
|
||||
void WebContentsViewGuest::OnGuestDetached(WebContentsView* old_parent_view) {
|
||||
+ if (!platform_view_->GetNativeView())
|
||||
+ return;
|
||||
#if defined(USE_AURA)
|
||||
if (!features::IsMultiProcessMash()) {
|
||||
old_parent_view->GetNativeView()->RemoveChild(
|
||||
@@ -124,7 +128,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size,
|
||||
old_parent_view->GetNativeView()->RemoveChild(
|
||||
platform_view_->GetNativeView());
|
||||
@@ -120,7 +124,8 @@ void WebContentsViewGuest::CreateView(const gfx::Size& initial_size,
|
||||
}
|
||||
|
||||
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
||||
@ -171,7 +171,7 @@ index 9d91d225fd9f..381b5a1743ae 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
|
||||
@@ -136,11 +141,19 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
||||
@@ -132,11 +137,19 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ 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 4266d4c817d4..7bcede99bca1 100644
|
||||
index 1b577eacbcc2..f614825b14a6 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,
|
||||
@ -221,10 +221,10 @@ index 4266d4c817d4..7bcede99bca1 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 2d24491812f5..bbba45c502e5 100644
|
||||
index c6adcdd2b33e..a77289b96036 100644
|
||||
--- content/browser/web_contents/web_contents_view_mac.mm
|
||||
+++ content/browser/web_contents/web_contents_view_mac.mm
|
||||
@@ -319,7 +319,8 @@ void WebContentsViewMac::CreateView(
|
||||
@@ -323,7 +323,8 @@ void WebContentsViewMac::CreateView(
|
||||
}
|
||||
|
||||
RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
@ -234,7 +234,7 @@ index 2d24491812f5..bbba45c502e5 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
|
||||
@@ -331,6 +332,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
@@ -335,6 +336,7 @@ RenderWidgetHostViewBase* WebContentsViewMac::CreateViewForWidget(
|
||||
render_widget_host->GetView());
|
||||
}
|
||||
|
||||
@ -243,18 +243,18 @@ index 2d24491812f5..bbba45c502e5 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 bf2226b53dd7..782a320ab788 100644
|
||||
index b7db83c24fc5..edf379709ec0 100644
|
||||
--- content/public/browser/browser_plugin_guest_delegate.h
|
||||
+++ content/public/browser/browser_plugin_guest_delegate.h
|
||||
@@ -19,6 +19,7 @@ namespace content {
|
||||
class GuestHost;
|
||||
@@ -20,6 +20,7 @@ class GuestHost;
|
||||
class RenderFrameHost;
|
||||
class RenderWidgetHost;
|
||||
class SiteInstance;
|
||||
+class WebContentsView;
|
||||
|
||||
// Objects implement this interface to get notified about changes in the guest
|
||||
// WebContents and to provide necessary functionality.
|
||||
@@ -67,6 +68,10 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
|
||||
@@ -68,6 +69,10 @@ class CONTENT_EXPORT BrowserPluginGuestDelegate {
|
||||
// content module.
|
||||
virtual void SetGuestHost(GuestHost* guest_host) {}
|
||||
|
||||
@ -266,10 +266,10 @@ index bf2226b53dd7..782a320ab788 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 5bc11895ea38..656fa0f62114 100644
|
||||
index cf367d30422b..619c14dc05a1 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
|
||||
@@ -211,6 +211,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
@@ -233,6 +233,8 @@ void MimeHandlerViewGuest::CreateWebContents(
|
||||
WebContents::CreateParams params(browser_context(),
|
||||
guest_site_instance.get());
|
||||
params.guest_delegate = this;
|
||||
@ -278,7 +278,7 @@ index 5bc11895ea38..656fa0f62114 100644
|
||||
// TODO(erikchen): Fix ownership semantics for guest views.
|
||||
// https://crbug.com/832879.
|
||||
std::move(callback).Run(
|
||||
@@ -255,6 +257,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
@@ -277,6 +279,18 @@ bool MimeHandlerViewGuest::ShouldDestroyOnDetach() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -298,10 +298,10 @@ index 5bc11895ea38..656fa0f62114 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 a0e702bdfd0c..a389ca9b948a 100644
|
||||
index 7cdbfafb8b38..be080396eaae 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
|
||||
@@ -119,6 +119,10 @@ class MimeHandlerViewGuest
|
||||
@@ -131,6 +131,10 @@ class MimeHandlerViewGuest
|
||||
bool ZoomPropagatesFromEmbedderToGuest() const final;
|
||||
bool ShouldDestroyOnDetach() const final;
|
||||
|
||||
@ -313,11 +313,11 @@ index a0e702bdfd0c..a389ca9b948a 100644
|
||||
content::WebContents* OpenURLFromTab(
|
||||
content::WebContents* source,
|
||||
diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
index 0928bf2f44da..e9542785ec8a 100644
|
||||
index 98689e261460..c501568b6f70 100644
|
||||
--- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
+++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h
|
||||
@@ -6,9 +6,9 @@
|
||||
#define EXTENSIONS_BROWSER_GUEST_VIEW_MIME_HANDLER_VIEW_MIME_HANDLER_VIEW_GUEST_DELEGATE_H_
|
||||
@@ -8,9 +8,9 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
+#include "content/public/browser/web_contents.h"
|
||||
@ -327,7 +327,7 @@ index 0928bf2f44da..e9542785ec8a 100644
|
||||
struct ContextMenuParams;
|
||||
} // namespace content
|
||||
|
||||
@@ -20,6 +20,14 @@ class MimeHandlerViewGuestDelegate {
|
||||
@@ -22,6 +22,14 @@ class MimeHandlerViewGuestDelegate {
|
||||
MimeHandlerViewGuestDelegate() {}
|
||||
virtual ~MimeHandlerViewGuestDelegate() {}
|
||||
|
||||
|
18
patch/patches/browser_scheduler.patch
Normal file
18
patch/patches/browser_scheduler.patch
Normal file
@ -0,0 +1,18 @@
|
||||
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
|
||||
index d8739b1f3110..987472561468 100644
|
||||
--- content/browser/scheduler/browser_task_executor.cc
|
||||
+++ content/browser/scheduler/browser_task_executor.cc
|
||||
@@ -133,10 +133,11 @@ void BrowserTaskExecutor::PostFeatureListSetup() {
|
||||
|
||||
// static
|
||||
void BrowserTaskExecutor::Shutdown() {
|
||||
- if (!g_browser_task_executor)
|
||||
+ if (!g_browser_task_executor ||
|
||||
+ !g_browser_task_executor->browser_ui_thread_scheduler_) {
|
||||
return;
|
||||
+ }
|
||||
|
||||
- DCHECK(g_browser_task_executor->browser_ui_thread_scheduler_);
|
||||
// We don't delete |g_browser_task_executor| because other threads may
|
||||
// PostTask or call BrowserTaskExecutor::GetTaskRunner while we're tearing
|
||||
// things down. We don't want to add locks so we just leak instead of dealing
|
@ -1,5 +1,5 @@
|
||||
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
||||
index 4b24c762b6e9..d2fd1fc5d414 100644
|
||||
index a3f21b7ef850..882b4a38d14c 100644
|
||||
--- build/config/compiler/BUILD.gn
|
||||
+++ build/config/compiler/BUILD.gn
|
||||
@@ -157,7 +157,7 @@ declare_args() {
|
||||
@ -11,7 +11,7 @@ index 4b24c762b6e9..d2fd1fc5d414 100644
|
||||
!(current_cpu == "x86" || current_cpu == "x64"))))
|
||||
}
|
||||
|
||||
@@ -1701,8 +1701,6 @@ config("thin_archive") {
|
||||
@@ -1703,8 +1703,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,24 +1,24 @@
|
||||
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
|
||||
index 987b36217aad..832eab3ee56a 100644
|
||||
index 04aff03b621d..7e887b89a6d8 100644
|
||||
--- chrome/browser/BUILD.gn
|
||||
+++ chrome/browser/BUILD.gn
|
||||
@@ -8,6 +8,7 @@ import("//build/config/features.gni")
|
||||
import("//build/config/jumbo.gni")
|
||||
@@ -9,6 +9,7 @@ import("//build/config/jumbo.gni")
|
||||
import("//build/config/linux/gtk/gtk.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//build/split_static_library.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/feature_engagement/features.gni")
|
||||
import("//components/feed/features.gni")
|
||||
@@ -1811,6 +1812,7 @@ jumbo_split_static_library("browser") {
|
||||
"//base:i18n",
|
||||
@@ -1849,6 +1850,7 @@ jumbo_split_static_library("browser") {
|
||||
"//base/allocator:buildflags",
|
||||
"//base/util/values:values_util",
|
||||
"//cc",
|
||||
+ "//cef/libcef/features",
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2111,6 +2113,10 @@ jumbo_split_static_library("browser") {
|
||||
@@ -2154,6 +2156,10 @@ jumbo_split_static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@ -29,12 +29,3 @@ index 987b36217aad..832eab3ee56a 100644
|
||||
if (is_android) {
|
||||
sources += [
|
||||
"after_startup_task_utils_android.cc",
|
||||
@@ -3916,7 +3922,7 @@ jumbo_split_static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
- if (use_aura && !use_ozone && is_desktop_linux) {
|
||||
+ if (use_aura && !use_ozone && is_desktop_linux && use_gtk) {
|
||||
deps += [ "//chrome/browser/ui/libgtkui" ]
|
||||
}
|
||||
|
||||
|
@ -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 8d55c77443cd..a8314498c93f 100644
|
||||
index bcc5cfe3b483..7798026b7a3a 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 8d55c77443cd..a8314498c93f 100644
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -90,10 +101,16 @@ scoped_refptr<RefcountedKeyedService>
|
||||
@@ -89,10 +100,16 @@ scoped_refptr<RefcountedKeyedService>
|
||||
base::FeatureList::IsEnabled(features::kPermissionDelegation)));
|
||||
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
|
@ -1,10 +1,10 @@
|
||||
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
|
||||
index cac72c6a2fd1..2ed83a4af1b3 100644
|
||||
index 761d300aa06b..f86558dd6efc 100644
|
||||
--- chrome/browser/browser_process.h
|
||||
+++ chrome/browser/browser_process.h
|
||||
@@ -39,6 +39,10 @@ class SystemNetworkContextManager;
|
||||
class WatchDogThread;
|
||||
@@ -40,6 +40,10 @@ class WatchDogThread;
|
||||
class WebRtcLogUploader;
|
||||
class StartupData;
|
||||
|
||||
+namespace net_log {
|
||||
+class NetExportFileWriter;
|
||||
@ -13,7 +13,7 @@ index cac72c6a2fd1..2ed83a4af1b3 100644
|
||||
namespace network {
|
||||
class NetworkQualityTracker;
|
||||
class SharedURLLoaderFactory;
|
||||
@@ -183,6 +187,9 @@ class BrowserProcess {
|
||||
@@ -184,6 +188,9 @@ class BrowserProcess {
|
||||
// backed by the IOThread's URLRequestContext.
|
||||
virtual SystemNetworkContextManager* system_network_context_manager() = 0;
|
||||
|
||||
@ -24,10 +24,10 @@ index cac72c6a2fd1..2ed83a4af1b3 100644
|
||||
// network quality change events.
|
||||
virtual network::NetworkQualityTracker* network_quality_tracker() = 0;
|
||||
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
|
||||
index 0b15890653cb..175eb09c6dc7 100644
|
||||
index c2e0b9172eb2..57c22ff16f4b 100644
|
||||
--- chrome/browser/browser_process_impl.cc
|
||||
+++ chrome/browser/browser_process_impl.cc
|
||||
@@ -681,6 +681,10 @@ BrowserProcessImpl::system_network_context_manager() {
|
||||
@@ -683,6 +683,10 @@ BrowserProcessImpl::system_network_context_manager() {
|
||||
return SystemNetworkContextManager::GetInstance();
|
||||
}
|
||||
|
||||
@ -39,10 +39,10 @@ index 0b15890653cb..175eb09c6dc7 100644
|
||||
BrowserProcessImpl::shared_url_loader_factory() {
|
||||
return system_network_context_manager()->GetSharedURLLoaderFactory();
|
||||
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
|
||||
index 6c8e21f6f5fe..4496c5579265 100644
|
||||
index 95a7bd8e8b58..af7685f86848 100644
|
||||
--- chrome/browser/browser_process_impl.h
|
||||
+++ chrome/browser/browser_process_impl.h
|
||||
@@ -141,6 +141,7 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
@@ -142,6 +142,7 @@ class BrowserProcessImpl : public BrowserProcess,
|
||||
// TODO(qinmin): Remove this method as callers can retrieve the global
|
||||
// instance from SystemNetworkContextManager directly.
|
||||
SystemNetworkContextManager* system_network_context_manager() override;
|
||||
@ -51,18 +51,18 @@ index 6c8e21f6f5fe..4496c5579265 100644
|
||||
override;
|
||||
network::NetworkQualityTracker* network_quality_tracker() override;
|
||||
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
|
||||
index 535c4f04c0f3..8cd8768022ae 100644
|
||||
index 6bd5bea7ddb0..076306275b5b 100644
|
||||
--- chrome/browser/ui/BUILD.gn
|
||||
+++ chrome/browser/ui/BUILD.gn
|
||||
@@ -9,6 +9,7 @@ import("//build/config/features.gni")
|
||||
import("//build/config/jumbo.gni")
|
||||
@@ -10,6 +10,7 @@ import("//build/config/jumbo.gni")
|
||||
import("//build/config/linux/gtk/gtk.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//build/split_static_library.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/common/features.gni")
|
||||
import("//chromeos/assistant/assistant.gni")
|
||||
import("//components/feature_engagement/features.gni")
|
||||
@@ -351,6 +352,10 @@ jumbo_split_static_library("ui") {
|
||||
@@ -357,6 +358,10 @@ jumbo_split_static_library("ui") {
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
]
|
||||
|
||||
@ -73,7 +73,7 @@ index 535c4f04c0f3..8cd8768022ae 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
|
||||
@@ -368,6 +373,7 @@ jumbo_split_static_library("ui") {
|
||||
@@ -374,6 +379,7 @@ jumbo_split_static_library("ui") {
|
||||
"//base:i18n",
|
||||
"//base/allocator:buildflags",
|
||||
"//cc/paint",
|
||||
@ -81,17 +81,8 @@ index 535c4f04c0f3..8cd8768022ae 100644
|
||||
"//chrome:extra_resources",
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
@@ -2347,7 +2353,7 @@ jumbo_split_static_library("ui") {
|
||||
"views/frame/native_browser_frame_factory_ozone.cc",
|
||||
]
|
||||
} else {
|
||||
- if (use_aura) {
|
||||
+ if (use_aura && use_gtk) {
|
||||
# This is the only component that can interact with gtk.
|
||||
deps += [ "//chrome/browser/ui/libgtkui" ]
|
||||
}
|
||||
diff --git chrome/browser/ui/webui/net_export_ui.cc chrome/browser/ui/webui/net_export_ui.cc
|
||||
index 6357cea3ca36..9ac953d5a885 100644
|
||||
index 1b9b3d857f47..84b875f0e01d 100644
|
||||
--- chrome/browser/ui/webui/net_export_ui.cc
|
||||
+++ chrome/browser/ui/webui/net_export_ui.cc
|
||||
@@ -20,14 +20,13 @@
|
||||
@ -125,7 +116,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
|
||||
#if defined(OS_ANDROID)
|
||||
#include "chrome/browser/android/intent_helper.h"
|
||||
@@ -69,6 +75,7 @@ content::WebUIDataSource* CreateNetExportHTMLSource() {
|
||||
@@ -68,6 +74,7 @@ content::WebUIDataSource* CreateNetExportHTMLSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
@ -133,7 +124,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
void SetIfNotNull(base::DictionaryValue* dict,
|
||||
const base::StringPiece& path,
|
||||
std::unique_ptr<base::Value> in_value) {
|
||||
@@ -76,6 +83,7 @@ void SetIfNotNull(base::DictionaryValue* dict,
|
||||
@@ -75,6 +82,7 @@ void SetIfNotNull(base::DictionaryValue* dict,
|
||||
dict->Set(path, std::move(in_value));
|
||||
}
|
||||
}
|
||||
@ -141,7 +132,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
|
||||
// This class receives javascript messages from the renderer.
|
||||
// Note that the WebUI infrastructure runs on the UI thread, therefore all of
|
||||
@@ -83,7 +91,9 @@ void SetIfNotNull(base::DictionaryValue* dict,
|
||||
@@ -82,7 +90,9 @@ void SetIfNotNull(base::DictionaryValue* dict,
|
||||
class NetExportMessageHandler
|
||||
: public WebUIMessageHandler,
|
||||
public base::SupportsWeakPtr<NetExportMessageHandler>,
|
||||
@ -151,7 +142,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
public net_log::NetExportFileWriter::StateObserver {
|
||||
public:
|
||||
NetExportMessageHandler();
|
||||
@@ -99,11 +109,13 @@ class NetExportMessageHandler
|
||||
@@ -98,11 +108,13 @@ class NetExportMessageHandler
|
||||
void OnSendNetLog(const base::ListValue* list);
|
||||
void OnShowFile(const base::ListValue* list);
|
||||
|
||||
@ -165,7 +156,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
|
||||
// net_log::NetExportFileWriter::StateObserver implementation.
|
||||
void OnNewState(const base::DictionaryValue& state) override;
|
||||
@@ -133,9 +145,16 @@ class NetExportMessageHandler
|
||||
@@ -132,9 +144,16 @@ class NetExportMessageHandler
|
||||
// renderer.
|
||||
void NotifyUIWithState(std::unique_ptr<base::DictionaryValue> state);
|
||||
|
||||
@ -182,7 +173,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
|
||||
// Cached pointer to SystemNetworkContextManager's NetExportFileWriter.
|
||||
net_log::NetExportFileWriter* file_writer_;
|
||||
@@ -151,7 +170,9 @@ class NetExportMessageHandler
|
||||
@@ -150,7 +169,9 @@ class NetExportMessageHandler
|
||||
net::NetLogCaptureMode capture_mode_;
|
||||
uint64_t max_log_file_size_;
|
||||
|
||||
@ -192,7 +183,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
|
||||
base::WeakPtrFactory<NetExportMessageHandler> weak_ptr_factory_;
|
||||
|
||||
@@ -159,8 +180,7 @@ class NetExportMessageHandler
|
||||
@@ -158,8 +179,7 @@ class NetExportMessageHandler
|
||||
};
|
||||
|
||||
NetExportMessageHandler::NetExportMessageHandler()
|
||||
@ -202,7 +193,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
state_observer_manager_(this),
|
||||
weak_ptr_factory_(this) {
|
||||
file_writer_->Initialize();
|
||||
@@ -169,8 +189,10 @@ NetExportMessageHandler::NetExportMessageHandler()
|
||||
@@ -168,8 +188,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.
|
||||
@ -213,7 +204,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
|
||||
file_writer_->StopNetLog(nullptr);
|
||||
}
|
||||
@@ -233,6 +255,7 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
@@ -232,6 +254,7 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
if (UsingMobileUI()) {
|
||||
StartNetLog(base::FilePath());
|
||||
} else {
|
||||
@ -221,7 +212,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
base::FilePath initial_dir = last_save_dir.Pointer()->empty() ?
|
||||
DownloadPrefs::FromBrowserContext(
|
||||
web_ui()->GetWebContents()->GetBrowserContext())->DownloadPath() :
|
||||
@@ -240,6 +263,9 @@ void NetExportMessageHandler::OnStartNetLog(const base::ListValue* list) {
|
||||
@@ -239,6 +262,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);
|
||||
@ -231,7 +222,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +275,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
@@ -248,6 +274,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
std::unique_ptr<base::DictionaryValue> ui_thread_polled_data(
|
||||
new base::DictionaryValue());
|
||||
|
||||
@ -239,7 +230,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
Profile* profile = Profile::FromWebUI(web_ui());
|
||||
SetIfNotNull(ui_thread_polled_data.get(), "prerenderInfo",
|
||||
chrome_browser_net::GetPrerenderInfo(profile));
|
||||
@@ -258,6 +285,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
@@ -257,6 +284,7 @@ void NetExportMessageHandler::OnStopNetLog(const base::ListValue* list) {
|
||||
SetIfNotNull(ui_thread_polled_data.get(), "serviceProviders",
|
||||
chrome_browser_net::GetWindowsServiceProviders());
|
||||
#endif
|
||||
@ -247,7 +238,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
|
||||
file_writer_->StopNetLog(std::move(ui_thread_polled_data));
|
||||
}
|
||||
@@ -274,6 +302,7 @@ void NetExportMessageHandler::OnShowFile(const base::ListValue* list) {
|
||||
@@ -273,6 +301,7 @@ void NetExportMessageHandler::OnShowFile(const base::ListValue* list) {
|
||||
base::Bind(&NetExportMessageHandler::ShowFileInShell, AsWeakPtr()));
|
||||
}
|
||||
|
||||
@ -255,7 +246,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
void NetExportMessageHandler::FileSelected(const base::FilePath& path,
|
||||
int index,
|
||||
void* params) {
|
||||
@@ -292,6 +321,7 @@ void NetExportMessageHandler::FileSelectionCanceled(void* params) {
|
||||
@@ -291,6 +320,7 @@ void NetExportMessageHandler::FileSelectionCanceled(void* params) {
|
||||
DCHECK(select_file_dialog_);
|
||||
select_file_dialog_ = nullptr;
|
||||
}
|
||||
@ -263,7 +254,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
|
||||
void NetExportMessageHandler::OnNewState(const base::DictionaryValue& state) {
|
||||
NotifyUIWithState(state.CreateDeepCopy());
|
||||
@@ -356,6 +386,7 @@ void NetExportMessageHandler::NotifyUIWithState(
|
||||
@@ -355,6 +385,7 @@ void NetExportMessageHandler::NotifyUIWithState(
|
||||
*state);
|
||||
}
|
||||
|
||||
@ -271,7 +262,7 @@ index 6357cea3ca36..9ac953d5a885 100644
|
||||
void NetExportMessageHandler::ShowSelectFileDialog(
|
||||
const base::FilePath& default_path) {
|
||||
// User may have clicked more than once before the save dialog appears.
|
||||
@@ -374,6 +405,43 @@ void NetExportMessageHandler::ShowSelectFileDialog(
|
||||
@@ -373,6 +404,43 @@ void NetExportMessageHandler::ShowSelectFileDialog(
|
||||
ui::SelectFileDialog::SELECT_SAVEAS_FILE, base::string16(), default_path,
|
||||
&file_type_info, 0, base::FilePath::StringType(), owning_window, nullptr);
|
||||
}
|
||||
|
@ -1,31 +1,38 @@
|
||||
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
|
||||
index cf4250c7ba26..b8a05db7cced 100644
|
||||
index b5c53b099bb2..56aa2e75b114 100644
|
||||
--- chrome/browser/chrome_content_browser_client.cc
|
||||
+++ chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -1049,12 +1049,16 @@ void LaunchURL(
|
||||
@@ -1079,10 +1079,6 @@ void LaunchURL(
|
||||
}
|
||||
}
|
||||
|
||||
+} // namespace
|
||||
+
|
||||
std::string GetProduct() {
|
||||
-std::string GetProduct() {
|
||||
- return version_info::GetProductNameAndVersionForUserAgent();
|
||||
-}
|
||||
-
|
||||
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) {
|
||||
|
||||
} // namespace
|
||||
|
||||
+std::string GetProduct() {
|
||||
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
+ if (command_line->HasSwitch(switches::kProductVersion))
|
||||
+ return command_line->GetSwitchValueASCII(switches::kProductVersion);
|
||||
+
|
||||
return version_info::GetProductNameAndVersionForUserAgent();
|
||||
}
|
||||
|
||||
-} // namespace
|
||||
-
|
||||
+ return version_info::GetProductNameAndVersionForUserAgent();
|
||||
+}
|
||||
+
|
||||
std::string GetUserAgent() {
|
||||
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 07e0e051ff1d..41337a1719a1 100644
|
||||
index 499af0b670a1..dc6247946b8a 100644
|
||||
--- chrome/browser/chrome_content_browser_client.h
|
||||
+++ chrome/browser/chrome_content_browser_client.h
|
||||
@@ -77,7 +77,8 @@ class Origin;
|
||||
@@ -79,7 +79,8 @@ class Origin;
|
||||
|
||||
class ChromeSerialDelegate;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
|
||||
index 376d23b7ca93..87b6418e8782 100644
|
||||
index 4cce9ca9fbf1..b1d578c0f8c2 100644
|
||||
--- chrome/browser/profiles/profile_manager.cc
|
||||
+++ chrome/browser/profiles/profile_manager.cc
|
||||
@@ -385,7 +385,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
@@ -388,7 +388,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
|
||||
chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED,
|
||||
content::NotificationService::AllSources());
|
||||
|
||||
@ -12,7 +12,7 @@ index 376d23b7ca93..87b6418e8782 100644
|
||||
}
|
||||
|
||||
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
|
||||
index 49a5dc4bca1e..a256899483d3 100644
|
||||
index 257e27caed9f..4d0c4fe116c6 100644
|
||||
--- chrome/browser/profiles/profile_manager.h
|
||||
+++ chrome/browser/profiles/profile_manager.h
|
||||
@@ -92,7 +92,7 @@ class ProfileManager : public content::NotificationObserver,
|
||||
|
@ -182,10 +182,10 @@ index 01ea0ba7f0cb..2828896bbcad 100644
|
||||
}
|
||||
|
||||
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
|
||||
index 202376e2548e..15a7bd34cf48 100644
|
||||
index 4f04b84e4899..e4f6ee474393 100644
|
||||
--- chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -758,6 +758,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -775,6 +775,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
|
||||
status == chrome::mojom::PluginStatus::kBlocked) &&
|
||||
@ -193,7 +193,7 @@ index 202376e2548e..15a7bd34cf48 100644
|
||||
observer->IsPluginTemporarilyAllowed(identifier)) {
|
||||
status = chrome::mojom::PluginStatus::kAllowed;
|
||||
}
|
||||
@@ -942,7 +943,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -967,7 +968,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
|
||||
&plugin_auth_host);
|
||||
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
|
||||
@ -203,7 +203,7 @@ index 202376e2548e..15a7bd34cf48 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlocked: {
|
||||
@@ -951,7 +953,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -976,7 +978,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
|
||||
placeholder->AllowLoading();
|
||||
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
|
||||
@ -213,7 +213,7 @@ index 202376e2548e..15a7bd34cf48 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
|
||||
@@ -961,7 +964,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -986,7 +989,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
group_name));
|
||||
RenderThread::Get()->RecordAction(
|
||||
UserMetricsAction("Plugin_BlockedByPolicy"));
|
||||
@ -223,7 +223,7 @@ index 202376e2548e..15a7bd34cf48 100644
|
||||
break;
|
||||
}
|
||||
case chrome::mojom::PluginStatus::kBlockedNoLoading: {
|
||||
@@ -969,7 +973,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
@@ -994,7 +998,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
IDR_BLOCKED_PLUGIN_HTML,
|
||||
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING,
|
||||
group_name));
|
||||
|
16
patch/patches/chrome_pref_watcher.patch
Normal file
16
patch/patches/chrome_pref_watcher.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git chrome/browser/ui/prefs/pref_watcher.h chrome/browser/ui/prefs/pref_watcher.h
|
||||
index b5ccdc521a36..716117c141cc 100644
|
||||
--- chrome/browser/ui/prefs/pref_watcher.h
|
||||
+++ chrome/browser/ui/prefs/pref_watcher.h
|
||||
@@ -29,10 +29,10 @@ class PrefWatcher : public KeyedService {
|
||||
void RegisterRendererPreferenceWatcher(
|
||||
blink::mojom::RendererPreferenceWatcherPtr watcher);
|
||||
|
||||
- private:
|
||||
// KeyedService overrides:
|
||||
void Shutdown() override;
|
||||
|
||||
+ 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 44798c35c1e7..88a7639a96d9 100644
|
||||
index e5f98be28775..a1d2697affc8 100644
|
||||
--- chrome/renderer/BUILD.gn
|
||||
+++ chrome/renderer/BUILD.gn
|
||||
@@ -4,6 +4,7 @@
|
||||
@ -10,7 +10,7 @@ index 44798c35c1e7..88a7639a96d9 100644
|
||||
import("//chrome/common/features.gni")
|
||||
import("//components/nacl/features.gni")
|
||||
import("//components/offline_pages/buildflags/features.gni")
|
||||
@@ -121,6 +122,7 @@ jumbo_static_library("renderer") {
|
||||
@@ -127,6 +128,7 @@ jumbo_static_library("renderer") {
|
||||
defines = []
|
||||
|
||||
deps = [
|
||||
@ -18,7 +18,7 @@ index 44798c35c1e7..88a7639a96d9 100644
|
||||
"//chrome:resources",
|
||||
"//chrome:strings",
|
||||
"//chrome/common",
|
||||
@@ -187,6 +189,10 @@ jumbo_static_library("renderer") {
|
||||
@@ -193,6 +195,10 @@ jumbo_static_library("renderer") {
|
||||
|
||||
configs += [ "//build/config/compiler:wexit_time_destructors" ]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git chrome/common/chrome_content_client.cc chrome/common/chrome_content_client.cc
|
||||
index 406683776819..d8bf3372dd60 100644
|
||||
index 1db1b55b6da0..41187edcf3e1 100644
|
||||
--- chrome/common/chrome_content_client.cc
|
||||
+++ chrome/common/chrome_content_client.cc
|
||||
@@ -97,7 +97,8 @@
|
||||
|
@ -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 605e388043ac..4566dd95f0b8 100644
|
||||
index 0ef3544d94bd..b27ea95697fb 100644
|
||||
--- content/browser/devtools/devtools_instrumentation.h
|
||||
+++ content/browser/devtools/devtools_instrumentation.h
|
||||
@@ -12,6 +12,7 @@
|
||||
@ -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 c62ad20e5ef9..6e43db6a2fda 100644
|
||||
index 1abc6a3a8e11..e885e78c4d54 100644
|
||||
--- third_party/blink/renderer/controller/BUILD.gn
|
||||
+++ third_party/blink/renderer/controller/BUILD.gn
|
||||
@@ -26,6 +26,7 @@ jumbo_component("controller") {
|
||||
|
@ -1,15 +0,0 @@
|
||||
diff --git cc/scheduler/compositor_frame_reporting_controller.cc cc/scheduler/compositor_frame_reporting_controller.cc
|
||||
index f1587ed158d4..1b17021fd229 100644
|
||||
--- cc/scheduler/compositor_frame_reporting_controller.cc
|
||||
+++ cc/scheduler/compositor_frame_reporting_controller.cc
|
||||
@@ -31,8 +31,8 @@ void CompositorFrameReportingController::WillBeginImplFrame() {
|
||||
|
||||
void CompositorFrameReportingController::WillBeginMainFrame() {
|
||||
DCHECK(reporters_[PipelineStage::kBeginImplFrame]);
|
||||
- DCHECK_NE(reporters_[PipelineStage::kBeginMainFrame],
|
||||
- reporters_[PipelineStage::kBeginImplFrame]);
|
||||
+ DCHECK(reporters_[PipelineStage::kBeginMainFrame] !=
|
||||
+ reporters_[PipelineStage::kBeginImplFrame]);
|
||||
reporters_[PipelineStage::kBeginImplFrame]->StartStage(
|
||||
"SendBeginMainFrameToCommit");
|
||||
AdvanceReporterStage(PipelineStage::kBeginImplFrame,
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc
|
||||
index 010f9511741c..a777f2d7a106 100644
|
||||
index 3947d9d92ab4..00b5b3edf84a 100644
|
||||
--- chrome/browser/download/download_target_determiner.cc
|
||||
+++ chrome/browser/download/download_target_determiner.cc
|
||||
@@ -602,8 +602,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
|
||||
@@ -634,8 +634,8 @@ void IsHandledBySafePlugin(content::ResourceContext* resource_context,
|
||||
content::PluginService* plugin_service =
|
||||
content::PluginService::GetInstance();
|
||||
bool plugin_found = plugin_service->GetPluginInfo(
|
||||
@ -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 be77d0e074e9..949873b9bb22 100644
|
||||
index 39f6dcaf9fce..faf7bd250c3c 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 be77d0e074e9..949873b9bb22 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
|
||||
index 94892dd57d36..1d4036fdedf8 100644
|
||||
index 30b2a43959da..7dbe5aad8bd2 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 94892dd57d36..1d4036fdedf8 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 5cadc6afb658..f30c0b60285b 100644
|
||||
index 3bdd59c38012..9df67bd208b9 100644
|
||||
--- content/browser/frame_host/render_frame_message_filter.cc
|
||||
+++ content/browser/frame_host/render_frame_message_filter.cc
|
||||
@@ -705,6 +705,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
|
||||
@@ -809,6 +809,7 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
|
||||
void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
int render_frame_id,
|
||||
const GURL& url,
|
||||
@ -90,7 +90,7 @@ index 5cadc6afb658..f30c0b60285b 100644
|
||||
const url::Origin& main_frame_origin,
|
||||
const std::string& mime_type,
|
||||
bool* found,
|
||||
@@ -716,8 +717,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
@@ -820,8 +821,8 @@ void RenderFrameMessageFilter::OnGetPluginInfo(
|
||||
bool allow_wildcard = true;
|
||||
*found = plugin_service_->GetPluginInfo(
|
||||
render_process_id_, render_frame_id, resource_context_, url,
|
||||
@ -129,12 +129,12 @@ 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 0010982ecf26..b32f3b14e0c0 100644
|
||||
index 052c66044997..9501b0c242cb 100644
|
||||
--- content/browser/loader/navigation_url_loader_impl.cc
|
||||
+++ content/browser/loader/navigation_url_loader_impl.cc
|
||||
@@ -896,6 +896,12 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
|
||||
resource_request_->has_user_gesture, resource_request_->method,
|
||||
resource_request_->headers, &proxied_factory_request_,
|
||||
@@ -905,6 +905,12 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
|
||||
static_cast<ui::PageTransition>(resource_request_->transition_type),
|
||||
resource_request_->has_user_gesture, &proxied_factory_request_,
|
||||
external_protocol_factory);
|
||||
+ if (!handled) {
|
||||
+ handled = GetContentClient()->browser()->HandleExternalProtocol(
|
||||
@ -145,7 +145,7 @@ index 0010982ecf26..b32f3b14e0c0 100644
|
||||
|
||||
if (external_protocol_factory) {
|
||||
factory =
|
||||
@@ -1137,7 +1143,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController
|
||||
@@ -1146,7 +1152,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_,
|
||||
@ -189,7 +189,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 427e1cb8946c..2f00734e9dfc 100644
|
||||
index 8dd463f4165f..e0d0e951ec8b 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) {
|
||||
@ -214,7 +214,7 @@ index 427e1cb8946c..2f00734e9dfc 100644
|
||||
GetPluginsCallback callback,
|
||||
const std::vector<WebPluginInfo>& all_plugins) {
|
||||
@@ -61,7 +63,7 @@ void PluginRegistryImpl::GetPluginsComplete(
|
||||
GetContentClient()->browser()->GetMimeHandlerViewMimeTypes(
|
||||
GetContentClient()->browser()->GetPluginMimeTypesWithExternalHandlers(
|
||||
resource_context_);
|
||||
|
||||
- const int child_process_id = -1;
|
||||
@ -262,10 +262,10 @@ index 3009401dac6b..b4c5a9e2db50 100644
|
||||
};
|
||||
|
||||
diff --git content/common/frame_messages.h content/common/frame_messages.h
|
||||
index 8673d65844ea..7d13c72dca9b 100644
|
||||
index c81c9fb4251c..3f266302f4e0 100644
|
||||
--- content/common/frame_messages.h
|
||||
+++ content/common/frame_messages.h
|
||||
@@ -1286,9 +1286,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback,
|
||||
@@ -1266,9 +1266,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,10 +278,10 @@ index 8673d65844ea..7d13c72dca9b 100644
|
||||
std::string /* mime_type */,
|
||||
bool /* found */,
|
||||
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
|
||||
index 0a1bf5d0b4d1..6dea4f0f4a44 100644
|
||||
index 1a16897afa44..12439a93b151 100644
|
||||
--- content/public/browser/content_browser_client.h
|
||||
+++ content/public/browser/content_browser_client.h
|
||||
@@ -1460,6 +1460,15 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1437,6 +1437,15 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
network::mojom::URLLoaderFactoryRequest* factory_request,
|
||||
network::mojom::URLLoaderFactory*& out_factory);
|
||||
|
||||
@ -297,7 +297,7 @@ index 0a1bf5d0b4d1..6dea4f0f4a44 100644
|
||||
// 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.
|
||||
@@ -1527,6 +1536,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1504,6 +1513,10 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// Used as part of the user agent string.
|
||||
virtual std::string GetProduct() const;
|
||||
|
||||
@ -333,10 +333,10 @@ index 3b610b1f554e..7c439e060779 100644
|
||||
WebPluginInfo* plugin) = 0;
|
||||
|
||||
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
|
||||
index fad5f104f011..fd7ecbcd48b8 100644
|
||||
index 31fcd7d89bf8..9421e8a5db77 100644
|
||||
--- content/public/renderer/content_renderer_client.h
|
||||
+++ content/public/renderer/content_renderer_client.h
|
||||
@@ -73,6 +73,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -74,6 +74,9 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// Notifies us that the RenderThread has been created.
|
||||
virtual void RenderThreadStarted() {}
|
||||
|
||||
@ -346,7 +346,7 @@ index fad5f104f011..fd7ecbcd48b8 100644
|
||||
// Notifies that a new RenderFrame has been created.
|
||||
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
|
||||
|
||||
@@ -332,6 +335,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -333,6 +336,10 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
// This method may invalidate the frame.
|
||||
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
|
||||
|
||||
@ -358,24 +358,24 @@ index fad5f104f011..fd7ecbcd48b8 100644
|
||||
// started.
|
||||
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
|
||||
diff --git content/public/renderer/render_frame_observer.h content/public/renderer/render_frame_observer.h
|
||||
index 8935697155f5..179b6ebf1360 100644
|
||||
index 14f7e7a34e2b..573bd466effe 100644
|
||||
--- content/public/renderer/render_frame_observer.h
|
||||
+++ content/public/renderer/render_frame_observer.h
|
||||
@@ -202,6 +202,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -201,6 +201,9 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
virtual void DidReceiveTransferSizeUpdate(int resource_id,
|
||||
int received_data_length) {}
|
||||
|
||||
+ // Called when this frame gains focus.
|
||||
+ virtual void FrameFocused() {}
|
||||
+
|
||||
// Called when the focused node has changed to |node|.
|
||||
virtual void FocusedNodeChanged(const blink::WebNode& node) {}
|
||||
// Called when the focused element has changed to |element|.
|
||||
virtual void FocusedElementChanged(const blink::WebElement& element) {}
|
||||
|
||||
diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc
|
||||
index c75b6177f066..860bbe9e1c14 100644
|
||||
index 2ab1163b56da..329e435a479d 100644
|
||||
--- content/renderer/render_frame_impl.cc
|
||||
+++ content/renderer/render_frame_impl.cc
|
||||
@@ -3996,7 +3996,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
@@ -4031,7 +4031,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin(
|
||||
std::string mime_type;
|
||||
bool found = false;
|
||||
Send(new FrameHostMsg_GetPluginInfo(
|
||||
@ -385,7 +385,7 @@ index c75b6177f066..860bbe9e1c14 100644
|
||||
params.mime_type.Utf8(), &found, &info, &mime_type));
|
||||
if (!found)
|
||||
return nullptr;
|
||||
@@ -4422,6 +4423,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
@@ -4464,6 +4465,8 @@ void RenderFrameImpl::FrameDetached(DetachType type) {
|
||||
|
||||
void RenderFrameImpl::FrameFocused() {
|
||||
Send(new FrameHostMsg_FrameFocused(routing_id_));
|
||||
@ -395,23 +395,23 @@ index c75b6177f066..860bbe9e1c14 100644
|
||||
|
||||
void RenderFrameImpl::DidChangeName(const blink::WebString& name) {
|
||||
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
|
||||
index e47b89dbbe1c..8cd96c860595 100644
|
||||
index a908f83034f5..6a61c2ec8e63 100644
|
||||
--- content/renderer/render_thread_impl.cc
|
||||
+++ content/renderer/render_thread_impl.cc
|
||||
@@ -806,6 +806,8 @@ void RenderThreadImpl::Init() {
|
||||
@@ -796,6 +796,8 @@ void RenderThreadImpl::Init() {
|
||||
|
||||
StartServiceManagerConnection();
|
||||
|
||||
+ GetContentClient()->renderer()->RenderThreadConnected();
|
||||
+
|
||||
GetAssociatedInterfaceRegistry()->AddInterface(
|
||||
base::Bind(&RenderThreadImpl::OnRendererInterfaceRequest,
|
||||
base::Unretained(this)));
|
||||
GetAssociatedInterfaceRegistry()->AddInterface(base::BindRepeating(
|
||||
&RenderThreadImpl::OnRendererInterfaceRequest, base::Unretained(this)));
|
||||
|
||||
diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc
|
||||
index 30273211857b..8d4a7295d62c 100644
|
||||
index 32f5e253cee8..aaa73a259771 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -1113,6 +1113,14 @@ void RendererBlinkPlatformImpl::RecordMetricsForBackgroundedRendererPurge() {
|
||||
@@ -1069,6 +1069,14 @@ void RendererBlinkPlatformImpl::RecordMetricsForBackgroundedRendererPurge() {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -427,12 +427,12 @@ index 30273211857b..8d4a7295d62c 100644
|
||||
if (!web_database_host_) {
|
||||
web_database_host_ = blink::mojom::ThreadSafeWebDatabaseHostPtr::Create(
|
||||
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
|
||||
index 629362d2f990..9db27c88d9e5 100644
|
||||
index ba77a976729d..8c4153718c0b 100644
|
||||
--- content/renderer/renderer_blink_platform_impl.h
|
||||
+++ content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -241,6 +241,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
std::unique_ptr<blink::WebDataConsumerHandle> CreateDataConsumerHandle(
|
||||
mojo::ScopedDataPipeConsumerHandle handle) override;
|
||||
@@ -226,6 +226,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
std::unique_ptr<blink::WebURLLoaderFactory> WrapSharedURLLoaderFactory(
|
||||
scoped_refptr<network::SharedURLLoaderFactory> factory) override;
|
||||
|
||||
+ void DevToolsAgentAttached() override;
|
||||
+ void DevToolsAgentDetached() override;
|
||||
|
@ -1,3 +1,85 @@
|
||||
diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn
|
||||
index 9c59c4b5e7a6..e470635e88d2 100644
|
||||
--- chrome/chrome_elf/BUILD.gn
|
||||
+++ chrome/chrome_elf/BUILD.gn
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/win/manifest.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/process_version_rc_template.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -132,9 +133,6 @@ source_set("constants") {
|
||||
|
||||
static_library("crash") {
|
||||
sources = [
|
||||
- "../app/chrome_crash_reporter_client_win.cc",
|
||||
- "../app/chrome_crash_reporter_client_win.h",
|
||||
- "../common/chrome_result_codes.h",
|
||||
"crash/crash_helper.cc",
|
||||
"crash/crash_helper.h",
|
||||
]
|
||||
@@ -142,6 +140,7 @@ static_library("crash") {
|
||||
":hook_util",
|
||||
"//base", # This needs to go. DEP of app, crash_keys, client.
|
||||
"//base:base_static", # pe_image
|
||||
+ "//cef/libcef/features",
|
||||
"//chrome/install_static:install_static_util",
|
||||
"//components/crash/content/app",
|
||||
"//components/crash/core/common", # crash_keys
|
||||
@@ -149,6 +148,17 @@ static_library("crash") {
|
||||
"//content/public/common:result_codes",
|
||||
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
|
||||
]
|
||||
+
|
||||
+ if (enable_cef) {
|
||||
+ deps += [ "//cef:chrome_elf_set" ]
|
||||
+ include_dirs = [ "//cef" ]
|
||||
+ } else {
|
||||
+ sources += [
|
||||
+ "//chrome/app/chrome_crash_reporter_client_win.cc",
|
||||
+ "//chrome/app/chrome_crash_reporter_client_win.h",
|
||||
+ "//chrome/common/chrome_result_codes.h",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
|
||||
source_set("dll_hash") {
|
||||
diff --git chrome/chrome_elf/crash/crash_helper.cc chrome/chrome_elf/crash/crash_helper.cc
|
||||
index 381322aca895..a5622ddfe66d 100644
|
||||
--- chrome/chrome_elf/crash/crash_helper.cc
|
||||
+++ chrome/chrome_elf/crash/crash_helper.cc
|
||||
@@ -11,12 +11,17 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/app/chrome_crash_reporter_client_win.h"
|
||||
#include "chrome/chrome_elf/hook_util/hook_util.h"
|
||||
#include "components/crash/content/app/crashpad.h"
|
||||
#include "components/crash/core/common/crash_keys.h"
|
||||
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/libcef/common/crash_reporter_client.h"
|
||||
+#endif
|
||||
+
|
||||
namespace {
|
||||
|
||||
// Crash handling from elf is only enabled for the chrome.exe process.
|
||||
@@ -74,7 +79,11 @@ bool InitializeCrashReporting() {
|
||||
g_crash_reports = new std::vector<crash_reporter::Report>;
|
||||
g_set_unhandled_exception_filter = new elf_hook::IATHook();
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ CefCrashReporterClient::InitializeCrashReportingForProcess();
|
||||
+#else
|
||||
ChromeCrashReporterClient::InitializeCrashReportingForProcess();
|
||||
+#endif
|
||||
|
||||
g_crash_helper_enabled = true;
|
||||
return true;
|
||||
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
|
||||
index e0a839813a07..5c0d05bcc78c 100644
|
||||
--- chrome/common/crash_keys.cc
|
||||
@ -44,90 +126,8 @@ index bcf172e645a2..f879aa745adf 100644
|
||||
// Sets the kNumSwitches key and the set of keys named using kSwitchFormat based
|
||||
// on the given |command_line|.
|
||||
void SetCrashKeysFromCommandLine(const base::CommandLine& command_line);
|
||||
diff --git chrome_elf/BUILD.gn chrome_elf/BUILD.gn
|
||||
index 7643f2793a0a..5da3775ac932 100644
|
||||
--- chrome_elf/BUILD.gn
|
||||
+++ chrome_elf/BUILD.gn
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/win/manifest.gni")
|
||||
+import("//cef/libcef/features/features.gni")
|
||||
import("//chrome/process_version_rc_template.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
@@ -126,9 +127,6 @@ source_set("constants") {
|
||||
|
||||
static_library("crash") {
|
||||
sources = [
|
||||
- "../chrome/app/chrome_crash_reporter_client_win.cc",
|
||||
- "../chrome/app/chrome_crash_reporter_client_win.h",
|
||||
- "../chrome/common/chrome_result_codes.h",
|
||||
"crash/crash_helper.cc",
|
||||
"crash/crash_helper.h",
|
||||
]
|
||||
@@ -136,6 +134,7 @@ static_library("crash") {
|
||||
":hook_util",
|
||||
"//base", # This needs to go. DEP of app, crash_keys, client.
|
||||
"//base:base_static", # pe_image
|
||||
+ "//cef/libcef/features",
|
||||
"//chrome/install_static:install_static_util",
|
||||
"//components/crash/content/app",
|
||||
"//components/crash/core/common", # crash_keys
|
||||
@@ -143,6 +142,17 @@ static_library("crash") {
|
||||
"//content/public/common:result_codes",
|
||||
"//third_party/crashpad/crashpad/client", # DumpWithoutCrash
|
||||
]
|
||||
+
|
||||
+ if (enable_cef) {
|
||||
+ deps += [ "//cef:chrome_elf_set" ]
|
||||
+ include_dirs = [ "//cef" ]
|
||||
+ } else {
|
||||
+ sources += [
|
||||
+ "//chrome/app/chrome_crash_reporter_client_win.cc",
|
||||
+ "//chrome/app/chrome_crash_reporter_client_win.h",
|
||||
+ "//chrome/common/chrome_result_codes.h",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
|
||||
source_set("dll_hash") {
|
||||
diff --git chrome_elf/crash/crash_helper.cc chrome_elf/crash/crash_helper.cc
|
||||
index fdc51ab22807..cb0a99dd190c 100644
|
||||
--- chrome_elf/crash/crash_helper.cc
|
||||
+++ chrome_elf/crash/crash_helper.cc
|
||||
@@ -11,12 +11,17 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
+#include "cef/libcef/features/features.h"
|
||||
#include "chrome/app/chrome_crash_reporter_client_win.h"
|
||||
#include "chrome_elf/hook_util/hook_util.h"
|
||||
#include "components/crash/content/app/crashpad.h"
|
||||
#include "components/crash/core/common/crash_keys.h"
|
||||
#include "third_party/crashpad/crashpad/client/crashpad_client.h"
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+#include "cef/libcef/common/crash_reporter_client.h"
|
||||
+#endif
|
||||
+
|
||||
namespace {
|
||||
|
||||
// Crash handling from elf is only enabled for the chrome.exe process.
|
||||
@@ -74,7 +79,11 @@ bool InitializeCrashReporting() {
|
||||
g_crash_reports = new std::vector<crash_reporter::Report>;
|
||||
g_set_unhandled_exception_filter = new elf_hook::IATHook();
|
||||
|
||||
+#if BUILDFLAG(ENABLE_CEF)
|
||||
+ CefCrashReporterClient::InitializeCrashReportingForProcess();
|
||||
+#else
|
||||
ChromeCrashReporterClient::InitializeCrashReportingForProcess();
|
||||
+#endif
|
||||
|
||||
g_crash_helper_enabled = true;
|
||||
return true;
|
||||
diff --git components/crash/content/app/breakpad_linux.cc components/crash/content/app/breakpad_linux.cc
|
||||
index ecc7d66acb03..abc4371f429b 100644
|
||||
index 3ab8ad2c5aad..ba4a353c370b 100644
|
||||
--- components/crash/content/app/breakpad_linux.cc
|
||||
+++ components/crash/content/app/breakpad_linux.cc
|
||||
@@ -28,6 +28,7 @@
|
||||
@ -241,7 +241,7 @@ index 6e95af6ca7f5..061fb189d60f 100644
|
||||
extern void InitCrashKeysForTesting();
|
||||
|
||||
diff --git components/crash/content/app/crash_reporter_client.cc components/crash/content/app/crash_reporter_client.cc
|
||||
index c3c3f9db07d4..c532a5a46740 100644
|
||||
index 4d2b6ad68d80..728ffd9e7b4c 100644
|
||||
--- components/crash/content/app/crash_reporter_client.cc
|
||||
+++ components/crash/content/app/crash_reporter_client.cc
|
||||
@@ -88,7 +88,7 @@ int CrashReporterClient::GetResultCodeRespawnFailed() {
|
||||
@ -261,7 +261,7 @@ index c3c3f9db07d4..c532a5a46740 100644
|
||||
base::FilePath CrashReporterClient::GetReporterLogFilename() {
|
||||
return base::FilePath();
|
||||
}
|
||||
@@ -105,6 +106,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename) {
|
||||
@@ -106,6 +107,7 @@ bool CrashReporterClient::HandleCrashDump(const char* crashdump_filename,
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@ -269,7 +269,7 @@ index c3c3f9db07d4..c532a5a46740 100644
|
||||
|
||||
#if defined(OS_WIN)
|
||||
bool CrashReporterClient::GetCrashDumpLocation(base::string16* crash_dir) {
|
||||
@@ -147,6 +149,32 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
@@ -148,6 +150,32 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -302,7 +302,7 @@ index c3c3f9db07d4..c532a5a46740 100644
|
||||
#if defined(OS_ANDROID)
|
||||
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
|
||||
return 100;
|
||||
@@ -194,9 +222,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
|
||||
@@ -195,9 +223,11 @@ bool CrashReporterClient::ShouldMonitorCrashHandlerExpensively() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ index c3c3f9db07d4..c532a5a46740 100644
|
||||
|
||||
} // namespace crash_reporter
|
||||
diff --git components/crash/content/app/crash_reporter_client.h components/crash/content/app/crash_reporter_client.h
|
||||
index 1d35caa36716..7b96fb687b98 100644
|
||||
index d46bcc2a39b4..390654dd76fd 100644
|
||||
--- components/crash/content/app/crash_reporter_client.h
|
||||
+++ components/crash/content/app/crash_reporter_client.h
|
||||
@@ -5,7 +5,9 @@
|
||||
@ -348,15 +348,15 @@ index 1d35caa36716..7b96fb687b98 100644
|
||||
virtual base::FilePath GetReporterLogFilename();
|
||||
|
||||
// Custom crash minidump handler after the minidump is generated.
|
||||
@@ -110,6 +113,7 @@ class CrashReporterClient {
|
||||
// WARNING: this handler runs in a compromised context. It may not call into
|
||||
@@ -111,6 +114,7 @@ class CrashReporterClient {
|
||||
// libc nor allocate memory normally.
|
||||
virtual bool HandleCrashDump(const char* crashdump_filename);
|
||||
virtual bool HandleCrashDump(const char* crashdump_filename,
|
||||
uint64_t crash_pid);
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
// The location where minidump files should be written. Returns true if
|
||||
@@ -206,6 +210,30 @@ class CrashReporterClient {
|
||||
@@ -207,6 +211,30 @@ class CrashReporterClient {
|
||||
|
||||
// Returns true if breakpad should run in the given process type.
|
||||
virtual bool EnableBreakpadForProcess(const std::string& process_type);
|
||||
@ -598,7 +598,7 @@ index 8f55759a6f4a..5d60fc3f84eb 100644
|
||||
|
||||
if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
|
||||
diff --git content/browser/frame_host/debug_urls.cc content/browser/frame_host/debug_urls.cc
|
||||
index d47b0305167e..d5941ed0e2af 100644
|
||||
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) {
|
||||
|
@ -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 31686b3eb899..f361f5759976 100644
|
||||
index 724168ee9657..ae31efb356a1 100644
|
||||
--- third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
+++ third_party/crashpad/crashpad/handler/handler_main.cc
|
||||
@@ -36,8 +36,10 @@
|
||||
@ -273,7 +273,7 @@ index 31686b3eb899..f361f5759976 100644
|
||||
namespace crashpad {
|
||||
|
||||
namespace {
|
||||
@@ -179,6 +185,9 @@ struct Options {
|
||||
@@ -185,6 +191,9 @@ struct Options {
|
||||
bool periodic_tasks;
|
||||
bool rate_limit;
|
||||
bool upload_gzip;
|
||||
@ -283,8 +283,8 @@ index 31686b3eb899..f361f5759976 100644
|
||||
};
|
||||
|
||||
// Splits |key_value| on '=' and inserts the resulting key and value into |map|.
|
||||
@@ -553,6 +562,9 @@ int HandlerMain(int argc,
|
||||
kOptionSanitizationInformation,
|
||||
@@ -562,6 +571,9 @@ int HandlerMain(int argc,
|
||||
kOptionTraceParentWithException,
|
||||
#endif
|
||||
kOptionURL,
|
||||
+ kOptionMaxUploads,
|
||||
@ -293,7 +293,7 @@ index 31686b3eb899..f361f5759976 100644
|
||||
|
||||
// Standard options.
|
||||
kOptionHelp = -2,
|
||||
@@ -614,6 +626,9 @@ int HandlerMain(int argc,
|
||||
@@ -629,6 +641,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 31686b3eb899..f361f5759976 100644
|
||||
{nullptr, 0, nullptr, 0},
|
||||
};
|
||||
|
||||
@@ -749,6 +764,27 @@ int HandlerMain(int argc,
|
||||
@@ -768,6 +783,27 @@ int HandlerMain(int argc,
|
||||
options.url = optarg;
|
||||
break;
|
||||
}
|
||||
@ -331,7 +331,7 @@ index 31686b3eb899..f361f5759976 100644
|
||||
case kOptionHelp: {
|
||||
Usage(me);
|
||||
MetricsRecordExit(Metrics::LifetimeMilestone::kExitedEarly);
|
||||
@@ -863,8 +899,14 @@ int HandlerMain(int argc,
|
||||
@@ -888,8 +924,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 31686b3eb899..f361f5759976 100644
|
||||
upload_thread.Get()->Start();
|
||||
}
|
||||
|
||||
@@ -892,7 +934,8 @@ int HandlerMain(int argc,
|
||||
@@ -917,7 +959,8 @@ int HandlerMain(int argc,
|
||||
ScopedStoppable prune_thread;
|
||||
if (options.periodic_tasks) {
|
||||
prune_thread.Reset(new PruneCrashReportThread(
|
||||
|
@ -132,18 +132,18 @@ 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 93dce1cad08c..1eef00b03063 100644
|
||||
index 3ed389242f67..4cc4d2a5bed8 100644
|
||||
--- extensions/browser/extensions_browser_client.h
|
||||
+++ extensions/browser/extensions_browser_client.h
|
||||
@@ -62,6 +62,7 @@ class ComponentExtensionResourceManager;
|
||||
@@ -60,6 +60,7 @@ class ComponentExtensionResourceManager;
|
||||
class Extension;
|
||||
class ExtensionCache;
|
||||
class ExtensionError;
|
||||
+class ExtensionHost;
|
||||
class ExtensionHostDelegate;
|
||||
class ExtensionPrefsObserver;
|
||||
class ExtensionApiFrameIdMap;
|
||||
@@ -216,6 +217,14 @@ class ExtensionsBrowserClient {
|
||||
class ExtensionApiFrameIdMapHelper;
|
||||
@@ -213,6 +214,14 @@ class ExtensionsBrowserClient {
|
||||
virtual std::unique_ptr<ExtensionHostDelegate>
|
||||
CreateExtensionHostDelegate() = 0;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/compositor/browser_compositor_output_surface.cc content/browser/compositor/browser_compositor_output_surface.cc
|
||||
index 24cfe2fb6d7b..d624bf71d07d 100644
|
||||
index 79b2ae7b6fef..7c0e65975c14 100644
|
||||
--- content/browser/compositor/browser_compositor_output_surface.cc
|
||||
+++ content/browser/compositor/browser_compositor_output_surface.cc
|
||||
@@ -53,6 +53,10 @@ void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) {
|
||||
@@ -41,6 +41,10 @@ void BrowserCompositorOutputSurface::SetReflector(ReflectorImpl* reflector) {
|
||||
OnReflectorChanged();
|
||||
}
|
||||
|
||||
@ -14,10 +14,10 @@ index 24cfe2fb6d7b..d624bf71d07d 100644
|
||||
}
|
||||
|
||||
diff --git content/browser/compositor/browser_compositor_output_surface.h content/browser/compositor/browser_compositor_output_surface.h
|
||||
index dda4ac04b913..c82c01bd1354 100644
|
||||
index c91aedd16481..1a92c5effd11 100644
|
||||
--- content/browser/compositor/browser_compositor_output_surface.h
|
||||
+++ content/browser/compositor/browser_compositor_output_surface.h
|
||||
@@ -38,6 +38,8 @@ class CONTENT_EXPORT BrowserCompositorOutputSurface
|
||||
@@ -43,6 +43,8 @@ class CONTENT_EXPORT BrowserCompositorOutputSurface
|
||||
|
||||
void SetReflector(ReflectorImpl* reflector);
|
||||
|
||||
@ -27,10 +27,10 @@ index dda4ac04b913..c82c01bd1354 100644
|
||||
virtual void OnReflectorChanged();
|
||||
|
||||
diff --git content/browser/compositor/gpu_process_transport_factory.cc content/browser/compositor/gpu_process_transport_factory.cc
|
||||
index 99c703a1ba14..afd6834e44da 100644
|
||||
index 7e3574cb69fa..df9a00d1ae53 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.cc
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.cc
|
||||
@@ -208,6 +208,18 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
||||
@@ -216,6 +216,18 @@ GpuProcessTransportFactory::~GpuProcessTransportFactory() {
|
||||
task_graph_runner_->Shutdown();
|
||||
}
|
||||
|
||||
@ -49,7 +49,16 @@ index 99c703a1ba14..afd6834e44da 100644
|
||||
std::unique_ptr<viz::SoftwareOutputDevice>
|
||||
GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
||||
gfx::AcceleratedWidget widget,
|
||||
@@ -450,11 +462,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
@@ -243,7 +255,7 @@ GpuProcessTransportFactory::CreateSoftwareOutputDevice(
|
||||
#endif
|
||||
}
|
||||
|
||||
-std::unique_ptr<viz::OverlayCandidateValidator> CreateOverlayCandidateValidator(
|
||||
+std::unique_ptr<viz::OverlayCandidateValidator> OverlayCandidateValidator(
|
||||
gfx::AcceleratedWidget widget) {
|
||||
std::unique_ptr<viz::OverlayCandidateValidator> validator;
|
||||
#if defined(USE_OZONE)
|
||||
@@ -419,10 +431,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
// surfaces as they are not following the correct mode.
|
||||
DisableGpuCompositing(compositor.get());
|
||||
}
|
||||
@ -67,23 +76,35 @@ index 99c703a1ba14..afd6834e44da 100644
|
||||
display_output_surface =
|
||||
std::make_unique<SoftwareBrowserCompositorOutputSurface>(
|
||||
- CreateSoftwareOutputDevice(compositor->widget(),
|
||||
- compositor->task_runner()),
|
||||
- std::move(vsync_callback));
|
||||
+ std::move(output_device), std::move(vsync_callback));
|
||||
- compositor->task_runner()));
|
||||
+ CreateSoftwareOutputDevice(compositor->widget(), compositor->task_runner()));
|
||||
} else {
|
||||
DCHECK(context_provider);
|
||||
const auto& capabilities = context_provider->ContextCapabilities();
|
||||
@@ -462,7 +483,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
@@ -430,10 +452,11 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
display_output_surface =
|
||||
std::make_unique<OffscreenBrowserCompositorOutputSurface>(
|
||||
context_provider, std::move(vsync_callback),
|
||||
- std::unique_ptr<viz::CompositorOverlayCandidateValidator>());
|
||||
+ std::unique_ptr<viz::CompositorOverlayCandidateValidator>(),
|
||||
context_provider,
|
||||
- std::unique_ptr<viz::OverlayCandidateValidator>());
|
||||
+ std::unique_ptr<viz::OverlayCandidateValidator>(),
|
||||
+ compositor->shared_texture_enabled());
|
||||
} else if (capabilities.surfaceless) {
|
||||
#if defined(OS_MACOSX)
|
||||
const auto& gpu_feature_info = context_provider->GetGpuFeatureInfo();
|
||||
@@ -914,7 +936,8 @@ GpuProcessTransportFactory::CreatePerCompositorData(
|
||||
DCHECK(capabilities.texture_format_bgra8888);
|
||||
- auto validator = CreateOverlayCandidateValidator(compositor->widget());
|
||||
+ auto validator = OverlayCandidateValidator(compositor->widget());
|
||||
overlay_validator = validator.get();
|
||||
auto gpu_output_surface =
|
||||
std::make_unique<GpuSurfacelessBrowserCompositorOutputSurface>(
|
||||
@@ -443,7 +466,7 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
|
||||
display_output_surface = std::move(gpu_output_surface);
|
||||
} else {
|
||||
std::unique_ptr<viz::OverlayCandidateValidator> validator =
|
||||
- CreateOverlayCandidateValidator(compositor->widget());
|
||||
+ OverlayCandidateValidator(compositor->widget());
|
||||
overlay_validator = validator.get();
|
||||
auto gpu_output_surface =
|
||||
std::make_unique<GpuBrowserCompositorOutputSurface>(
|
||||
@@ -881,7 +904,8 @@ GpuProcessTransportFactory::CreatePerCompositorData(
|
||||
gfx::AcceleratedWidget widget = compositor->widget();
|
||||
|
||||
auto data = std::make_unique<PerCompositorData>();
|
||||
@ -94,36 +115,35 @@ index 99c703a1ba14..afd6834e44da 100644
|
||||
} else {
|
||||
#if defined(GPU_SURFACE_HANDLE_IS_ACCELERATED_WINDOW)
|
||||
diff --git content/browser/compositor/gpu_process_transport_factory.h content/browser/compositor/gpu_process_transport_factory.h
|
||||
index 525fa0c06b33..1f95b4f53496 100644
|
||||
index 4a78bdea7ded..6cfe36fc7e5c 100644
|
||||
--- content/browser/compositor/gpu_process_transport_factory.h
|
||||
+++ content/browser/compositor/gpu_process_transport_factory.h
|
||||
@@ -101,6 +101,7 @@ class GpuProcessTransportFactory : public ui::ContextFactory,
|
||||
@@ -100,6 +100,7 @@ class GpuProcessTransportFactory : public ui::ContextFactory,
|
||||
void IssueExternalBeginFrame(ui::Compositor* compositor,
|
||||
const viz::BeginFrameArgs& args) override;
|
||||
void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override;
|
||||
+ void* GetSharedTexture(ui::Compositor* compositor) override;
|
||||
|
||||
// ImageTransportFactory implementation.
|
||||
void DisableGpuCompositing() override;
|
||||
void AddVSyncParameterObserver(
|
||||
ui::Compositor* compositor,
|
||||
viz::mojom::VSyncParameterObserverPtr observer) override;
|
||||
diff --git content/browser/compositor/offscreen_browser_compositor_output_surface.cc content/browser/compositor/offscreen_browser_compositor_output_surface.cc
|
||||
index dfedf6a60ebe..882457ebbbaa 100644
|
||||
index c38198dfe820..d6edf48c14b1 100644
|
||||
--- content/browser/compositor/offscreen_browser_compositor_output_surface.cc
|
||||
+++ content/browser/compositor/offscreen_browser_compositor_output_surface.cc
|
||||
@@ -35,10 +35,12 @@ OffscreenBrowserCompositorOutputSurface::
|
||||
const viz::UpdateVSyncParametersCallback&
|
||||
update_vsync_parameters_callback,
|
||||
std::unique_ptr<viz::CompositorOverlayCandidateValidator>
|
||||
@@ -33,9 +33,11 @@ OffscreenBrowserCompositorOutputSurface::
|
||||
OffscreenBrowserCompositorOutputSurface(
|
||||
scoped_refptr<ws::ContextProviderCommandBuffer> context,
|
||||
std::unique_ptr<viz::OverlayCandidateValidator>
|
||||
- overlay_candidate_validator)
|
||||
+ overlay_candidate_validator,
|
||||
+ bool shared_texture_enabled)
|
||||
+ bool shared_texture_enabled)
|
||||
: BrowserCompositorOutputSurface(std::move(context),
|
||||
update_vsync_parameters_callback,
|
||||
std::move(overlay_candidate_validator)),
|
||||
+ shared_texture_enabled_(shared_texture_enabled),
|
||||
weak_ptr_factory_(this) {
|
||||
capabilities_.uses_default_gl_framebuffer = false;
|
||||
}
|
||||
@@ -48,6 +50,10 @@ OffscreenBrowserCompositorOutputSurface::
|
||||
@@ -45,6 +47,10 @@ OffscreenBrowserCompositorOutputSurface::
|
||||
DiscardBackbuffer();
|
||||
}
|
||||
|
||||
@ -134,7 +154,7 @@ index dfedf6a60ebe..882457ebbbaa 100644
|
||||
void OffscreenBrowserCompositorOutputSurface::BindToClient(
|
||||
viz::OutputSurfaceClient* client) {
|
||||
DCHECK(client);
|
||||
@@ -56,42 +62,72 @@ void OffscreenBrowserCompositorOutputSurface::BindToClient(
|
||||
@@ -53,42 +59,72 @@ void OffscreenBrowserCompositorOutputSurface::BindToClient(
|
||||
}
|
||||
|
||||
void OffscreenBrowserCompositorOutputSurface::EnsureBackbuffer() {
|
||||
@ -237,7 +257,7 @@ index dfedf6a60ebe..882457ebbbaa 100644
|
||||
}
|
||||
|
||||
void OffscreenBrowserCompositorOutputSurface::DiscardBackbuffer() {
|
||||
@@ -103,6 +139,16 @@ void OffscreenBrowserCompositorOutputSurface::DiscardBackbuffer() {
|
||||
@@ -100,6 +136,16 @@ void OffscreenBrowserCompositorOutputSurface::DiscardBackbuffer() {
|
||||
reflector_->OnSourceTextureMailboxUpdated(nullptr);
|
||||
}
|
||||
|
||||
@ -254,7 +274,7 @@ index dfedf6a60ebe..882457ebbbaa 100644
|
||||
if (fbo_) {
|
||||
gl->BindFramebuffer(GL_FRAMEBUFFER, fbo_);
|
||||
gl->DeleteFramebuffers(1, &fbo_);
|
||||
@@ -125,15 +171,20 @@ void OffscreenBrowserCompositorOutputSurface::Reshape(
|
||||
@@ -122,15 +168,20 @@ void OffscreenBrowserCompositorOutputSurface::Reshape(
|
||||
}
|
||||
|
||||
void OffscreenBrowserCompositorOutputSurface::BindFramebuffer() {
|
||||
@ -279,7 +299,7 @@ index dfedf6a60ebe..882457ebbbaa 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +205,12 @@ void OffscreenBrowserCompositorOutputSurface::SwapBuffers(
|
||||
@@ -151,6 +202,12 @@ void OffscreenBrowserCompositorOutputSurface::SwapBuffers(
|
||||
// The original implementation had a flickering issue (crbug.com/515332).
|
||||
gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
|
||||
|
||||
@ -292,7 +312,7 @@ index dfedf6a60ebe..882457ebbbaa 100644
|
||||
gpu::SyncToken sync_token;
|
||||
gl->GenUnverifiedSyncTokenCHROMIUM(sync_token.GetData());
|
||||
context_provider_->ContextSupport()->SignalSyncToken(
|
||||
@@ -193,7 +250,9 @@ void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete(
|
||||
@@ -190,7 +247,9 @@ void OffscreenBrowserCompositorOutputSurface::OnSwapBuffersComplete(
|
||||
const std::vector<ui::LatencyInfo>& latency_info) {
|
||||
latency_tracker_.OnGpuSwapBuffersCompleted(latency_info);
|
||||
client_->DidReceiveSwapBuffersAck();
|
||||
@ -304,20 +324,20 @@ index dfedf6a60ebe..882457ebbbaa 100644
|
||||
|
||||
unsigned OffscreenBrowserCompositorOutputSurface::UpdateGpuFence() {
|
||||
diff --git content/browser/compositor/offscreen_browser_compositor_output_surface.h content/browser/compositor/offscreen_browser_compositor_output_surface.h
|
||||
index 9751f1e74d82..ca3237a4d995 100644
|
||||
index 9756ca6f5bc3..c470746b5b93 100644
|
||||
--- content/browser/compositor/offscreen_browser_compositor_output_surface.h
|
||||
+++ content/browser/compositor/offscreen_browser_compositor_output_surface.h
|
||||
@@ -32,7 +32,8 @@ class OffscreenBrowserCompositorOutputSurface
|
||||
const viz::UpdateVSyncParametersCallback&
|
||||
update_vsync_parameters_callback,
|
||||
std::unique_ptr<viz::CompositorOverlayCandidateValidator>
|
||||
@@ -30,7 +30,8 @@ class OffscreenBrowserCompositorOutputSurface
|
||||
OffscreenBrowserCompositorOutputSurface(
|
||||
scoped_refptr<ws::ContextProviderCommandBuffer> context,
|
||||
std::unique_ptr<viz::OverlayCandidateValidator>
|
||||
- overlay_candidate_validator);
|
||||
+ overlay_candidate_validator,
|
||||
+ bool shared_texture_enabled);
|
||||
|
||||
~OffscreenBrowserCompositorOutputSurface() override;
|
||||
|
||||
@@ -54,11 +55,15 @@ class OffscreenBrowserCompositorOutputSurface
|
||||
@@ -52,11 +53,15 @@ class OffscreenBrowserCompositorOutputSurface
|
||||
gfx::BufferFormat GetOverlayBufferFormat() const override;
|
||||
uint32_t GetFramebufferCopyTextureFormat() override;
|
||||
|
||||
@ -333,7 +353,7 @@ index 9751f1e74d82..ca3237a4d995 100644
|
||||
void OnSwapBuffersComplete(const std::vector<ui::LatencyInfo>& latency_info);
|
||||
|
||||
viz::OutputSurfaceClient* client_ = nullptr;
|
||||
@@ -66,6 +71,11 @@ class OffscreenBrowserCompositorOutputSurface
|
||||
@@ -64,6 +69,11 @@ class OffscreenBrowserCompositorOutputSurface
|
||||
uint32_t fbo_ = 0;
|
||||
bool reflector_changed_ = false;
|
||||
std::unique_ptr<ReflectorTexture> reflector_texture_;
|
||||
@ -361,10 +381,10 @@ index 052b441e020d..9c3044185400 100644
|
||||
GLES2_GET_FUN(InvalidateReadbackBufferShadowDataCHROMIUM)
|
||||
#define glFramebufferTextureMultiviewOVR \
|
||||
diff --git gpu/command_buffer/build_gles2_cmd_buffer.py gpu/command_buffer/build_gles2_cmd_buffer.py
|
||||
index 255f6eb57f59..725e1475bbad 100755
|
||||
index e830f36dcb81..9e647f3bbd54 100755
|
||||
--- gpu/command_buffer/build_gles2_cmd_buffer.py
|
||||
+++ gpu/command_buffer/build_gles2_cmd_buffer.py
|
||||
@@ -4231,6 +4231,35 @@ _FUNCTION_INFO = {
|
||||
@@ -4228,6 +4228,35 @@ _FUNCTION_INFO = {
|
||||
'extension': 'CHROMIUM_gpu_fence',
|
||||
'extension_flag': 'chromium_gpu_fence',
|
||||
},
|
||||
@ -496,10 +516,10 @@ index dbe1d6080d28..6902055b7c70 100644
|
||||
GLint shm_id,
|
||||
GLuint shm_offset,
|
||||
diff --git gpu/command_buffer/client/gles2_implementation.cc gpu/command_buffer/client/gles2_implementation.cc
|
||||
index bb4a599a9a37..3159b045d260 100644
|
||||
index 211bfd81a53c..26f65497638e 100644
|
||||
--- gpu/command_buffer/client/gles2_implementation.cc
|
||||
+++ gpu/command_buffer/client/gles2_implementation.cc
|
||||
@@ -7616,6 +7616,22 @@ void GLES2Implementation::Viewport(GLint x,
|
||||
@@ -7619,6 +7619,22 @@ void GLES2Implementation::Viewport(GLint x,
|
||||
CheckGLError();
|
||||
}
|
||||
|
||||
@ -971,10 +991,10 @@ index 7c3d121e54dc..b9b7ffa2a585 100644
|
||||
GL_APICALL void GL_APIENTRY glInvalidateReadbackBufferShadowDataCHROMIUM (GLidBuffer buffer_id);
|
||||
// (used for CHROMIUM_nonblocking_readback implementation)
|
||||
diff --git gpu/command_buffer/service/BUILD.gn gpu/command_buffer/service/BUILD.gn
|
||||
index 8ff7c571352d..63ffe016f019 100644
|
||||
index 5a84425376f2..6af28715789b 100644
|
||||
--- gpu/command_buffer/service/BUILD.gn
|
||||
+++ gpu/command_buffer/service/BUILD.gn
|
||||
@@ -107,6 +107,8 @@ target(link_target_type, "gles2_sources") {
|
||||
@@ -108,6 +108,8 @@ target(link_target_type, "gles2_sources") {
|
||||
visibility = [ "//gpu/*" ]
|
||||
|
||||
sources = [
|
||||
@ -984,7 +1004,7 @@ index 8ff7c571352d..63ffe016f019 100644
|
||||
"abstract_texture_impl_shared_context_state.cc",
|
||||
"abstract_texture_impl_shared_context_state.h",
|
||||
diff --git gpu/command_buffer/service/gles2_cmd_decoder.cc gpu/command_buffer/service/gles2_cmd_decoder.cc
|
||||
index 71ae06b85d79..c5599711d769 100644
|
||||
index bc72d2624aad..18a477c53445 100644
|
||||
--- gpu/command_buffer/service/gles2_cmd_decoder.cc
|
||||
+++ gpu/command_buffer/service/gles2_cmd_decoder.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
@ -1018,7 +1038,7 @@ index 71ae06b85d79..c5599711d769 100644
|
||||
base::flat_set<scoped_refptr<Buffer>> writes_submitted_but_not_completed_;
|
||||
|
||||
// The format of the back buffer_
|
||||
@@ -5619,6 +5629,59 @@ error::Error GLES2DecoderImpl::HandleDestroyGpuFenceCHROMIUM(
|
||||
@@ -5620,6 +5630,59 @@ error::Error GLES2DecoderImpl::HandleDestroyGpuFenceCHROMIUM(
|
||||
return error::kNoError;
|
||||
}
|
||||
|
||||
@ -1079,7 +1099,7 @@ index 71ae06b85d79..c5599711d769 100644
|
||||
for (auto it = saved_back_textures_.begin(); it != saved_back_textures_.end();
|
||||
++it) {
|
||||
diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
|
||||
index 6b9c176a0dcf..6e9ff5b7d35d 100644
|
||||
index 15fd3f99101d..3c1234940c41 100644
|
||||
--- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
|
||||
+++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
@ -1090,7 +1110,7 @@ index 6b9c176a0dcf..6e9ff5b7d35d 100644
|
||||
#include "gpu/command_buffer/service/command_buffer_service.h"
|
||||
#include "gpu/command_buffer/service/decoder_client.h"
|
||||
#include "gpu/command_buffer/service/feature_info.h"
|
||||
@@ -2515,6 +2516,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult(
|
||||
@@ -2589,6 +2590,67 @@ error::Error GLES2DecoderPassthroughImpl::CheckSwapBuffersResult(
|
||||
return error::kNoError;
|
||||
}
|
||||
|
||||
@ -1159,7 +1179,7 @@ index 6b9c176a0dcf..6e9ff5b7d35d 100644
|
||||
GLES2DecoderPassthroughImpl::TextureTarget
|
||||
GLES2DecoderPassthroughImpl::GLenumToTextureTarget(GLenum target) {
|
||||
diff --git gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
|
||||
index 7470c03bfc6a..58b91b2f666d 100644
|
||||
index 1fa45e8311c3..f67179f3bdc4 100644
|
||||
--- gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
|
||||
+++ gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h
|
||||
@@ -45,6 +45,7 @@ class SharedImageRepresentationGLTexturePassthrough;
|
||||
@ -1179,7 +1199,7 @@ index 7470c03bfc6a..58b91b2f666d 100644
|
||||
void* GetScratchMemory(size_t size);
|
||||
|
||||
template <typename T>
|
||||
@@ -578,6 +581,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
|
||||
@@ -581,6 +584,8 @@ class GPU_GLES2_EXPORT GLES2DecoderPassthroughImpl : public GLES2Decoder {
|
||||
|
||||
std::unique_ptr<MultiDrawManager> multi_draw_manager_;
|
||||
|
||||
@ -1189,11 +1209,11 @@ index 7470c03bfc6a..58b91b2f666d 100644
|
||||
size_t active_texture_unit_;
|
||||
|
||||
diff --git ui/compositor/compositor.cc ui/compositor/compositor.cc
|
||||
index 6ab0a01e8f3d..1046cbde43e9 100644
|
||||
index 15c98e2b7d42..d607234f8ad7 100644
|
||||
--- ui/compositor/compositor.cc
|
||||
+++ ui/compositor/compositor.cc
|
||||
@@ -560,6 +560,16 @@ scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const {
|
||||
return vsync_manager_;
|
||||
@@ -548,6 +548,16 @@ gfx::AcceleratedWidget Compositor::widget() const {
|
||||
return widget_;
|
||||
}
|
||||
|
||||
+void* Compositor::GetSharedTexture() {
|
||||
@ -1210,27 +1230,27 @@ index 6ab0a01e8f3d..1046cbde43e9 100644
|
||||
observer_list_.AddObserver(observer);
|
||||
}
|
||||
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
|
||||
index 102c2fcef112..0115a1ec972a 100644
|
||||
index 494241c374b7..f07133a4b147 100644
|
||||
--- ui/compositor/compositor.h
|
||||
+++ ui/compositor/compositor.h
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "components/viz/common/frame_sinks/begin_frame_args.h"
|
||||
#include "components/viz/common/surfaces/frame_sink_id.h"
|
||||
#include "components/viz/common/surfaces/local_surface_id_allocation.h"
|
||||
#include "components/viz/host/host_frame_sink_client.h"
|
||||
+#include "components/viz/service/display/software_output_device.h"
|
||||
#include "services/viz/privileged/interfaces/compositing/vsync_parameter_observer.mojom-forward.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "third_party/skia/include/core/SkMatrix44.h"
|
||||
#include "ui/compositor/compositor_animation_observer.h"
|
||||
@@ -154,6 +155,8 @@ class COMPOSITOR_EXPORT ContextFactoryPrivate {
|
||||
const viz::BeginFrameArgs& args) = 0;
|
||||
@@ -155,6 +156,8 @@ class COMPOSITOR_EXPORT ContextFactoryPrivate {
|
||||
|
||||
virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0;
|
||||
+
|
||||
+ virtual void* GetSharedTexture(ui::Compositor* compositor) = 0;
|
||||
};
|
||||
|
||||
// This class abstracts the creation of the 3D context for the compositor. It is
|
||||
@@ -194,6 +197,17 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
+ virtual void* GetSharedTexture(ui::Compositor* compositor) = 0;
|
||||
+
|
||||
// Adds an observer for vsync parameter changes.
|
||||
virtual void AddVSyncParameterObserver(
|
||||
Compositor* compositor,
|
||||
@@ -199,6 +202,17 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
virtual bool SyncTokensRequiredForDisplayCompositor() = 0;
|
||||
};
|
||||
|
||||
@ -1248,7 +1268,7 @@ index 102c2fcef112..0115a1ec972a 100644
|
||||
// Compositor object to take care of GPU painting.
|
||||
// A Browser compositor object is responsible for generating the final
|
||||
// displayable form of pixels comprising a single widget's contents. It draws an
|
||||
@@ -236,6 +250,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -238,6 +252,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
@ -1258,7 +1278,7 @@ index 102c2fcef112..0115a1ec972a 100644
|
||||
// Sets the root of the layer tree drawn by this Compositor. The root layer
|
||||
// must have no parent. The compositor's root layer is reset if the root layer
|
||||
// is destroyed. NULL can be passed to reset the root layer, in which case the
|
||||
@@ -349,6 +366,10 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -341,6 +358,10 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
return task_runner_;
|
||||
}
|
||||
|
||||
@ -1269,7 +1289,7 @@ index 102c2fcef112..0115a1ec972a 100644
|
||||
// Compositor does not own observers. It is the responsibility of the
|
||||
// observer to remove itself when it is done observing.
|
||||
void AddObserver(CompositorObserver* observer);
|
||||
@@ -460,6 +481,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -454,6 +475,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
ui::ContextFactory* context_factory_;
|
||||
ui::ContextFactoryPrivate* context_factory_private_;
|
||||
|
||||
@ -1278,7 +1298,7 @@ index 102c2fcef112..0115a1ec972a 100644
|
||||
// The root of the Layer tree drawn by this compositor.
|
||||
Layer* root_layer_ = nullptr;
|
||||
|
||||
@@ -494,6 +517,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -485,6 +508,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
|
||||
ExternalBeginFrameClient* const external_begin_frame_client_;
|
||||
|
||||
@ -1288,11 +1308,11 @@ index 102c2fcef112..0115a1ec972a 100644
|
||||
|
||||
// The device scale factor of the monitor that this compositor is compositing
|
||||
diff --git ui/compositor/host/host_context_factory_private.cc ui/compositor/host/host_context_factory_private.cc
|
||||
index 2b23ed42a933..109841847888 100644
|
||||
index 0ff1e05244e0..93d69530edc2 100644
|
||||
--- ui/compositor/host/host_context_factory_private.cc
|
||||
+++ ui/compositor/host/host_context_factory_private.cc
|
||||
@@ -254,6 +254,10 @@ void HostContextFactoryPrivate::SetOutputIsSecure(Compositor* compositor,
|
||||
iter->second.display_private->SetOutputIsSecure(secure);
|
||||
@@ -297,6 +297,10 @@ void HostContextFactoryPrivate::AddVSyncParameterObserver(
|
||||
}
|
||||
}
|
||||
|
||||
+void* HostContextFactoryPrivate::GetSharedTexture(Compositor* /*compositor*/) {
|
||||
@ -1303,7 +1323,7 @@ index 2b23ed42a933..109841847888 100644
|
||||
// When running with viz there is no FrameSinkManagerImpl in the browser
|
||||
// process. FrameSinkManagerImpl runs in the GPU process instead. Anything in
|
||||
diff --git ui/compositor/host/host_context_factory_private.h ui/compositor/host/host_context_factory_private.h
|
||||
index 18cd096449d2..aa25ea058925 100644
|
||||
index dc31ab80f17e..c7c08d6137eb 100644
|
||||
--- ui/compositor/host/host_context_factory_private.h
|
||||
+++ ui/compositor/host/host_context_factory_private.h
|
||||
@@ -50,6 +50,8 @@ class HostContextFactoryPrivate : public ContextFactoryPrivate {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git .gn .gn
|
||||
index 2bccf9d2b12c..39ce25e36c22 100644
|
||||
index 01085ea84619..b79158a1a962 100644
|
||||
--- .gn
|
||||
+++ .gn
|
||||
@@ -664,6 +664,8 @@ exec_script_whitelist =
|
||||
@@ -666,6 +666,8 @@ exec_script_whitelist =
|
||||
# in the Chromium repo outside of //build.
|
||||
"//build_overrides/build.gni",
|
||||
|
||||
@ -12,10 +12,10 @@ index 2bccf9d2b12c..39ce25e36c22 100644
|
||||
# https://crbug.com/474506.
|
||||
"//clank/java/BUILD.gn",
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 2d6f3315e687..405ddd14fab6 100644
|
||||
index 8209523bebe9..84137b1a5cca 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -187,6 +187,7 @@ group("gn_all") {
|
||||
@@ -202,6 +202,7 @@ group("gn_all") {
|
||||
|
||||
if (!is_ios && !is_fuchsia) {
|
||||
deps += [
|
||||
@ -100,10 +100,10 @@ index ef8aeda56458..5b7f057311b9 100644
|
||||
|
||||
|
||||
diff --git build/vs_toolchain.py build/vs_toolchain.py
|
||||
index 0ce237fe1323..6201bbba992c 100755
|
||||
index 6a0dcbdb4fe2..9902f5da105a 100755
|
||||
--- build/vs_toolchain.py
|
||||
+++ build/vs_toolchain.py
|
||||
@@ -78,11 +78,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
@@ -81,11 +81,18 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
||||
runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs)
|
||||
os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH']
|
||||
elif sys.platform == 'win32' and not depot_tools_win_toolchain:
|
||||
@ -123,10 +123,10 @@ index 0ce237fe1323..6201bbba992c 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 dc766a29cc34..97b47d0538e4 100644
|
||||
index 8ff44c72636e..bb5e1a42aed4 100644
|
||||
--- chrome/chrome_paks.gni
|
||||
+++ chrome/chrome_paks.gni
|
||||
@@ -265,7 +265,7 @@ template("chrome_paks") {
|
||||
@@ -275,7 +275,7 @@ template("chrome_paks") {
|
||||
}
|
||||
|
||||
input_locales = locales
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git tools/gritsettings/resource_ids tools/gritsettings/resource_ids
|
||||
index 33dc98925f5f..9bd2dbef9faf 100644
|
||||
index 2a7cb2dcb562..3fef6b5dee49 100644
|
||||
--- tools/gritsettings/resource_ids
|
||||
+++ tools/gritsettings/resource_ids
|
||||
@@ -442,4 +442,11 @@
|
||||
@@ -459,4 +459,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 7de0c9321795..cba34d236a1f 100644
|
||||
index 2627f1eae901..80c00fc9752a 100644
|
||||
--- ui/base/ime/win/input_method_win_base.cc
|
||||
+++ ui/base/ime/win/input_method_win_base.cc
|
||||
@@ -267,8 +267,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const {
|
||||
@@ -266,8 +266,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.
|
||||
|
@ -1,34 +1,5 @@
|
||||
diff --git build/config/linux/gtk/BUILD.gn build/config/linux/gtk/BUILD.gn
|
||||
index d78f7407c179..0bb79883e16c 100644
|
||||
--- build/config/linux/gtk/BUILD.gn
|
||||
+++ build/config/linux/gtk/BUILD.gn
|
||||
@@ -4,8 +4,10 @@
|
||||
|
||||
import("//build/config/linux/gtk/gtk.gni")
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/config/ui.gni")
|
||||
|
||||
assert(is_linux, "This file should only be referenced on Linux")
|
||||
+assert(use_gtk, "This file should only be referenced when GTK is enabled")
|
||||
|
||||
# GN doesn't check visibility for configs so we give this an obviously internal
|
||||
# name to discourage random targets from accidentally depending on this and
|
||||
diff --git build/config/ui.gni build/config/ui.gni
|
||||
index 547b42fb5c66..0eae3470e1bb 100644
|
||||
--- build/config/ui.gni
|
||||
+++ build/config/ui.gni
|
||||
@@ -37,6 +37,9 @@ declare_args() {
|
||||
# True means the UI is built using the "views" framework.
|
||||
toolkit_views = (is_mac || is_win || is_chromeos || use_aura) &&
|
||||
!is_chromecast && !is_fuchsia
|
||||
+
|
||||
+ # Whether we should use GTK.
|
||||
+ use_gtk = use_aura && is_linux
|
||||
}
|
||||
|
||||
# Additional dependent variables -----------------------------------------------
|
||||
diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
||||
index c3511e3e6a66..3500f4a2b005 100644
|
||||
index 07f06ac694f5..831fd9f82dbe 100644
|
||||
--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
||||
+++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
||||
@@ -6,6 +6,7 @@
|
||||
@ -39,7 +10,7 @@ index c3511e3e6a66..3500f4a2b005 100644
|
||||
#include "chrome/browser/chrome_browser_main.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
@@ -31,6 +32,7 @@
|
||||
@@ -29,6 +30,7 @@
|
||||
|
||||
namespace {
|
||||
|
||||
@ -47,7 +18,7 @@ index c3511e3e6a66..3500f4a2b005 100644
|
||||
ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
|
||||
if (!window)
|
||||
return nullptr;
|
||||
@@ -55,6 +57,7 @@ ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
|
||||
@@ -53,6 +55,7 @@ ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
|
||||
|
||||
return ui::NativeTheme::GetInstanceForNativeUi();
|
||||
}
|
||||
@ -55,32 +26,23 @@ index c3511e3e6a66..3500f4a2b005 100644
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -68,9 +71,11 @@ ChromeBrowserMainExtraPartsViewsLinux::
|
||||
}
|
||||
@@ -67,9 +70,11 @@ void ChromeBrowserMainExtraPartsViewsLinux::PreEarlyInitialization() {
|
||||
if (!linux_ui)
|
||||
return;
|
||||
|
||||
void ChromeBrowserMainExtraPartsViewsLinux::PreEarlyInitialization() {
|
||||
+#if !BUILDFLAG(ENABLE_CEF)
|
||||
views::LinuxUI* gtk_ui = BuildGtkUi();
|
||||
gtk_ui->SetNativeThemeOverride(base::BindRepeating(&GetNativeThemeForWindow));
|
||||
views::LinuxUI::SetInstance(gtk_ui);
|
||||
linux_ui->SetNativeThemeOverride(
|
||||
base::BindRepeating(&GetNativeThemeForWindow));
|
||||
views::LinuxUI::SetInstance(linux_ui);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() {
|
||||
diff --git chrome/test/BUILD.gn chrome/test/BUILD.gn
|
||||
index 5406779a17c2..b1ed0f2c970b 100644
|
||||
index 1fb3cf77f01c..dbb03ffe3333 100644
|
||||
--- chrome/test/BUILD.gn
|
||||
+++ chrome/test/BUILD.gn
|
||||
@@ -4159,7 +4159,7 @@ test("unit_tests") {
|
||||
"../browser/ui/input_method/input_method_engine_unittest.cc",
|
||||
]
|
||||
}
|
||||
- if (!is_chromeos && !is_chromecast && is_linux) {
|
||||
+ if (!is_chromeos && !is_chromecast && is_linux && use_gtk) {
|
||||
sources +=
|
||||
[ "../browser/ui/libgtkui/select_file_dialog_impl_gtk_unittest.cc" ]
|
||||
deps += [ "//build/config/linux/gtk" ]
|
||||
@@ -4180,7 +4180,7 @@ test("unit_tests") {
|
||||
@@ -4286,7 +4286,7 @@ test("unit_tests") {
|
||||
if (use_gio) {
|
||||
configs += [ "//build/linux:gio_config" ]
|
||||
}
|
||||
@ -89,7 +51,7 @@ index 5406779a17c2..b1ed0f2c970b 100644
|
||||
deps += [ "//chrome/browser/ui/libgtkui" ]
|
||||
}
|
||||
|
||||
@@ -5206,7 +5206,7 @@ if (!is_android) {
|
||||
@@ -5286,7 +5286,7 @@ if (!is_android) {
|
||||
# suites, it seems like one or another starts timing out too.
|
||||
"../browser/ui/views/keyboard_access_browsertest.cc",
|
||||
]
|
||||
@ -98,86 +60,3 @@ index 5406779a17c2..b1ed0f2c970b 100644
|
||||
sources += [
|
||||
"../browser/ui/libgtkui/select_file_dialog_interactive_uitest.cc",
|
||||
]
|
||||
diff --git remoting/host/BUILD.gn remoting/host/BUILD.gn
|
||||
index 229a7cb37e34..d51e249a7f9e 100644
|
||||
--- remoting/host/BUILD.gn
|
||||
+++ remoting/host/BUILD.gn
|
||||
@@ -353,7 +353,7 @@ static_library("common") {
|
||||
"//build/config/linux:xrandr",
|
||||
]
|
||||
deps += [ "//remoting/host/linux:x11" ]
|
||||
- if (is_desktop_linux) {
|
||||
+ if (is_desktop_linux && use_gtk) {
|
||||
deps += [ "//build/config/linux/gtk" ]
|
||||
}
|
||||
} else {
|
||||
@@ -737,7 +737,7 @@ if (enable_me2me_host) {
|
||||
deps += [ "//components/policy:generated" ]
|
||||
}
|
||||
|
||||
- if (is_desktop_linux) {
|
||||
+ if (is_desktop_linux && use_gtk) {
|
||||
deps += [ "//build/config/linux/gtk" ]
|
||||
}
|
||||
if ((is_linux && !is_chromeos) || is_mac) {
|
||||
diff --git remoting/host/file_transfer/BUILD.gn remoting/host/file_transfer/BUILD.gn
|
||||
index ffaaa0b5b423..9fc7f88859a9 100644
|
||||
--- remoting/host/file_transfer/BUILD.gn
|
||||
+++ remoting/host/file_transfer/BUILD.gn
|
||||
@@ -35,7 +35,7 @@ source_set("file_transfer") {
|
||||
sources -= [ "get_desktop_directory.cc" ]
|
||||
}
|
||||
|
||||
- if (is_desktop_linux) {
|
||||
+ if (is_desktop_linux && use_gtk) {
|
||||
sources += [ "file_chooser_linux.cc" ]
|
||||
deps += [ "//build/config/linux/gtk" ]
|
||||
}
|
||||
diff --git remoting/host/it2me/BUILD.gn remoting/host/it2me/BUILD.gn
|
||||
index 39dc46737578..e5cb11d5ef04 100644
|
||||
--- remoting/host/it2me/BUILD.gn
|
||||
+++ remoting/host/it2me/BUILD.gn
|
||||
@@ -53,7 +53,7 @@ source_set("common") {
|
||||
"//remoting/resources",
|
||||
"//remoting/signaling",
|
||||
]
|
||||
- if (is_desktop_linux) {
|
||||
+ if (is_desktop_linux && use_gtk) {
|
||||
deps += [
|
||||
"//build/config/linux/gtk",
|
||||
|
||||
@@ -247,7 +247,7 @@ if (!is_chromeos && enable_remoting_host) {
|
||||
}
|
||||
}
|
||||
|
||||
- if (is_desktop_linux) {
|
||||
+ if (is_desktop_linux && use_gtk) {
|
||||
deps += [ "//build/config/linux/gtk" ]
|
||||
}
|
||||
}
|
||||
diff --git remoting/host/linux/BUILD.gn remoting/host/linux/BUILD.gn
|
||||
index a07f8b0254af..970c1a54b4d2 100644
|
||||
--- remoting/host/linux/BUILD.gn
|
||||
+++ remoting/host/linux/BUILD.gn
|
||||
@@ -98,7 +98,7 @@ source_set("linux") {
|
||||
if (use_x11) {
|
||||
deps += [ ":x11" ]
|
||||
}
|
||||
- if (is_desktop_linux) {
|
||||
+ if (is_desktop_linux && use_gtk) {
|
||||
deps += [ "//build/config/linux/gtk" ]
|
||||
}
|
||||
}
|
||||
diff --git remoting/test/BUILD.gn remoting/test/BUILD.gn
|
||||
index 57b7f3b4e507..e87a45273a21 100644
|
||||
--- remoting/test/BUILD.gn
|
||||
+++ remoting/test/BUILD.gn
|
||||
@@ -158,7 +158,7 @@ if (enable_remoting_host && !is_android && !is_chromeos) {
|
||||
":it2me_standalone_host",
|
||||
]
|
||||
|
||||
- if (is_desktop_linux) {
|
||||
+ if (is_desktop_linux && use_gtk) {
|
||||
deps += [ "//build/config/linux/gtk" ]
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc
|
||||
index 22732f2864ef..7d5caef5c3b0 100644
|
||||
index 0ff8924fed4d..6c079b38e730 100644
|
||||
--- base/files/file_path_watcher_linux.cc
|
||||
+++ base/files/file_path_watcher_linux.cc
|
||||
@@ -5,6 +5,7 @@
|
||||
@ -15,10 +15,10 @@ index 22732f2864ef..7d5caef5c3b0 100644
|
||||
|
||||
#include <algorithm>
|
||||
+#include <array>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
@@ -220,22 +222,15 @@ void InotifyReaderThreadDelegate::ThreadMain() {
|
||||
@@ -263,22 +265,15 @@ void InotifyReaderThreadDelegate::ThreadMain() {
|
||||
PlatformThread::SetName("inotify_reader");
|
||||
|
||||
// Make sure the file descriptors are good for use with select().
|
||||
|
@ -1,5 +1,5 @@
|
||||
diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc
|
||||
index 85cab0eaef3e..37b2d42a34f5 100644
|
||||
index 8d690474060f..03059842b1a4 100644
|
||||
--- ui/gl/init/gl_initializer_mac.cc
|
||||
+++ ui/gl/init/gl_initializer_mac.cc
|
||||
@@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() {
|
||||
@ -16,14 +16,3 @@ index 85cab0eaef3e..37b2d42a34f5 100644
|
||||
if (GetGLImplementation() == kGLImplementationAppleGL) {
|
||||
attribs.push_back(kCGLPFARendererID);
|
||||
attribs.push_back(
|
||||
@@ -102,8 +99,8 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) {
|
||||
// as app bundles. In that case, the .dylib is next to the executable.
|
||||
base::FilePath base_dir;
|
||||
if (base::mac::AmIBundled()) {
|
||||
- base_dir =
|
||||
- base::mac::FrameworkBundlePath().Append("Versions/Current/Libraries/");
|
||||
+ // Rely on symlinks to find the correct version.
|
||||
+ base_dir = base::mac::FrameworkBundlePath().Append("Libraries/");
|
||||
} else {
|
||||
if (!base::PathService::Get(base::FILE_EXE, &base_dir)) {
|
||||
LOG(ERROR) << "PathService::Get failed.";
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git base/message_loop/message_loop.cc base/message_loop/message_loop.cc
|
||||
index afcf04d5882a..69f9f85cba84 100644
|
||||
index 90cb3e3fc7dd..903f258f2e1c 100644
|
||||
--- base/message_loop/message_loop.cc
|
||||
+++ base/message_loop/message_loop.cc
|
||||
@@ -149,6 +149,9 @@ bool MessageLoop::IsIdleForTesting() {
|
||||
@@ -100,6 +100,9 @@ bool MessageLoop::IsIdleForTesting() {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@ -13,10 +13,10 @@ index afcf04d5882a..69f9f85cba84 100644
|
||||
std::unique_ptr<MessageLoop> MessageLoop::CreateUnbound(Type type) {
|
||||
return WrapUnique(new MessageLoop(type, nullptr));
|
||||
diff --git base/message_loop/message_loop.h base/message_loop/message_loop.h
|
||||
index ddfed508baef..f332d1823667 100644
|
||||
index a1d6acc4e78d..f9518bc96ce4 100644
|
||||
--- base/message_loop/message_loop.h
|
||||
+++ base/message_loop/message_loop.h
|
||||
@@ -275,6 +275,7 @@ class BASE_EXPORT MessageLoop {
|
||||
@@ -229,6 +229,7 @@ class BASE_EXPORT MessageLoop {
|
||||
class BASE_EXPORT MessageLoopForUI : public MessageLoop {
|
||||
public:
|
||||
explicit MessageLoopForUI(Type type = TYPE_UI);
|
||||
@ -25,7 +25,7 @@ index ddfed508baef..f332d1823667 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 2e2adfa55fa4..1370d8484d8f 100644
|
||||
index 71a45d077a6a..fded5cf39adc 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 2e2adfa55fa4..1370d8484d8f 100644
|
||||
current_->RemoveDestructionObserver(destruction_observer);
|
||||
}
|
||||
diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h
|
||||
index 270c6593e789..520cb0e3198a 100644
|
||||
index f259d89d429c..ffcc61ee95c2 100644
|
||||
--- base/message_loop/message_loop_current.h
|
||||
+++ base/message_loop/message_loop_current.h
|
||||
@@ -132,6 +132,12 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
@@ -129,6 +129,12 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
// posted tasks.
|
||||
void SetAddQueueTimeToTasks(bool enable);
|
||||
|
||||
@ -54,7 +54,7 @@ index 270c6593e789..520cb0e3198a 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
|
||||
@@ -202,6 +208,13 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
@@ -199,6 +205,13 @@ class BASE_EXPORT MessageLoopCurrent {
|
||||
friend class web::TestWebThreadBundle;
|
||||
|
||||
sequence_manager::internal::SequenceManagerImpl* current_;
|
||||
|
@ -22,10 +22,10 @@ index 49fe875c7d22..c1e3df840dc0 100644
|
||||
THREAD_CHECKER(thread_checker_);
|
||||
|
||||
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
|
||||
index 06df9bd3e545..c5dbb0f0f6ef 100644
|
||||
index 3a7efeaf5b04..1a03e0ab8229 100644
|
||||
--- net/url_request/url_request_job.cc
|
||||
+++ net/url_request/url_request_job.cc
|
||||
@@ -464,6 +464,12 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
@@ -438,6 +438,12 @@ void URLRequestJob::NotifyHeadersComplete() {
|
||||
DCHECK(!source_stream_);
|
||||
source_stream_ = SetUpSourceStream();
|
||||
|
||||
|
@ -1,72 +1,15 @@
|
||||
diff --git components/certificate_transparency/chrome_ct_policy_enforcer.cc components/certificate_transparency/chrome_ct_policy_enforcer.cc
|
||||
index 99a4405290ea..d0b35f74e552 100644
|
||||
--- components/certificate_transparency/chrome_ct_policy_enforcer.cc
|
||||
+++ components/certificate_transparency/chrome_ct_policy_enforcer.cc
|
||||
@@ -36,15 +36,6 @@ namespace certificate_transparency {
|
||||
|
||||
namespace {
|
||||
|
||||
-// Returns true if the current build is recent enough to ensure that
|
||||
-// built-in security information (e.g. CT Logs) is fresh enough.
|
||||
-// TODO(eranm): Move to base or net/base
|
||||
-bool IsBuildTimely() {
|
||||
- const base::Time build_time = base::GetBuildTime();
|
||||
- // We consider built-in information to be timely for 10 weeks.
|
||||
- return (base::Time::Now() - build_time).InDays() < 70 /* 10 weeks */;
|
||||
-}
|
||||
-
|
||||
// Returns a rounded-down months difference of |start| and |end|,
|
||||
// together with an indication of whether the last month was
|
||||
// a full month, because the range starts specified in the policy
|
||||
@@ -304,4 +295,16 @@ CTPolicyCompliance ChromeCTPolicyEnforcer::CheckCompliance(
|
||||
return compliance;
|
||||
}
|
||||
|
||||
+// Returns true if the current build is recent enough to ensure that
|
||||
+// built-in security information (e.g. CT Logs) is fresh enough.
|
||||
+// TODO(eranm): Move to base or net/base
|
||||
+bool ChromeCTPolicyEnforcer::IsBuildTimely() const {
|
||||
+ if (!enforce_net_security_expiration_)
|
||||
+ return true;
|
||||
+
|
||||
+ const base::Time build_time = base::GetBuildTime();
|
||||
+ // We consider built-in information to be timely for 10 weeks.
|
||||
+ return (base::Time::Now() - build_time).InDays() < 70 /* 10 weeks */;
|
||||
+}
|
||||
+
|
||||
} // namespace certificate_transparency
|
||||
diff --git components/certificate_transparency/chrome_ct_policy_enforcer.h components/certificate_transparency/chrome_ct_policy_enforcer.h
|
||||
index f61ff0d0564a..e6727c7b1cbc 100644
|
||||
--- components/certificate_transparency/chrome_ct_policy_enforcer.h
|
||||
+++ components/certificate_transparency/chrome_ct_policy_enforcer.h
|
||||
@@ -26,6 +26,17 @@ class ChromeCTPolicyEnforcer : public net::CTPolicyEnforcer {
|
||||
net::X509Certificate* cert,
|
||||
const net::ct::SCTList& verified_scts,
|
||||
const net::NetLogWithSource& net_log) override;
|
||||
+
|
||||
+ void set_enforce_net_security_expiration(bool enforce) {
|
||||
+ enforce_net_security_expiration_ = enforce;
|
||||
+ }
|
||||
+
|
||||
+ private:
|
||||
+ // Returns true if the current build is recent enough to ensure that
|
||||
+ // built-in security information (e.g. CT Logs) is fresh enough.
|
||||
+ bool IsBuildTimely() const;
|
||||
+
|
||||
+ bool enforce_net_security_expiration_ = true;
|
||||
};
|
||||
|
||||
} // namespace certificate_transparency
|
||||
diff --git net/http/transport_security_state.cc net/http/transport_security_state.cc
|
||||
index b7a2bca7bf42..d0952ba4a4d7 100644
|
||||
index b7a2bca7bf42..5987ee212a12 100644
|
||||
--- net/http/transport_security_state.cc
|
||||
+++ net/http/transport_security_state.cc
|
||||
@@ -1100,8 +1100,10 @@ void TransportSecurityState::ClearReportCachesForTesting() {
|
||||
@@ -1100,8 +1100,12 @@ void TransportSecurityState::ClearReportCachesForTesting() {
|
||||
sent_expect_ct_reports_cache_.Clear();
|
||||
}
|
||||
|
||||
-// static
|
||||
-bool TransportSecurityState::IsBuildTimely() {
|
||||
+// Returns true if the current build is recent enough to ensure that
|
||||
+// built-in security information (e.g. CT Logs) is fresh enough.
|
||||
+bool TransportSecurityState::IsBuildTimely() const {
|
||||
+ if (!enforce_net_security_expiration_)
|
||||
+ return true;
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git net/url_request/url_request.h net/url_request/url_request.h
|
||||
index b264ca045f24..1746e0588926 100644
|
||||
index f6043de481fa..ca4d2472f572 100644
|
||||
--- net/url_request/url_request.h
|
||||
+++ net/url_request/url_request.h
|
||||
@@ -748,10 +748,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
|
||||
@@ -782,10 +782,10 @@ class NET_EXPORT URLRequest : public base::SupportsUserData {
|
||||
|
||||
base::WeakPtr<URLRequest> GetWeakPtr();
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
diff --git BUILD.gn BUILD.gn
|
||||
index 83fc631bd..26b675d64 100644
|
||||
index 42f20931a..2a14a60e7 100644
|
||||
--- BUILD.gn
|
||||
+++ BUILD.gn
|
||||
@@ -212,6 +212,10 @@ jumbo_static_library("pdfium") {
|
||||
complete_static_lib = true
|
||||
configs -= [ "//build/config/compiler:thin_archive" ]
|
||||
@@ -199,6 +199,10 @@ jumbo_component("pdfium") {
|
||||
if (is_component_build) {
|
||||
deps += [ "testing/fuzzers:fuzzer_impls" ]
|
||||
}
|
||||
+
|
||||
+ include_dirs = [
|
||||
@ -14,10 +14,10 @@ index 83fc631bd..26b675d64 100644
|
||||
|
||||
# Targets below this are only visible within this file (and to the
|
||||
diff --git fpdfsdk/fpdf_view.cpp fpdfsdk/fpdf_view.cpp
|
||||
index 9b1e84b63..73f04bc68 100644
|
||||
index 63374d2e9..7e9c32146 100644
|
||||
--- fpdfsdk/fpdf_view.cpp
|
||||
+++ fpdfsdk/fpdf_view.cpp
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -39,6 +39,7 @@
|
||||
#include "fpdfsdk/cpdfsdk_helpers.h"
|
||||
#include "fpdfsdk/cpdfsdk_pageview.h"
|
||||
#include "fpdfsdk/ipdfsdk_pauseadapter.h"
|
||||
@ -25,7 +25,7 @@ index 9b1e84b63..73f04bc68 100644
|
||||
#include "fxjs/ijs_runtime.h"
|
||||
#include "public/fpdf_formfill.h"
|
||||
#include "third_party/base/ptr_util.h"
|
||||
@@ -183,6 +184,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
|
||||
@@ -184,6 +185,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_DestroyLibrary() {
|
||||
|
||||
CPDF_ModuleMgr::Destroy();
|
||||
CFX_GEModule::Destroy();
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h
|
||||
index 24bded9417c5..cb5d04ab32ab 100644
|
||||
index 9ad8ad0bfa50..2724dab2f003 100644
|
||||
--- content/public/common/common_param_traits_macros.h
|
||||
+++ content/public/common/common_param_traits_macros.h
|
||||
@@ -189,6 +189,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences)
|
||||
@@ -188,6 +188,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,10 +11,10 @@ index 24bded9417c5..cb5d04ab32ab 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 1822036e406d..b5f0e63d0b37 100644
|
||||
index e2f3d5b5e1f9..3bf01af841ac 100644
|
||||
--- content/public/common/web_preferences.cc
|
||||
+++ content/public/common/web_preferences.cc
|
||||
@@ -169,6 +169,7 @@ WebPreferences::WebPreferences()
|
||||
@@ -168,6 +168,7 @@ WebPreferences::WebPreferences()
|
||||
spatial_navigation_enabled(false),
|
||||
use_solid_color_scrollbars(false),
|
||||
navigate_on_drag_drop(true),
|
||||
@ -23,10 +23,10 @@ index 1822036e406d..b5f0e63d0b37 100644
|
||||
record_whole_document(false),
|
||||
cookie_enabled(true),
|
||||
diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h
|
||||
index a83015f3629a..fe79480e9af7 100644
|
||||
index f9a996476d5d..09d69329e037 100644
|
||||
--- content/public/common/web_preferences.h
|
||||
+++ content/public/common/web_preferences.h
|
||||
@@ -185,6 +185,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
@@ -184,6 +184,7 @@ struct CONTENT_EXPORT WebPreferences {
|
||||
bool spatial_navigation_enabled;
|
||||
bool use_solid_color_scrollbars;
|
||||
bool navigate_on_drag_drop;
|
||||
@ -35,10 +35,10 @@ index a83015f3629a..fe79480e9af7 100644
|
||||
bool record_whole_document;
|
||||
|
||||
diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc
|
||||
index 3e328daa5827..7d0869aa29fd 100644
|
||||
index 1aa52af90279..e3107e93c866 100644
|
||||
--- content/renderer/render_view_impl.cc
|
||||
+++ content/renderer/render_view_impl.cc
|
||||
@@ -1026,6 +1026,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
@@ -1012,6 +1012,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs,
|
||||
#endif
|
||||
|
||||
WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available);
|
||||
|
@ -1,3 +1,42 @@
|
||||
diff --git chrome/app/builtin_service_manifests.cc chrome/app/builtin_service_manifests.cc
|
||||
index 6c9c779d785e..6032d42122d3 100644
|
||||
--- chrome/app/builtin_service_manifests.cc
|
||||
+++ chrome/app/builtin_service_manifests.cc
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "chrome/common/constants.mojom.h"
|
||||
#include "chrome/services/file_util/public/cpp/manifest.h"
|
||||
#include "chrome/services/noop/public/cpp/manifest.h"
|
||||
+#include "chrome/services/printing/public/cpp/manifest.h"
|
||||
#include "components/services/patch/public/cpp/manifest.h"
|
||||
#include "components/services/quarantine/public/cpp/manifest.h"
|
||||
#include "components/services/unzip/public/cpp/manifest.h"
|
||||
@@ -60,10 +61,6 @@
|
||||
#include "components/services/pdf_compositor/public/cpp/manifest.h" // nogncheck
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
-#include "chrome/services/printing/public/cpp/manifest.h"
|
||||
-#endif
|
||||
-
|
||||
#if BUILDFLAG(ENABLE_ISOLATED_XR_SERVICE)
|
||||
#include "chrome/services/isolated_xr_device/manifest.h"
|
||||
#endif
|
||||
diff --git chrome/app/printing_strings.grdp chrome/app/printing_strings.grdp
|
||||
index c7533c13e863..7578f9b6ae71 100644
|
||||
--- chrome/app/printing_strings.grdp
|
||||
+++ chrome/app/printing_strings.grdp
|
||||
@@ -1,11 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Printing specific strings (included from generated_resources.grd). -->
|
||||
<grit-part>
|
||||
- <if expr="enable_print_preview or is_win">
|
||||
<message name="IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME" desc="The name of the utility process used for printing conversions.">
|
||||
Printing Service
|
||||
</message>
|
||||
- </if>
|
||||
|
||||
<message name="IDS_PRINT_INVALID_PRINTER_SETTINGS" desc="Message to display when selected printer is not reachable or its settings are invalid.">
|
||||
The selected printer is not available or not installed correctly. Check your printer or try selecting another printer.
|
||||
diff --git chrome/browser/ui/cocoa/applescript/tab_applescript.mm chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||
index d4c9283b3cef..4a91987bfe7f 100644
|
||||
--- chrome/browser/ui/cocoa/applescript/tab_applescript.mm
|
||||
@ -242,7 +281,7 @@ index 1802034a6e15..ae0d479ecafa 100644
|
||||
|
||||
#endif // COMPONENTS_PRINTING_COMMON_PRINT_MESSAGES_H_
|
||||
diff --git components/printing/renderer/print_render_frame_helper.cc components/printing/renderer/print_render_frame_helper.cc
|
||||
index eb717d8d4be3..ddaa19d8d241 100644
|
||||
index 74f26daa76a2..61a02b46e5a6 100644
|
||||
--- components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -351,7 +351,6 @@ bool IsPrintingNodeOrPdfFrame(const blink::WebLocalFrame* frame,
|
||||
@ -310,7 +349,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
void PrintRenderFrameHelper::OnPrintPreview(
|
||||
const base::DictionaryValue& settings) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
@@ -1488,7 +1479,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor(
|
||||
@@ -1487,7 +1478,6 @@ int PrintRenderFrameHelper::GetFitToPageScaleFactor(
|
||||
printable_height / static_cast<double>(uniform_page_size.height);
|
||||
return static_cast<int>(100.0f * std::min(scale_width, scale_height));
|
||||
}
|
||||
@ -318,7 +357,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
|
||||
void PrintRenderFrameHelper::OnPrintingDone(bool success) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
@@ -1503,7 +1493,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
|
||||
@@ -1502,7 +1492,6 @@ void PrintRenderFrameHelper::OnSetPrintingEnabled(bool enabled) {
|
||||
is_printing_enabled_ = enabled;
|
||||
}
|
||||
|
||||
@ -326,7 +365,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1514,7 +1503,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
@@ -1513,7 +1502,9 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
// that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
if (!plugin.IsNull()) {
|
||||
@ -336,7 +375,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
return;
|
||||
}
|
||||
print_preview_context_.InitWithFrame(frame);
|
||||
@@ -1526,7 +1517,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
@@ -1525,7 +1516,6 @@ void PrintRenderFrameHelper::OnInitiatePrintPreview(bool has_selection) {
|
||||
void PrintRenderFrameHelper::OnClosePrintPreviewDialog() {
|
||||
print_preview_context_.source_frame()->DispatchAfterPrintEvent();
|
||||
}
|
||||
@ -344,7 +383,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
|
||||
void PrintRenderFrameHelper::OnPrintFrameContent(
|
||||
const PrintMsg_PrintFrame_Params& params) {
|
||||
@@ -1610,11 +1600,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1609,11 +1599,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
print_node_in_progress_ = true;
|
||||
|
||||
@ -357,7 +396,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
} else {
|
||||
// Make a copy of the node, in case RenderView::OnContextMenuClosed() resets
|
||||
// its |context_menu_node_|.
|
||||
@@ -1690,13 +1678,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -1689,13 +1677,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
|
||||
int cookie =
|
||||
print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
|
||||
@ -371,7 +410,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
switch (result) {
|
||||
case OK:
|
||||
break;
|
||||
@@ -1711,7 +1697,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
|
||||
@@ -1710,7 +1696,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
|
||||
}
|
||||
break;
|
||||
|
||||
@ -379,7 +418,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
case FAIL_PREVIEW:
|
||||
if (!is_print_ready_metafile_sent_) {
|
||||
if (notify_browser_of_print_failure_) {
|
||||
@@ -1729,7 +1714,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
|
||||
@@ -1728,7 +1713,6 @@ void PrintRenderFrameHelper::DidFinishPrinting(PrintingResult result) {
|
||||
cookie, ids));
|
||||
print_preview_context_.Failed(false);
|
||||
break;
|
||||
@ -387,7 +426,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
}
|
||||
prep_frame_view_.reset();
|
||||
print_pages_params_.reset();
|
||||
@@ -1902,7 +1886,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
@@ -1901,7 +1885,6 @@ bool PrintRenderFrameHelper::CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -395,7 +434,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
bool PrintRenderFrameHelper::SetOptionsFromPdfDocument(
|
||||
PrintHostMsg_SetOptionsFromDocument_Params* options) {
|
||||
blink::WebLocalFrame* source_frame = print_preview_context_.source_frame();
|
||||
@@ -1987,7 +1970,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
|
||||
@@ -1986,7 +1969,6 @@ bool PrintRenderFrameHelper::UpdatePrintSettings(
|
||||
print_preview_context_.set_error(PREVIEW_ERROR_INVALID_PRINTER_SETTINGS);
|
||||
return false;
|
||||
}
|
||||
@ -403,7 +442,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
|
||||
void PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
blink::WebLocalFrame* frame,
|
||||
@@ -2139,7 +2121,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem(
|
||||
@@ -2138,7 +2120,6 @@ bool PrintRenderFrameHelper::CopyMetafileDataToReadOnlySharedMem(
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -411,7 +450,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
void PrintRenderFrameHelper::ShowScriptedPrintPreview() {
|
||||
if (is_scripted_preview_delayed_) {
|
||||
is_scripted_preview_delayed_ = false;
|
||||
@@ -2265,7 +2246,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(
|
||||
@@ -2264,7 +2245,6 @@ bool PrintRenderFrameHelper::PreviewPageRendered(
|
||||
Send(new PrintHostMsg_DidPreviewPage(routing_id(), preview_page_params, ids));
|
||||
return true;
|
||||
}
|
||||
@ -420,7 +459,7 @@ index eb717d8d4be3..ddaa19d8d241 100644
|
||||
PrintRenderFrameHelper::PrintPreviewContext::PrintPreviewContext() = default;
|
||||
|
||||
diff --git components/printing/renderer/print_render_frame_helper.h components/printing/renderer/print_render_frame_helper.h
|
||||
index c4effb05d16c..5d225dcab071 100644
|
||||
index 1e2777561ba6..21c3777010b6 100644
|
||||
--- components/printing/renderer/print_render_frame_helper.h
|
||||
+++ components/printing/renderer/print_render_frame_helper.h
|
||||
@@ -150,10 +150,8 @@ class PrintRenderFrameHelper
|
||||
@ -454,7 +493,7 @@ index c4effb05d16c..5d225dcab071 100644
|
||||
// Prepare frame for creating preview document.
|
||||
void PrepareFrameForPreviewDocument();
|
||||
|
||||
@@ -233,7 +228,6 @@ class PrintRenderFrameHelper
|
||||
@@ -232,7 +227,6 @@ class PrintRenderFrameHelper
|
||||
|
||||
// Helper method to calculate the scale factor for fit-to-page.
|
||||
int GetFitToPageScaleFactor(const gfx::Rect& printable_area_in_points);
|
||||
@ -462,7 +501,7 @@ index c4effb05d16c..5d225dcab071 100644
|
||||
|
||||
// Enable/Disable printing.
|
||||
void OnSetPrintingEnabled(bool enabled);
|
||||
@@ -260,7 +254,6 @@ class PrintRenderFrameHelper
|
||||
@@ -259,7 +253,6 @@ class PrintRenderFrameHelper
|
||||
const blink::WebNode& node,
|
||||
int* number_of_pages);
|
||||
|
||||
@ -470,7 +509,7 @@ index c4effb05d16c..5d225dcab071 100644
|
||||
// Set options for print preset from source PDF document.
|
||||
bool SetOptionsFromPdfDocument(
|
||||
PrintHostMsg_SetOptionsFromDocument_Params* options);
|
||||
@@ -271,7 +264,6 @@ class PrintRenderFrameHelper
|
||||
@@ -270,7 +263,6 @@ class PrintRenderFrameHelper
|
||||
bool UpdatePrintSettings(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
const base::DictionaryValue& passed_job_settings);
|
||||
@ -478,7 +517,7 @@ index c4effb05d16c..5d225dcab071 100644
|
||||
|
||||
// Get final print settings from the user.
|
||||
// WARNING: |this| may be gone after this method returns.
|
||||
@@ -353,7 +345,6 @@ class PrintRenderFrameHelper
|
||||
@@ -352,7 +344,6 @@ class PrintRenderFrameHelper
|
||||
bool IsScriptInitiatedPrintAllowed(blink::WebLocalFrame* frame,
|
||||
bool user_initiated);
|
||||
|
||||
@ -486,7 +525,7 @@ index c4effb05d16c..5d225dcab071 100644
|
||||
// Shows scripted print preview when options from plugin are available.
|
||||
void ShowScriptedPrintPreview();
|
||||
|
||||
@@ -372,7 +363,6 @@ class PrintRenderFrameHelper
|
||||
@@ -371,7 +362,6 @@ class PrintRenderFrameHelper
|
||||
// Returns true if print preview should continue, false on failure.
|
||||
bool PreviewPageRendered(int page_number,
|
||||
std::unique_ptr<MetafileSkia> metafile);
|
||||
@ -494,7 +533,7 @@ index c4effb05d16c..5d225dcab071 100644
|
||||
|
||||
void SetPrintPagesParams(const PrintMsg_PrintPages_Params& settings);
|
||||
|
||||
@@ -527,6 +517,7 @@ class PrintRenderFrameHelper
|
||||
@@ -526,6 +516,7 @@ class PrintRenderFrameHelper
|
||||
ScriptingThrottler scripting_throttler_;
|
||||
|
||||
bool print_node_in_progress_ = false;
|
||||
@ -503,10 +542,10 @@ index c4effb05d16c..5d225dcab071 100644
|
||||
bool is_loading_ = false;
|
||||
bool is_scripted_preview_delayed_ = false;
|
||||
diff --git components/printing_component_strings.grdp components/printing_component_strings.grdp
|
||||
index f157cbaec42e..5e3c3caa2aa2 100644
|
||||
index f3cbf563dee3..d899aab89dfd 100644
|
||||
--- components/printing_component_strings.grdp
|
||||
+++ components/printing_component_strings.grdp
|
||||
@@ -1,10 +1,8 @@
|
||||
@@ -1,12 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<grit-part>
|
||||
- <if expr="enable_print_preview">
|
||||
@ -516,7 +555,9 @@ index f157cbaec42e..5e3c3caa2aa2 100644
|
||||
</message>
|
||||
</if>
|
||||
- </if>
|
||||
</grit-part>
|
||||
|
||||
<message name="IDS_PDF_COMPOSITOR_SERVICE_DISPLAY_NAME" desc="The display name (in the system task manager, etc) of the service process used for PDF compositing.">
|
||||
PDF Compositor Service
|
||||
diff --git components/pwg_encoder/BUILD.gn components/pwg_encoder/BUILD.gn
|
||||
index 96ae254116a9..3697d6034300 100644
|
||||
--- components/pwg_encoder/BUILD.gn
|
||||
|
@ -11,10 +11,10 @@ index 691c476708b6..f198e2d0584f 100644
|
||||
|
||||
PrintJobWorker::~PrintJobWorker() {
|
||||
diff --git printing/printing_context.h printing/printing_context.h
|
||||
index a5879b5888c9..a46bfa474f47 100644
|
||||
index 9ccc1a6680bc..c0494a1cc2e2 100644
|
||||
--- printing/printing_context.h
|
||||
+++ printing/printing_context.h
|
||||
@@ -131,6 +131,13 @@ class PRINTING_EXPORT PrintingContext {
|
||||
@@ -129,6 +129,13 @@ class PRINTING_EXPORT PrintingContext {
|
||||
|
||||
int job_id() const { return job_id_; }
|
||||
|
||||
@ -28,7 +28,7 @@ index a5879b5888c9..a46bfa474f47 100644
|
||||
protected:
|
||||
explicit PrintingContext(Delegate* delegate);
|
||||
|
||||
@@ -155,6 +162,10 @@ class PRINTING_EXPORT PrintingContext {
|
||||
@@ -153,6 +160,10 @@ class PRINTING_EXPORT PrintingContext {
|
||||
// The job id for the current job. The value is 0 if no jobs are active.
|
||||
int job_id_;
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git build/config/compiler/compiler.gni build/config/compiler/compiler.gni
|
||||
index 3bdd85bf9758..b326e808f929 100644
|
||||
index c351d6babb8d..db5b4f0b973a 100644
|
||||
--- build/config/compiler/compiler.gni
|
||||
+++ build/config/compiler/compiler.gni
|
||||
@@ -250,18 +250,6 @@ if (symbol_level == -1) {
|
||||
@@ -248,18 +248,6 @@ if (symbol_level == -1) {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git chrome/browser/renderer_preferences_util.cc chrome/browser/renderer_preferences_util.cc
|
||||
index f5ed7f0683c5..5b31fb309985 100644
|
||||
index 9008f3e280f2..71e21c813637 100644
|
||||
--- chrome/browser/renderer_preferences_util.cc
|
||||
+++ chrome/browser/renderer_preferences_util.cc
|
||||
@@ -29,7 +29,8 @@
|
||||
@@ -30,7 +30,8 @@
|
||||
#include "ui/base/cocoa/defaults_utils.h"
|
||||
#endif
|
||||
|
||||
@ -12,7 +12,7 @@ index f5ed7f0683c5..5b31fb309985 100644
|
||||
#include "chrome/browser/themes/theme_service.h"
|
||||
#include "chrome/browser/themes/theme_service_factory.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
@@ -129,7 +130,8 @@ void UpdateFromSystemSettings(blink::mojom::RendererPreferences* prefs,
|
||||
@@ -130,7 +131,8 @@ void UpdateFromSystemSettings(blink::mojom::RendererPreferences* prefs,
|
||||
prefs->caret_blink_interval = interval;
|
||||
#endif
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
|
||||
index 340291d8c8f3..34abefbd1c77 100644
|
||||
index ab883f7cb8bb..ca12051438e2 100644
|
||||
--- ui/base/resource/resource_bundle.cc
|
||||
+++ ui/base/resource/resource_bundle.cc
|
||||
@@ -716,6 +716,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
@@ -725,6 +725,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
|
||||
: delegate_(delegate),
|
||||
locale_resources_data_lock_(new base::Lock),
|
||||
max_scale_factor_(SCALE_FACTOR_100P) {
|
||||
@ -15,7 +15,7 @@ index 340291d8c8f3..34abefbd1c77 100644
|
||||
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kMangleLocalizedStrings);
|
||||
}
|
||||
@@ -725,6 +731,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
@@ -734,6 +740,11 @@ ResourceBundle::~ResourceBundle() {
|
||||
UnloadLocaleResources();
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ index 340291d8c8f3..34abefbd1c77 100644
|
||||
void ResourceBundle::InitSharedInstance(Delegate* delegate) {
|
||||
DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice";
|
||||
diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h
|
||||
index 1f0f0b575e44..b3f8d28b7a6e 100644
|
||||
index 23005f6da221..3c87746c5a3d 100644
|
||||
--- ui/base/resource/resource_bundle.h
|
||||
+++ ui/base/resource/resource_bundle.h
|
||||
@@ -150,6 +150,11 @@ class UI_BASE_EXPORT ResourceBundle {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 8ab45cb1bb32..ddf13a935ee2 100644
|
||||
index b54aedcb4282..ea7de4d815ab 100644
|
||||
--- content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -742,10 +742,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
@@ -700,10 +700,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
|
||||
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
|
||||
DCHECK(GetBackgroundColor());
|
||||
|
||||
@ -19,10 +19,11 @@ index 8ab45cb1bb32..ddf13a935ee2 100644
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewAura::WindowTitleChanged() {
|
||||
@@ -2108,6 +2110,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
@@ -2037,6 +2039,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
|
||||
// Init(), because it needs to have the layer.
|
||||
if (frame_sink_id_.is_valid())
|
||||
window_->SetEmbedFrameSinkId(frame_sink_id_);
|
||||
|
||||
+
|
||||
+ // Do this after |window_| is created to avoid crashes on Win10.
|
||||
+ // See https://crbug.com/761389.
|
||||
+ RenderViewHost* rvh = RenderViewHost::From(host_);
|
||||
@ -31,7 +32,6 @@ index 8ab45cb1bb32..ddf13a935ee2 100644
|
||||
+ // first to rebaseline some unreliable layout tests.
|
||||
+ ignore_result(rvh->GetWebkitPreferences());
|
||||
+ }
|
||||
+
|
||||
if (!features::IsMultiProcessMash())
|
||||
return;
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewAura::CreateDelegatedFrameHostClient() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git services/service_manager/embedder/main.cc services/service_manager/embedder/main.cc
|
||||
index 2f1c18044c35..479cb45f09e1 100644
|
||||
index 0d1fa74a3f43..11c7b62ac2ad 100644
|
||||
--- services/service_manager/embedder/main.cc
|
||||
+++ services/service_manager/embedder/main.cc
|
||||
@@ -233,22 +233,36 @@ int RunService(MainDelegate* delegate) {
|
||||
@@ -240,22 +240,36 @@ int RunService(MainDelegate* delegate) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ index 2f1c18044c35..479cb45f09e1 100644
|
||||
|
||||
// A flag to indicate whether Main() has been called before. On Android, we
|
||||
// may re-run Main() without restarting the browser process. This flag
|
||||
@@ -334,12 +348,7 @@ int Main(const MainParams& params) {
|
||||
@@ -341,12 +355,7 @@ int Main(const MainParams& params) {
|
||||
MainDelegate::InitializeParams init_params;
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
@ -57,7 +57,7 @@ index 2f1c18044c35..479cb45f09e1 100644
|
||||
InitializeMac();
|
||||
#endif
|
||||
|
||||
@@ -383,18 +392,16 @@ int Main(const MainParams& params) {
|
||||
@@ -390,18 +399,16 @@ int Main(const MainParams& params) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ index 2f1c18044c35..479cb45f09e1 100644
|
||||
switch (process_type) {
|
||||
case ProcessType::kDefault:
|
||||
NOTREACHED();
|
||||
@@ -416,6 +423,8 @@ int Main(const MainParams& params) {
|
||||
@@ -423,6 +430,8 @@ int Main(const MainParams& params) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ index 2f1c18044c35..479cb45f09e1 100644
|
||||
if (tracker) {
|
||||
if (exit_code == 0) {
|
||||
tracker->SetProcessPhaseIfEnabled(
|
||||
@@ -427,13 +436,38 @@ int Main(const MainParams& params) {
|
||||
@@ -434,13 +443,38 @@ int Main(const MainParams& params) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ index 2f1c18044c35..479cb45f09e1 100644
|
||||
+ params.autorelease_pool =
|
||||
+ std::make_unique<base::mac::ScopedNSAutoreleasePool>();
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+ int exit_code = MainInitialize(params);
|
||||
+ if (exit_code >= 0)
|
||||
+ return exit_code;
|
||||
|
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