OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "blimp/engine/feature/geolocation/blimp_location_provider.h" | 5 #include "blimp/engine/feature/geolocation/blimp_location_provider.h" |
6 | 6 |
7 #include "content/public/common/geoposition.h" | 7 #include "device/geolocation/geoposition.h" |
8 | 8 |
9 namespace blimp { | 9 namespace blimp { |
10 namespace engine { | 10 namespace engine { |
11 | 11 |
12 BlimpLocationProvider::BlimpLocationProvider() {} | 12 BlimpLocationProvider::BlimpLocationProvider() {} |
13 | 13 |
14 BlimpLocationProvider::~BlimpLocationProvider() { | 14 BlimpLocationProvider::~BlimpLocationProvider() { |
15 StopProvider(); | 15 StopProvider(); |
16 } | 16 } |
17 | 17 |
18 bool BlimpLocationProvider::StartProvider(bool high_accuracy) { | 18 bool BlimpLocationProvider::StartProvider(bool high_accuracy) { |
19 NOTIMPLEMENTED(); | 19 NOTIMPLEMENTED(); |
20 return true; | 20 return true; |
21 } | 21 } |
22 | 22 |
23 void BlimpLocationProvider::StopProvider() { | 23 void BlimpLocationProvider::StopProvider() { |
24 } | 24 } |
25 | 25 |
26 void BlimpLocationProvider::GetPosition(content::Geoposition* position) { | 26 void BlimpLocationProvider::GetPosition(device::Geoposition* position) { |
27 DCHECK(position); | 27 DCHECK(position); |
28 | 28 |
29 *position = position_; | 29 *position = position_; |
30 } | 30 } |
31 | 31 |
32 void BlimpLocationProvider::RequestRefresh() { | 32 void BlimpLocationProvider::RequestRefresh() { |
33 NOTIMPLEMENTED(); | 33 NOTIMPLEMENTED(); |
34 } | 34 } |
35 | 35 |
36 void BlimpLocationProvider::OnPermissionGranted() { | 36 void BlimpLocationProvider::OnPermissionGranted() { |
37 RequestRefresh(); | 37 RequestRefresh(); |
38 NOTIMPLEMENTED(); | 38 NOTIMPLEMENTED(); |
39 } | 39 } |
40 | 40 |
41 void BlimpLocationProvider::NotifyCallback( | 41 void BlimpLocationProvider::NotifyCallback( |
42 const content::Geoposition& position) { | 42 const device::Geoposition& position) { |
43 DCHECK(!callback_.is_null()); | 43 DCHECK(!callback_.is_null()); |
44 | 44 |
45 callback_.Run(this, position); | 45 callback_.Run(this, position); |
46 } | 46 } |
47 | 47 |
48 void BlimpLocationProvider::OnLocationResponse( | 48 void BlimpLocationProvider::OnLocationResponse( |
49 const content::Geoposition& position) { | 49 const device::Geoposition& position) { |
50 NotifyCallback(position); | 50 NotifyCallback(position); |
51 NOTIMPLEMENTED(); | 51 NOTIMPLEMENTED(); |
52 } | 52 } |
53 | 53 |
54 void BlimpLocationProvider::SetUpdateCallback( | 54 void BlimpLocationProvider::SetUpdateCallback( |
55 const LocationProviderUpdateCallback& callback) { | 55 const LocationProviderUpdateCallback& callback) { |
56 DCHECK(!callback.is_null()); | 56 DCHECK(!callback.is_null()); |
57 | 57 |
58 callback_ = callback; | 58 callback_ = callback; |
59 } | 59 } |
60 | 60 |
61 } // namespace engine | 61 } // namespace engine |
62 } // namespace blimp | 62 } // namespace blimp |
OLD | NEW |