chore: bump chromium to 113.0.5653.0 (main) (#37587)

* chore: bump chromium in DEPS to 113.0.5653.0

* chore: update patches

* [Extensions c2s] Move HasActiveTabAndCanAccess() to //extensions

https://chromium-review.googlesource.com/c/chromium/src/+/4305558

* [Privacy Hub] Respecting ChromeOS geoloc setting

https://chromium-review.googlesource.com/c/chromium/src/+/4171824

* Add runtime DLLs to win_clang_x64 when needed

https://chromium-review.googlesource.com/c/chromium/src/+/4336228

* chore: fix lint

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
electron-roller[bot] 2023-03-16 19:03:53 +09:00 коммит произвёл GitHub
Родитель c5fc5efc00
Коммит 48d0b09ad9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
25 изменённых файлов: 96 добавлений и 59 удалений

2
DEPS
Просмотреть файл

@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'113.0.5651.0',
'113.0.5653.0',
'node_version':
'v18.15.0',
'nan_version':

Просмотреть файл

@ -126,3 +126,4 @@ expose_v8initializer_codegenerationcheckcallbackinmainthread.patch
chore_patch_out_profile_methods_in_profile_selections_cc.patch
chore_defer_usb_service_getdevices_request_until_usb_service_is.patch
revert_roll_clang_rust_llvmorg-16-init-17653-g39da55e8-3.patch
fix_copying_of_runtime_dlls_to_win_clang_x64.patch

Просмотреть файл

@ -9,10 +9,10 @@ and can be removed when the crash in fork is resolved.
Related issue: https://github.com/electron/electron/issues/32718
diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni
index e90ccba879dc5823c15acf35869cd5bd211b717b..a95d2b46b37e007405cd472bd9f882c1d180d809 100644
index c2f7bd2958ed447f23d9b45bf09c8ed47c88c5e7..681a8d2b829eba05e77d2904e8a27d8d983a4a75 100644
--- a/build_overrides/partition_alloc.gni
+++ b/build_overrides/partition_alloc.gni
@@ -46,7 +46,7 @@ _disable_partition_alloc_everywhere = is_component_build || (is_win && is_debug)
@@ -45,7 +45,7 @@ _disable_partition_alloc_everywhere = is_component_build || (is_win && is_debug)
if (is_ios) {
_is_partition_alloc_everywhere_platform = ios_partition_alloc_enabled
} else {

Просмотреть файл

@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 9175a59085ffd7a2225e09ad03806782cc54879b..7d0b7950d812775a44509a722460b74d0b17a61c 100644
index 219f004962f0fbbe1548d8bab19c964bcc554e9b..088b7cd6578593d0ace8683765ce77202cbf1313 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -186,11 +186,16 @@ if (!is_android && !is_mac) {
@ -33,10 +33,10 @@ index 9175a59085ffd7a2225e09ad03806782cc54879b..7d0b7950d812775a44509a722460b74d
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 123c9b677eb9d00aa96193020528cd5f77b0f88c..1c09eeaeda7c375f4e17e3b4c12639dac3c8e684 100644
index c88ed72dc5f9c7dca220dd3fa630cd722d7f5f10..51ab002d7bb1c335ae115b9477914f0fd7156c2f 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4593,7 +4593,7 @@ static_library("browser") {
@@ -4581,7 +4581,7 @@ static_library("browser") {
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
# than here in :chrome_dll.
@ -46,10 +46,10 @@ index 123c9b677eb9d00aa96193020528cd5f77b0f88c..1c09eeaeda7c375f4e17e3b4c12639da
sources += [ "certificate_viewer_stub.cc" ]
}
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index e3c84cbb1cbe5025457cf7ab1fffddcc1094b505..7466a0139f4bb6ad6f0f60e6cfe3cc88a07e5645 100644
index de01d238eee9cccf8f5655d0f3f3ab7fcd90ca59..dae4137d8930d0fda68fdc69ae08320de7006e78 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -6366,7 +6366,6 @@ test("unit_tests") {
@@ -6364,7 +6364,6 @@ test("unit_tests") {
deps += [
"//chrome:other_version",
@ -57,7 +57,7 @@ index e3c84cbb1cbe5025457cf7ab1fffddcc1094b505..7466a0139f4bb6ad6f0f60e6cfe3cc88
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -6392,6 +6391,10 @@ test("unit_tests") {
@@ -6390,6 +6389,10 @@ test("unit_tests") {
"//ui/resources",
]
@ -76,7 +76,7 @@ index e3c84cbb1cbe5025457cf7ab1fffddcc1094b505..7466a0139f4bb6ad6f0f60e6cfe3cc88
"//chrome/browser/apps:icon_standardizer",
"//chrome/browser/apps/app_service",
"//chrome/browser/apps/app_service:test_support",
@@ -7380,6 +7382,10 @@ test("unit_tests") {
@@ -7381,6 +7383,10 @@ test("unit_tests") {
"//ui/webui/resources/js/browser_command:mojo_bindings",
]

Просмотреть файл

@ -6,7 +6,7 @@ Subject: build: only use the mas build config in the required components
Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
diff --git a/base/BUILD.gn b/base/BUILD.gn
index ea29e990f0b97f1d4a9a858e68b8dc11cd712afc..f064422ff964301d38dd99678630e2c74e47ebd4 100644
index 05565026676962f651992c0e09c7575073c412c9..b0c177dfc0c4b64027af1fe08096af2eccc93e31 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1027,6 +1027,7 @@ component("base") {

Просмотреть файл

@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 305cb9fc87c106d34e3eff78a3137229132ffc8c..5a9ac1a3757049be2dc86456ab83831a7894fda8 100644
index 33119c93000f739be6c3539ce39e8f763f051262..bc41363dcc0809a839ab33bd49b856ca3f7e8fbe 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -7607,6 +7607,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -7615,6 +7615,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,

Просмотреть файл

@ -7,10 +7,10 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
of explicitly adding ScopedAllowBlocking calls as friends.
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
index a79fd26d368810091b0537af90b972a61b464d1a..768c69572eb40dee103311ec6d6a0e535472d57c 100644
index 8b6b194a86ce78a3935c74c20a8305345b58bb8e..3f0391f2a1e3467735ab33f63a30eeddedfdb0e4 100644
--- a/base/threading/thread_restrictions.h
+++ b/base/threading/thread_restrictions.h
@@ -129,6 +129,7 @@ class FirefoxProfileLock;
@@ -133,6 +133,7 @@ class FirefoxProfileLock;
class KeyStorageLinux;
class NativeBackendKWallet;
class NativeDesktopMediaList;
@ -18,7 +18,7 @@ index a79fd26d368810091b0537af90b972a61b464d1a..768c69572eb40dee103311ec6d6a0e53
class Profile;
class ProfileImpl;
class StartupTabProviderImpl;
@@ -265,6 +266,9 @@ class BackendImpl;
@@ -269,6 +270,9 @@ class BackendImpl;
class InFlightIO;
bool CleanupDirectorySync(const base::FilePath&);
} // namespace disk_cache
@ -28,7 +28,7 @@ index a79fd26d368810091b0537af90b972a61b464d1a..768c69572eb40dee103311ec6d6a0e53
namespace enterprise_connectors {
class LinuxKeyRotationCommand;
} // namespace enterprise_connectors
@@ -551,6 +555,7 @@ class BASE_EXPORT [[nodiscard]] ScopedAllowBlocking {
@@ -573,6 +577,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
friend class ::DesktopNotificationBalloon;
friend class ::FirefoxProfileLock;
friend class ::GaiaConfig;
@ -36,7 +36,7 @@ index a79fd26d368810091b0537af90b972a61b464d1a..768c69572eb40dee103311ec6d6a0e53
friend class ::ProfileImpl;
friend class ::ScopedAllowBlockingForProfile;
friend class ::StartupTabProviderImpl;
@@ -588,6 +593,7 @@ class BASE_EXPORT [[nodiscard]] ScopedAllowBlocking {
@@ -610,6 +615,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
friend class crosapi::LacrosThreadTypeDelegate;
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
friend class drive::FakeDriveService;

Просмотреть файл

@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK.
It can be removed once/if we see a better solution to the problem.
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 4aa0eba7afffce096148e69006f58d4fcf65144d..e613a4919c08494852e59e7e524f01782f7bee26 100644
index eb4b4859c2d15f243e73eab9cad50cb74078229c..e75b612f65eef5c32ad9567e088484b57bb4b2a6 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -215,7 +215,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(

Просмотреть файл

@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
node initialization to not update flags after V8 initialization.
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index 6f5ed2f88ae7f725ae1862a3078540d54b9abd43..75093bc0c6b70002acd954b11952eac8a981e714 100644
index 94016c74d962d7e5459ff5457f276e6742146280..0ca99a62d1289f9eff38291bd7af23cefd9cf77d 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -227,6 +227,9 @@ RenderProcessImpl::RenderProcessImpl()
@@ -231,6 +231,9 @@ RenderProcessImpl::RenderProcessImpl()
v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag));
}

Просмотреть файл

@ -0,0 +1,35 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bruce Dawson <brucedawson@chromium.org>
Date: Wed, 15 Mar 2023 20:44:27 +0000
Subject: Fix copying of runtime DLLs to win_clang_x64
Change crrev.com/c/4336228 copied the x64 runtime DLLs to win_clang_x64
during arm64 builds, but for some of those DLLs (including
msvcp140d.dll) it copied the ARM64 version instead of the x64 version.
This prevents debug builds from building, but wasn't noticed until a
clean build was done.
This change fixes the runtime_dir so that the correct files are copied,
and this change was tested with a full build of a debug component
arm64 Windows build.
Bug: 1424422
Change-Id: I43106597059dc243af383dbdb0c3b23703034765
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4336046
Reviewed-by: Dirk Pranke <dpranke@google.com>
Auto-Submit: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/main@{#1117727}
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py
index eceea83f021573e6ba677904da3bb269a2279740..a9cd6f03d9214ad5077b10d4d76b878255266bdc 100755
--- a/build/vs_toolchain.py
+++ b/build/vs_toolchain.py
@@ -401,6 +401,7 @@ def CopyDlls(target_dir, configuration, target_cpu):
if target_cpu == 'arm64':
target_dir = os.path.join(target_dir, 'win_clang_x64')
target_cpu = 'x64'
+ runtime_dir = x64_runtime
os.makedirs(target_dir, exist_ok=True)
_CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False)
if configuration == 'Debug':

Просмотреть файл

@ -17,7 +17,7 @@ policy->CanCommitOriginAndUrl.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index c9d08d6ae25d1bb1c6a9512961d1671a150f267f..2d725df67c159ae1f8ff6ed7c384c457a552e0d3 100644
index ee847c685b75d48f942a78759ac3f8dd068ca104..0e1e0180739aef844581f3cfabe4c57db98cd4e4 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -7134,10 +7134,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {

Просмотреть файл

@ -6,7 +6,7 @@ Subject: fix: export zlib symbols
This patch sets ZLIB_DLL so that we properly export zlib symbols.
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
index d20c468260c86bd031f06ddc7b419f186adc2fca..2c1479ba23fca6d3a6d5f39f02c94b37b6b1477e 100644
index 5c215860aec16c1fdd15094b3af81b0eab94ea80..29883a2487b2e1bdc4742175dfec364a02ba233c 100644
--- a/third_party/zlib/BUILD.gn
+++ b/third_party/zlib/BUILD.gn
@@ -326,6 +326,10 @@ component("zlib") {

Просмотреть файл

@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
Allows embedder to intercept site instances created by chromium.
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 727d0d410cf945ba665c7445f1928750268460b0..eecf0f8c7047904702980ccc5f20854662ba1ef2 100644
index 9ffeee895d26666a3bf47f374f7b77818316d446..48f1431287e151106cca4c2a20b1d22105a28837 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -3725,6 +3725,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -3734,6 +3734,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}

Просмотреть файл

@ -52,7 +52,7 @@ Some alternatives to this patch:
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 931710cb0d5c9db6a85ffc580c3ef52d339c3413..9175a59085ffd7a2225e09ad03806782cc54879b 100644
index 949a855674a83db20c43982fb53f31df3bcfcd52..219f004962f0fbbe1548d8bab19c964bcc554e9b 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1553,7 +1553,7 @@ if (is_chrome_branded && !is_android) {
@ -74,6 +74,6 @@ index 931710cb0d5c9db6a85ffc580c3ef52d339c3413..9175a59085ffd7a2225e09ad03806782
+ }
+}
+
repack("browser_tests_pak") {
testonly = true
sources = [ "$root_gen_dir/chrome/webui_test_resources.pak" ]
if (!is_android) {
repack("browser_tests_pak") {
testonly = true

Просмотреть файл

@ -14,7 +14,7 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 5a9ac1a3757049be2dc86456ab83831a7894fda8..77d9a692286b742acfd9e3b57a3ed263de0e00b9 100644
index bc41363dcc0809a839ab33bd49b856ca3f7e8fbe..60e3cfee399582b722b7702f9ba519641cd2dfcc 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -6854,6 +6854,17 @@ void RenderFrameHostImpl::EnterFullscreen(

Просмотреть файл

@ -9,7 +9,7 @@ necessary for native modules to load.
Also, some fixes relating to mksnapshot on ARM.
diff --git a/BUILD.gn b/BUILD.gn
index c07a00d0bb1ca09aa20afdb46d5cfdfb04926fb6..fa95b49a5c0698f56f947db5bc28ba537a661261 100644
index 9be8aa4162819f3ef71c4ee6d761a889e727e51c..f75829682551c174fdd9f7147cabf2b046f2d74f 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -685,7 +685,7 @@ config("internal_config") {
@ -21,7 +21,7 @@ index c07a00d0bb1ca09aa20afdb46d5cfdfb04926fb6..fa95b49a5c0698f56f947db5bc28ba53
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -6335,7 +6335,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6359,7 +6359,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]

Просмотреть файл

@ -12,7 +12,7 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index 7502b01dfe856d1ba7f2672e7a57a26ac5ee3d69..890185dfd1f104cef3a51df56e64ef5729b63a5d 100644
index 31a32019635652010c84b5204e06107c4c014b94..79b459e4058ce1068bc2e580c9df993563c6a627 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -685,6 +685,10 @@ config("internal_config") {

Просмотреть файл

@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index fa95b49a5c0698f56f947db5bc28ba537a661261..7502b01dfe856d1ba7f2672e7a57a26ac5ee3d69 100644
index f75829682551c174fdd9f7147cabf2b046f2d74f..31a32019635652010c84b5204e06107c4c014b94 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -6347,7 +6347,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -6371,7 +6371,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

Просмотреть файл

@ -31,6 +31,7 @@
#include "net/proxy_resolution/proxy_config.h"
#include "net/proxy_resolution/proxy_config_service.h"
#include "net/proxy_resolution/proxy_config_with_annotation.h"
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
#include "services/network/public/cpp/network_switches.h"
#include "shell/common/electron_paths.h"
#include "shell/common/thread_restrictions.h"
@ -318,3 +319,12 @@ printing::PrintJobManager* BrowserProcessImpl::print_job_manager() {
StartupData* BrowserProcessImpl::startup_data() {
return nullptr;
}
device::GeolocationManager* BrowserProcessImpl::geolocation_manager() {
return geolocation_manager_.get();
}
void BrowserProcessImpl::SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) {
geolocation_manager_ = std::move(geolocation_manager);
}

Просмотреть файл

@ -105,12 +105,16 @@ class BrowserProcessImpl : public BrowserProcess {
const std::string& GetApplicationLocale() override;
printing::PrintJobManager* print_job_manager() override;
StartupData* startup_data() override;
device::GeolocationManager* geolocation_manager() override;
void SetGeolocationManager(
std::unique_ptr<device::GeolocationManager> geolocation_manager) override;
private:
#if BUILDFLAG(ENABLE_PRINTING)
std::unique_ptr<printing::PrintJobManager> print_job_manager_;
#endif
std::unique_ptr<PrefService> local_state_;
std::unique_ptr<device::GeolocationManager> geolocation_manager_;
std::string locale_;
std::string system_locale_;
};

Просмотреть файл

@ -249,7 +249,7 @@ enum class RenderProcessHostPrivilege {
bool AllowFileAccess(const std::string& extension_id,
content::BrowserContext* context) {
return base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kDisableExtensionsFileAccessCheck) ||
extensions::switches::kDisableExtensionsFileAccessCheck) ||
extensions::ExtensionPrefs::Get(context)->AllowFileAccess(
extension_id);
}
@ -1715,13 +1715,11 @@ void ElectronBrowserClient::RegisterBrowserInterfaceBindersForServiceWorker(
base::BindRepeating(&BindBadgeServiceForServiceWorker));
}
device::GeolocationManager* ElectronBrowserClient::GetGeolocationManager() {
#if BUILDFLAG(IS_MAC)
return browser_main_parts_->GetGeolocationManager();
#else
return nullptr;
#endif
device::GeolocationManager* ElectronBrowserClient::GetGeolocationManager() {
return g_browser_process->geolocation_manager();
}
#endif
content::HidDelegate* ElectronBrowserClient::GetHidDelegate() {
if (!hid_delegate_)

Просмотреть файл

@ -107,7 +107,9 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
content::WebAuthenticationDelegate* GetWebAuthenticationDelegate() override;
#if BUILDFLAG(IS_MAC)
device::GeolocationManager* GetGeolocationManager() override;
#endif
content::PlatformNotificationService* GetPlatformNotificationService();

Просмотреть файл

@ -99,7 +99,6 @@
#if BUILDFLAG(IS_MAC)
#include "components/os_crypt/keychain_password_mac.h"
#include "services/device/public/cpp/geolocation/geolocation_manager.h"
#include "shell/browser/ui/cocoa/views_delegate_mac.h"
#else
#include "shell/browser/ui/views/electron_views_delegate.h"
@ -674,12 +673,6 @@ ElectronBrowserMainParts::GetGeolocationControl() {
return geolocation_control_.get();
}
#if BUILDFLAG(IS_MAC)
device::GeolocationManager* ElectronBrowserMainParts::GetGeolocationManager() {
return geolocation_manager_.get();
}
#endif
IconManager* ElectronBrowserMainParts::GetIconManager() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!icon_manager_.get())

Просмотреть файл

@ -37,10 +37,6 @@ class Screen;
}
#endif
namespace device {
class GeolocationManager;
}
namespace ui {
class LinuxUiGetter;
}
@ -91,10 +87,6 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
// used to enable the location services once per client.
device::mojom::GeolocationControl* GetGeolocationControl();
#if BUILDFLAG(IS_MAC)
device::GeolocationManager* GetGeolocationManager();
#endif
// Returns handle to the class responsible for extracting file icons.
IconManager* GetIconManager();
@ -181,7 +173,6 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
mojo::Remote<device::mojom::GeolocationControl> geolocation_control_;
#if BUILDFLAG(IS_MAC)
std::unique_ptr<device::GeolocationManager> geolocation_manager_;
std::unique_ptr<display::ScopedNativeScreen> screen_;
#endif

Просмотреть файл

@ -10,6 +10,7 @@
#include "base/mac/foundation_util.h"
#include "base/path_service.h"
#include "services/device/public/cpp/geolocation/system_geolocation_source_mac.h"
#include "shell/browser/browser_process_impl.h"
#import "shell/browser/mac/electron_application.h"
#include "shell/browser/mac/electron_application_delegate.h"
#include "shell/common/electron_paths.h"
@ -31,8 +32,10 @@ void ElectronBrowserMainParts::PreCreateMainMessageLoop() {
setObject:@"NO"
forKey:@"NSTreatUnknownArgumentsAsOpen"];
geolocation_manager_ =
device::SystemGeolocationSourceMac::CreateGeolocationManagerOnMac();
if (!g_browser_process->geolocation_manager()) {
g_browser_process->SetGeolocationManager(
device::SystemGeolocationSourceMac::CreateGeolocationManagerOnMac());
}
}
void ElectronBrowserMainParts::FreeAppDelegate() {