fix: geolocation crashes electron on macOS (#29343) (#29913)

This commit is contained in:
Omar Kilani 2021-06-28 20:26:57 -07:00 committed by GitHub
parent 9142563748
commit 1b4ce6c69a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 1 deletions

View file

@ -93,6 +93,7 @@
#endif
#if defined(OS_MAC)
#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"
@ -553,6 +554,12 @@ ElectronBrowserMainParts::GetGeolocationControl() {
return geolocation_control_.get();
}
#if defined(OS_MAC)
device::GeolocationManager* ElectronBrowserMainParts::GetGeolocationManager() {
return geolocation_manager_.get();
}
#endif
IconManager* ElectronBrowserMainParts::GetIconManager() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
if (!icon_manager_.get())