chromium/third_party/blink/renderer/modules/geolocation/geolocation.cc

/*
 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All Rights Reserved.
 * Copyright (C) 2009 Torch Mobile, Inc.
 * Copyright 2010, The Android Open Source Project
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#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) {}

}  // namespace

// static
const char Geolocation::kSupplementName[] =;

// static
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) {}

}  // namespace blink