Chromium Code Reviews| Index: device/geolocation/geolocation_config.cc |
| diff --git a/device/geolocation/geolocation_config.cc b/device/geolocation/geolocation_config.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e1995f6b79efb3fe88018f1bc4e606ff367e07bd |
| --- /dev/null |
| +++ b/device/geolocation/geolocation_config.cc |
| @@ -0,0 +1,32 @@ |
| +// 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 "device/geolocation/geolocation_config.h" |
| + |
| +#include "base/bind.h" |
| +#include "mojo/public/cpp/bindings/strong_binding.h" |
| + |
| +namespace device { |
| + |
| +GeolocationConfig::GeolocationConfig() {} |
| + |
| +GeolocationConfig::~GeolocationConfig() {} |
| + |
| +// static |
| +void GeolocationConfig::Create( |
| + const service_manager::BindSourceInfo& source_info, |
| + mojom::GeolocationConfigRequest request) { |
| + mojo::MakeStrongBinding(base::MakeUnique<GeolocationConfig>(), |
| + std::move(request)); |
| +} |
| + |
| +void GeolocationConfig::IsHighAccuracyLocationBeingCaptured( |
| + IsHighAccuracyLocationBeingCapturedCallback callback) { |
| + bool high_accuracy = |
| + GeolocationProvider::GetInstance()->HighAccuracyLocationInUse(); |
|
blundell
2017/07/12 13:28:06
nit: just inline this call into the invocation of
asimjour1
2017/07/12 18:03:58
Done.
|
| + std::move(callback).Run(high_accuracy); |
| + return; |
|
blundell
2017/07/12 13:28:06
nit: eliminate the return
asimjour1
2017/07/12 18:03:58
Done.
|
| +} |
| + |
| +} // namespace device |