Index: blimp/client/core/geolocation/blimp_location_provider.h |
diff --git a/blimp/client/core/geolocation/blimp_location_provider.h b/blimp/client/core/geolocation/blimp_location_provider.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c0bf34eb129808c4f872f9fa0cdbad027e33c128 |
--- /dev/null |
+++ b/blimp/client/core/geolocation/blimp_location_provider.h |
@@ -0,0 +1,43 @@ |
+// Copyright 2016 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. |
+ |
+#ifndef BLIMP_CLIENT_CORE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ |
+#define BLIMP_CLIENT_CORE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ |
+ |
+#include <memory> |
+ |
+#include "device/geolocation/geolocation_delegate.h" |
+#include "device/geolocation/geoposition.h" |
+#include "device/geolocation/location_provider.h" |
+ |
+namespace blimp { |
+namespace client { |
+ |
+// Client-side location provider that handles frequency of geolocation updates. |
+class BlimpLocationProvider : public device::LocationProvider { |
Kevin M
2016/08/19 17:51:37
Perhaps we could provide it with a more descriptiv
CJ
2016/08/19 20:44:01
Done.
Wez
2016/08/19 23:12:10
This class is a pure LocationProvider proxy - it d
CJ
2016/08/22 20:28:08
I agree with moving it over to device/geolocation.
|
+ public: |
+ BlimpLocationProvider(); |
+ ~BlimpLocationProvider() override; |
+ |
+ // LocationProvider implemenation. |
+ void SetUpdateCallback( |
+ const LocationProviderUpdateCallback& callback) override; |
+ bool StartProvider(bool enable_high_accuracy) override; |
+ void StopProvider() override; |
+ const device::Geoposition& GetPosition() override; |
+ void OnPermissionGranted() override; |
+ |
+ private: |
+ void OnLocationUpdate(const device::Geoposition& new_position); |
Kevin M
2016/08/19 17:51:37
Comment this method
CJ
2016/08/19 20:44:01
Done.
|
+ |
+ std::unique_ptr<device::LocationProvider> location_provider_; |
+ LocationProvider::LocationProviderUpdateCallback feature_update_callback_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BlimpLocationProvider); |
+}; |
+ |
+} // namespace client |
+} // namespace blimp |
+ |
+#endif // BLIMP_CLIENT_CORE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ |