Chromium Code Reviews| Index: blimp/engine/feature/geolocation/blimp_location_provider.h |
| diff --git a/blimp/engine/feature/geolocation/blimp_location_provider.h b/blimp/engine/feature/geolocation/blimp_location_provider.h |
| index d3d16f22a9041915f79a05dd2465a446497b9479..418b10b4da9971b6ac9c5e69288869ace68f99a5 100644 |
| --- a/blimp/engine/feature/geolocation/blimp_location_provider.h |
| +++ b/blimp/engine/feature/geolocation/blimp_location_provider.h |
| @@ -14,6 +14,23 @@ namespace engine { |
| // Location provider for Blimp using the device's provider over the network. |
| class BlimpLocationProvider : public content::LocationProvider { |
| public: |
| + // A delegate that handles geolocation related outcoming and incoming events. |
| + class BlimpLocationProviderDelegate { |
|
Kevin M
2016/06/29 17:52:55
nit: Just "Delegate" should suffice
CJ
2016/07/11 23:21:06
Done.
|
| + public: |
| + virtual ~BlimpLocationProviderDelegate() {}; |
| + |
| + // Notifies the client that the is listening engine is listening for |
| + // geoposition information with the given accuracy. |
| + virtual void SendUpdateListenStateMessage(bool enable_high_accuracy) = 0; |
|
Kevin M
2016/06/29 17:52:55
Remove "Send" and "Message" from these method name
CJ
2016/07/11 23:21:07
Done.
|
| + |
| + // Notifies the client that the engine is no longer listening for |
| + // updates. |
| + virtual void SendStopListenStateMessage() = 0; |
|
Kevin M
2016/06/29 17:52:55
I thought we were just going to have Update, not S
CJ
2016/07/11 23:21:06
It is expressed that way in the proto, but I thoug
|
| + |
| + // Requests an updated geoposition from the client. |
| + virtual void SendRequestRefreshMessage() = 0; |
| + }; |
| + |
| BlimpLocationProvider(); |
| ~BlimpLocationProvider() override; |
| @@ -23,10 +40,13 @@ class BlimpLocationProvider : public content::LocationProvider { |
| void GetPosition(content::Geoposition* position) override; |
| void RequestRefresh() override; |
| void OnPermissionGranted() override; |
| + void OnLocationResponse(const content::Geoposition& position); |
| + void SetDelegate(BlimpLocationProviderDelegate* delegate); |
|
Kevin M
2016/06/29 17:52:55
These methods should be placed above the "implemen
CJ
2016/07/11 23:21:06
Done.
|
| private: |
| + BlimpLocationProviderDelegate* delegate_ = nullptr; |
| + |
| void NotifyCallback(const content::Geoposition& position); |
| - void OnLocationResponse(const content::Geoposition& position); |
| void SetUpdateCallback( |
| const LocationProviderUpdateCallback& callback) override; |