Chromium Code Reviews| Index: content/public/browser/geolocation_provider.h |
| diff --git a/content/public/browser/geolocation_provider.h b/content/public/browser/geolocation_provider.h |
| index 0f247a1d2e8d17388814f2acd2ba4e14d1cb1270..0ad1f741056f0315d1f132c18d48702ab82eca4c 100644 |
| --- a/content/public/browser/geolocation_provider.h |
| +++ b/content/public/browser/geolocation_provider.h |
| @@ -11,7 +11,9 @@ |
| #include "content/common/content_export.h" |
| namespace content { |
| +class AccessTokenStore; |
| struct Geoposition; |
| +class LocationProvider; |
| // This is the main API to the geolocation subsystem. The application will hold |
| // a single instance of this class and can register multiple clients to be |
| @@ -26,6 +28,25 @@ struct Geoposition; |
| // uses run on a separate Geolocation thread. |
| class GeolocationProvider { |
| public: |
| + // An Embedder of Geolocation may override these class' methods to provide |
| + // specific functionality. |
| + class CONTENT_EXPORT ServiceOverrides { |
|
Michael van Ouwerkerk
2016/06/24 13:57:19
I'd suggest calling it GeolocationProvider::Delega
mcasas
2016/06/24 19:25:52
Done.
|
| + public: |
| + // Returns true if the location API should use network-based location |
| + // approximation in addition to the system provider, if any. |
| + virtual bool UseNetworkLocationProviders(); |
|
Michael van Ouwerkerk
2016/06/24 13:57:19
The first rule of the content API [1] is "content/
mcasas
2016/06/24 19:25:53
I didn't know that rule, but currently there are
5
|
| + |
| + // Creates a new AccessTokenStore for geolocation. May return nullptr. |
| + virtual AccessTokenStore* CreateAccessTokenStore(); |
|
Michael van Ouwerkerk
2016/06/24 13:57:19
If you're here anyway, consider whether this shoul
mcasas
2016/06/24 19:25:52
Added a TODO and a bug. Smaller CLs are easier
to
|
| + |
| + // Allows an embedder to return its own LocationProvider implementation. |
| + // Return nullptr to use the default one for the platform to be created. |
| + // Caller takes ownership of the returned LocationProvider. FYI: Used by an |
| + // external project; please don't remove. Contact Viatcheslav Ostapenko at |
| + // sl.ostapenko@samsung.com for more information. |
| + virtual LocationProvider* OverrideSystemLocationProvider(); |
| + }; |
| + |
| CONTENT_EXPORT static GeolocationProvider* GetInstance(); |
| typedef base::Callback<void(const Geoposition&)> LocationUpdateCallback; |