| OLD | NEW |
| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 // or callback from |wifi_data_provider_manager_|. | 84 // or callback from |wifi_data_provider_manager_|. |
| 85 void OnWifiDataUpdate(); | 85 void OnWifiDataUpdate(); |
| 86 | 86 |
| 87 bool IsStarted() const; | 87 bool IsStarted() const; |
| 88 | 88 |
| 89 void OnLocationResponse(const Geoposition& position, | 89 void OnLocationResponse(const Geoposition& position, |
| 90 bool server_error, | 90 bool server_error, |
| 91 const base::string16& access_token, | 91 const base::string16& access_token, |
| 92 const WifiData& wifi_data); | 92 const WifiData& wifi_data); |
| 93 | 93 |
| 94 // If set to false, then wifi data will not be sent as part of the request, |
| 95 // and position will be based on IP only. |
| 96 bool high_accuracy_enabled_ = false; |
| 97 |
| 98 // True if this provider was started. |
| 99 bool is_started_ = false; |
| 100 |
| 94 const scoped_refptr<AccessTokenStore> access_token_store_; | 101 const scoped_refptr<AccessTokenStore> access_token_store_; |
| 95 | 102 |
| 96 // The wifi data provider, acquired via global factories. Valid between | 103 // The wifi data provider, acquired via global factories. Valid between |
| 97 // StartProvider() and StopProvider(), and checked via IsStarted(). | 104 // StartProvider() and StopProvider(), and checked via IsStarted(). |
| 98 WifiDataProviderManager* wifi_data_provider_manager_; | 105 WifiDataProviderManager* wifi_data_provider_manager_; |
| 99 | 106 |
| 100 WifiDataProviderManager::WifiDataUpdateCallback wifi_data_update_callback_; | 107 WifiDataProviderManager::WifiDataUpdateCallback wifi_data_update_callback_; |
| 101 | 108 |
| 102 // The wifi data and a flag to indicate if the data set is complete. | 109 // The wifi data and a flag to indicate if the data set is complete. |
| 103 WifiData wifi_data_; | 110 WifiData wifi_data_; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // over the platform-dependent implementations. | 145 // over the platform-dependent implementations. |
| 139 DEVICE_GEOLOCATION_EXPORT LocationProvider* NewNetworkLocationProvider( | 146 DEVICE_GEOLOCATION_EXPORT LocationProvider* NewNetworkLocationProvider( |
| 140 const scoped_refptr<AccessTokenStore>& access_token_store, | 147 const scoped_refptr<AccessTokenStore>& access_token_store, |
| 141 const scoped_refptr<net::URLRequestContextGetter>& context, | 148 const scoped_refptr<net::URLRequestContextGetter>& context, |
| 142 const GURL& url, | 149 const GURL& url, |
| 143 const base::string16& access_token); | 150 const base::string16& access_token); |
| 144 | 151 |
| 145 } // namespace device | 152 } // namespace device |
| 146 | 153 |
| 147 #endif // DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ | 154 #endif // DEVICE_GEOLOCATION_NETWORK_LOCATION_PROVIDER_H_ |
| OLD | NEW |