Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: blimp/engine/feature/geolocation/blimp_location_provider.h

Issue 2176753003: Geolocation: move from content/browser to device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed device/geolocation/public/cpp Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef BLIMP_ENGINE_FEATURE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ 5 #ifndef BLIMP_ENGINE_FEATURE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_
6 #define BLIMP_ENGINE_FEATURE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ 6 #define BLIMP_ENGINE_FEATURE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_
7 7
8 #include "content/public/browser/location_provider.h" 8 #include "device/geolocation/geoposition.h"
9 #include "content/public/common/geoposition.h" 9 #include "device/geolocation/location_provider.h"
10 10
11 namespace blimp { 11 namespace blimp {
12 namespace engine { 12 namespace engine {
13 13
14 // Location provider for Blimp using the device's provider over the network. 14 // Location provider for Blimp using the device's provider over the network.
15 class BlimpLocationProvider : public content::LocationProvider { 15 class BlimpLocationProvider : public device::LocationProvider {
16 public: 16 public:
17 BlimpLocationProvider(); 17 BlimpLocationProvider();
18 ~BlimpLocationProvider() override; 18 ~BlimpLocationProvider() override;
19 19
20 // content::LocationProvider implementation. 20 // device::LocationProvider implementation.
21 bool StartProvider(bool high_accuracy) override; 21 bool StartProvider(bool high_accuracy) override;
22 void StopProvider() override; 22 void StopProvider() override;
23 void GetPosition(content::Geoposition* position) override; 23 void GetPosition(device::Geoposition* position) override;
24 void RequestRefresh() override; 24 void RequestRefresh() override;
25 void OnPermissionGranted() override; 25 void OnPermissionGranted() override;
26 26
27 private: 27 private:
28 void NotifyCallback(const content::Geoposition& position); 28 void NotifyCallback(const device::Geoposition& position);
29 void OnLocationResponse(const content::Geoposition& position); 29 void OnLocationResponse(const device::Geoposition& position);
30 void SetUpdateCallback( 30 void SetUpdateCallback(
31 const LocationProviderUpdateCallback& callback) override; 31 const LocationProviderUpdateCallback& callback) override;
32 32
33 LocationProviderUpdateCallback callback_; 33 LocationProviderUpdateCallback callback_;
34 34
35 content::Geoposition position_; 35 device::Geoposition position_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(BlimpLocationProvider); 37 DISALLOW_COPY_AND_ASSIGN(BlimpLocationProvider);
38 }; 38 };
39 39
40 } // namespace engine 40 } // namespace engine
41 } // namespace blimp 41 } // namespace blimp
42 42
43 #endif // BLIMP_ENGINE_FEATURE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_ 43 #endif // BLIMP_ENGINE_FEATURE_GEOLOCATION_BLIMP_LOCATION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698