Chromium Code Reviews| Index: blimp/engine/feature/geolocation/engine_geolocation_feature.h |
| diff --git a/blimp/engine/feature/geolocation/engine_geolocation_feature.h b/blimp/engine/feature/geolocation/engine_geolocation_feature.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f42ffada155b972efc1640d9547d5aef3ee2506d |
| --- /dev/null |
| +++ b/blimp/engine/feature/geolocation/engine_geolocation_feature.h |
| @@ -0,0 +1,47 @@ |
| +// 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_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_ |
| +#define BLIMP_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_ |
| + |
| +#include "blimp/engine/feature/geolocation/blimp_location_provider.h" |
| +#include "blimp/net/blimp_message_processor.h" |
| +#include "content/public/common/geoposition.h" |
| + |
| +namespace blimp { |
| +namespace engine { |
| + |
| +// Handles all incoming and outgoing protobuf messages types tied to |
| +// geolocation. Delegates are notified of incoming messages by |
|
Kevin M
2016/06/29 17:52:56
* There are no "delegates" here (implies calls are
CJ
2016/07/11 23:21:07
Just removed stuff of delegates, and will update i
|
| +// EngineGeolocationFeature. |
| +class EngineGeolocationFeature |
| + : public BlimpMessageProcessor, |
| + BlimpLocationProvider::BlimpLocationProviderDelegate { |
| + public: |
| + EngineGeolocationFeature(); |
| + ~EngineGeolocationFeature() override; |
| + |
| + void set_outgoing_message_processor( |
| + std::unique_ptr<BlimpMessageProcessor> message_processor); |
| + |
| + // BlimpLocationProviderDelegate implementation. |
| + void SendUpdateListenStateMessage(bool enable_high_accuracy) override; |
| + void SendStopListenStateMessage() override; |
| + void SendRequestRefreshMessage() override; |
| + |
| + // BlimpMessageProcessor implementation. |
| + void ProcessMessage(std::unique_ptr<BlimpMessage> message, |
| + const net::CompletionCallback& callback) override; |
| + |
| + private: |
| + BlimpLocationProvider* location_provider_; |
|
Kevin M
2016/06/29 17:52:56
This is never set?
CJ
2016/07/11 23:21:08
Done.
|
| + std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(EngineGeolocationFeature); |
| +}; |
| + |
| +} // namespace engine |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_ |