OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "device/geolocation/geolocation_provider_impl.h" | 8 #include "device/geolocation/geolocation_provider_impl.h" |
9 #include "device/geolocation/public/interfaces/geolocation.mojom.h" | 9 #include "device/geolocation/public/interfaces/geolocation.mojom.h" |
10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 void PauseUpdates(); | 35 void PauseUpdates(); |
36 void ResumeUpdates(); | 36 void ResumeUpdates(); |
37 | 37 |
38 // Enables and disables geolocation override. | 38 // Enables and disables geolocation override. |
39 void SetOverride(const Geoposition& position); | 39 void SetOverride(const Geoposition& position); |
40 void ClearOverride(); | 40 void ClearOverride(); |
41 | 41 |
42 private: | 42 private: |
43 // mojom::GeolocationService: | 43 // mojom::GeolocationService: |
44 void SetHighAccuracy(bool high_accuracy) override; | 44 void SetHighAccuracy(bool high_accuracy) override; |
45 void QueryNextPosition(const QueryNextPositionCallback& callback) override; | 45 void QueryNextPosition(QueryNextPositionCallback callback) override; |
46 | 46 |
47 void OnConnectionError(); | 47 void OnConnectionError(); |
48 | 48 |
49 void OnLocationUpdate(const Geoposition& position); | 49 void OnLocationUpdate(const Geoposition& position); |
50 void ReportCurrentPosition(); | 50 void ReportCurrentPosition(); |
51 | 51 |
52 // The binding between this object and the other end of the pipe. | 52 // The binding between this object and the other end of the pipe. |
53 mojo::Binding<mojom::GeolocationService> binding_; | 53 mojo::Binding<mojom::GeolocationService> binding_; |
54 | 54 |
55 // Owns this object. | 55 // Owns this object. |
(...skipping 14 matching lines...) Expand all Loading... |
70 bool high_accuracy_; | 70 bool high_accuracy_; |
71 | 71 |
72 bool has_position_to_report_; | 72 bool has_position_to_report_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceImpl); | 74 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceImpl); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace device | 77 } // namespace device |
78 | 78 |
79 #endif // DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_ | 79 #endif // DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_ |
OLD | NEW |