Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: device/geolocation/geolocation_manager.cc

Issue 2975683002: Add GeolocationManager service (Closed)
Patch Set: Add GeolocationManager service Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "device/geolocation/geolocation_manager.h"
6
7 #include "base/bind.h"
8 #include "mojo/public/cpp/bindings/strong_binding.h"
9
10 namespace device {
11
12 GeolocationManager::GeolocationManager() {}
13
14 GeolocationManager::~GeolocationManager() {}
15
16 // static
17 void GeolocationManager::Create(
18 const service_manager::BindSourceInfo& source_info,
19 mojom::GeolocationManagerRequest request) {
20 mojo::MakeStrongBinding(base::MakeUnique<GeolocationManager>(),
21 std::move(request));
22 }
23
24 void GeolocationManager::IsHighAccuracyLocationBeingCaptured(
25 IsHighAccuracyLocationBeingCapturedCallback callback) {
26 bool high_accuracy =
27 GeolocationProvider::GetInstance()->HighAccuracyLocationInUse();
28 std::move(callback).Run(high_accuracy);
29 return;
30 }
31
32 } // namespace device
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698