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

Side by Side Diff: device/geolocation/network_location_provider.h

Issue 2226143002: Gets rid of the LocationArbitrator interface, in preference for LocationProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into lai Created 4 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ 5 #ifndef DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_
6 #define DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ 6 #define DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 NetworkLocationProvider( 66 NetworkLocationProvider(
67 const scoped_refptr<AccessTokenStore>& access_token_store, 67 const scoped_refptr<AccessTokenStore>& access_token_store,
68 const scoped_refptr<net::URLRequestContextGetter>& context, 68 const scoped_refptr<net::URLRequestContextGetter>& context,
69 const GURL& url, 69 const GURL& url,
70 const base::string16& access_token); 70 const base::string16& access_token);
71 ~NetworkLocationProvider() override; 71 ~NetworkLocationProvider() override;
72 72
73 // LocationProvider implementation 73 // LocationProvider implementation
74 bool StartProvider(bool high_accuracy) override; 74 bool StartProvider(bool high_accuracy) override;
75 void StopProvider() override; 75 void StopProvider() override;
76 void GetPosition(Geoposition* position) override; 76 const Geoposition& GetPosition() override;
77 void RequestRefresh() override;
78 void OnPermissionGranted() override; 77 void OnPermissionGranted() override;
79 78
80 private: 79 private:
81 // Satisfies a position request from cache or network. 80 // Satisfies a position request from cache or network.
82 void RequestPosition(); 81 void RequestPosition();
83 82
84 // Gets called when new wifi data is available. 83 // Gets called when new wifi data is available.
85 void OnWifiDataUpdate(); 84 void OnWifiDataUpdate();
86 85
87 // Internal helper used by OnWifiDataUpdate. 86 // Internal helper used by OnWifiDataUpdate.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // over the platform-dependent implementations. 134 // over the platform-dependent implementations.
136 DEVICE_GEOLOCATION_EXPORT LocationProviderBase* NewNetworkLocationProvider( 135 DEVICE_GEOLOCATION_EXPORT LocationProviderBase* NewNetworkLocationProvider(
137 const scoped_refptr<AccessTokenStore>& access_token_store, 136 const scoped_refptr<AccessTokenStore>& access_token_store,
138 const scoped_refptr<net::URLRequestContextGetter>& context, 137 const scoped_refptr<net::URLRequestContextGetter>& context,
139 const GURL& url, 138 const GURL& url,
140 const base::string16& access_token); 139 const base::string16& access_token);
141 140
142 } // namespace device 141 } // namespace device
143 142
144 #endif // DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ 143 #endif // DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « device/geolocation/mock_location_provider.cc ('k') | device/geolocation/network_location_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698