[iOS] Add GeolocationManager in iOS

GeolocationManager is owned by ShellBrowserMainParts on iOS and
shell_browser_main_parts_ios.mm is introduced to implement
GetGeolocationManager() method so that ShellContentBrowserClient can
get GeolocationManager from it.

`NSLocationWhenInUseUsageDescription` permission is added for
ContentShell on IOS to ask Geolocation permission.
If `kMacCoreLocationBackend` is enabled, it would work with
CoreLocation.framework on iOS as system LocationProvider

Bug: 1421221
Change-Id: Id7e8e382c8537238811b6ce05656bfd774258471
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4494918
Reviewed-by: Reilly Grant <[email protected]>
Commit-Queue: Julie Jeongeun Kim <[email protected]>
Reviewed-by: Dave Tapuska <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1146889}
diff --git a/content/shell/browser/shell_browser_main_parts.h b/content/shell/browser/shell_browser_main_parts.h
index 53f82fe..5338f4f4 100644
--- a/content/shell/browser/shell_browser_main_parts.h
+++ b/content/shell/browser/shell_browser_main_parts.h
@@ -12,6 +12,10 @@
 #include "content/public/browser/browser_main_parts.h"
 #include "content/shell/browser/shell_browser_context.h"
 
+#if BUILDFLAG(IS_IOS)
+#include "services/device/public/cpp/geolocation/geolocation_manager.h"
+#endif
+
 namespace performance_manager {
 class PerformanceManagerLifetime;
 }  // namespace performance_manager
@@ -52,6 +56,9 @@
       std::unique_ptr<base::RunLoop>& run_loop) override;
   void PostMainMessageLoopRun() override;
   void PostDestroyThreads() override;
+#if BUILDFLAG(IS_IOS)
+  device::GeolocationManager* GetGeolocationManager();
+#endif
 
   ShellBrowserContext* browser_context() { return browser_context_.get(); }
   ShellBrowserContext* off_the_record_browser_context() {
@@ -84,6 +91,9 @@
 #if BUILDFLAG(IS_FUCHSIA)
   std::unique_ptr<FuchsiaViewPresenter> fuchsia_view_presenter_;
 #endif
+#if BUILDFLAG(IS_IOS)
+  std::unique_ptr<device::GeolocationManager> geolocation_manager_;
+#endif
 };
 
 }  // namespace content