blob: 901c04560061aa799c73135bb78c51b8fce8f4bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/device/geolocation/geolocation_config.h"
#include "base/bind.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
namespace device {
GeolocationConfig::GeolocationConfig() = default;
GeolocationConfig::~GeolocationConfig() = default;
// static
void GeolocationConfig::Create(
mojo::PendingReceiver<mojom::GeolocationConfig> receiver) {
mojo::MakeSelfOwnedReceiver(std::make_unique<GeolocationConfig>(),
std::move(receiver));
}
void GeolocationConfig::IsHighAccuracyLocationBeingCaptured(
IsHighAccuracyLocationBeingCapturedCallback callback) {
std::move(callback).Run(
GeolocationProvider::GetInstance()->HighAccuracyLocationInUse());
}
} // namespace device
|