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

Side by Side Diff: device/geolocation/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: Updated location_provider_android.h 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_LOCATION_PROVIDER_H_ 5 #ifndef DEVICE_GEOLOCATION_LOCATION_PROVIDER_H_
6 #define DEVICE_GEOLOCATION_LOCATION_PROVIDER_H_ 6 #define DEVICE_GEOLOCATION_LOCATION_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "device/geolocation/geoposition.h" 10 #include "device/geolocation/geoposition.h"
(...skipping 24 matching lines...) Expand all
35 // Important: a LocationProvider may be instantiated and StartProvider() may 35 // Important: a LocationProvider may be instantiated and StartProvider() may
36 // be called before the user has granted permission via OnPermissionGranted(). 36 // be called before the user has granted permission via OnPermissionGranted().
37 // This is to allow underlying providers to warm up, load their internal 37 // This is to allow underlying providers to warm up, load their internal
38 // libraries, etc. No |LocationProviderUpdateCallback| can be run and no 38 // libraries, etc. No |LocationProviderUpdateCallback| can be run and no
39 // network requests can be done until OnPermissionGranted() has been called. 39 // network requests can be done until OnPermissionGranted() has been called.
40 virtual void StopProvider() = 0; 40 virtual void StopProvider() = 0;
41 41
42 // Gets the current best position estimate. 42 // Gets the current best position estimate.
43 virtual void GetPosition(Geoposition* position) = 0; 43 virtual void GetPosition(Geoposition* position) = 0;
44 44
45 // Provides a hint to the provider that new location data is needed as soon
46 // as possible.
47 virtual void RequestRefresh() = 0;
48
49 // Called everytime permission is granted to a page for using geolocation. 45 // Called everytime permission is granted to a page for using geolocation.
50 // This may either be through explicit user action (e.g. responding to the 46 // This may either be through explicit user action (e.g. responding to the
51 // infobar prompt) or inferred from a persisted site permission. 47 // infobar prompt) or inferred from a persisted site permission.
52 // Note: See |StartProvider()| for more information. 48 // Note: See |StartProvider()| for more information.
53 virtual void OnPermissionGranted() = 0; 49 virtual void OnPermissionGranted() = 0;
54 }; 50 };
55 51
56 } // namespace device 52 } // namespace device
57 53
58 #endif // DEVICE_GEOLOCATION_LOCATION_PROVIDER_H_ 54 #endif // DEVICE_GEOLOCATION_LOCATION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698