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

@ -39,6 +39,10 @@ class GtkUiPlatform;
}
#endif
namespace device {
class GeolocationManager;
} // namespace device
namespace electron {
class ElectronBrowserContext;
@ -83,6 +87,10 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
// used to enable the location services once per client.
device::mojom::GeolocationControl* GetGeolocationControl();
#if defined(OS_MAC)
device::GeolocationManager* GetGeolocationManager();
#endif
// Returns handle to the class responsible for extracting file icons.
IconManager* GetIconManager();
@ -161,6 +169,10 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
mojo::Remote<device::mojom::GeolocationControl> geolocation_control_;
#if defined(OS_MAC)
std::unique_ptr<device::GeolocationManager> geolocation_manager_;
#endif
static ElectronBrowserMainParts* self_;
DISALLOW_COPY_AND_ASSIGN(ElectronBrowserMainParts);