#include "third_party/blink/renderer/modules/geolocation/geolocation.h"
#include <optional>
#include "base/task/single_thread_task_runner.h"
#include "services/device/public/mojom/geoposition.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-blink.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/core/frame/deprecation/deprecation.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/navigator.h"
#include "third_party/blink/renderer/core/frame/performance_monitor.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/timing/epoch_time_stamp.h"
#include "third_party/blink/renderer/modules/geolocation/geolocation_coordinates.h"
#include "third_party/blink/renderer/modules/geolocation/geolocation_error.h"
#include "third_party/blink/renderer/platform/bindings/source_location.h"
namespace blink {
namespace {
const char kPermissionDeniedErrorMessage[] = …;
const char kFeaturePolicyErrorMessage[] = …;
const char kFeaturePolicyConsoleWarning[] = …;
Geoposition* CreateGeoposition(
const device::mojom::blink::Geoposition& position) { … }
GeolocationPositionError* CreatePositionError(
const device::mojom::blink::GeopositionError& error) { … }
static void ReportGeolocationViolation(LocalDOMWindow* window) { … }
bool ValidateGeoposition(const device::mojom::blink::Geoposition& position) { … }
}
const char Geolocation::kSupplementName[] = …;
Geolocation* Geolocation::geolocation(Navigator& navigator) { … }
Geolocation::Geolocation(Navigator& navigator)
: … { … }
Geolocation::~Geolocation() = default;
void Geolocation::Trace(Visitor* visitor) const { … }
LocalFrame* Geolocation::GetFrame() const { … }
void Geolocation::ContextDestroyed() { … }
void Geolocation::RecordOriginTypeAccess() const { … }
void Geolocation::getCurrentPosition(V8PositionCallback* success_callback,
V8PositionErrorCallback* error_callback,
const PositionOptions* options) { … }
int Geolocation::watchPosition(V8PositionCallback* success_callback,
V8PositionErrorCallback* error_callback,
const PositionOptions* options) { … }
void Geolocation::StartRequest(GeoNotifier* notifier) { … }
void Geolocation::FatalErrorOccurred(GeoNotifier* notifier) { … }
void Geolocation::RequestUsesCachedPosition(GeoNotifier* notifier) { … }
void Geolocation::RequestTimedOut(GeoNotifier* notifier) { … }
bool Geolocation::DoesOwnNotifier(GeoNotifier* notifier) const { … }
bool Geolocation::HaveSuitableCachedPosition(const PositionOptions* options) { … }
void Geolocation::clearWatch(int watch_id) { … }
void Geolocation::StopTimers() { … }
void Geolocation::HandleError(GeolocationPositionError* error) { … }
void Geolocation::MakeSuccessCallbacks() { … }
void Geolocation::PositionChanged() { … }
void Geolocation::StartUpdating(GeoNotifier* notifier) { … }
void Geolocation::StopUpdating() { … }
void Geolocation::UpdateGeolocationConnection(GeoNotifier* notifier) { … }
void Geolocation::QueryNextPosition() { … }
void Geolocation::OnPositionUpdated(
device::mojom::blink::GeopositionResultPtr result) { … }
void Geolocation::PageVisibilityChanged() { … }
bool Geolocation::HasPendingActivity() const { … }
void Geolocation::OnGeolocationConnectionError() { … }
void Geolocation::OnGeolocationPermissionStatusUpdated(
GeoNotifier* notifier,
mojom::PermissionStatus status) { … }
}