| OLD | NEW | 
|   1 // Copyright 2016 The Chromium Authors. All rights reserved. |   1 // Copyright 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 CONTENT_PUBLIC_BROWSER_GEOLOCATION_DELEGATE_H_ |   5 #ifndef CONTENT_PUBLIC_BROWSER_GEOLOCATION_DELEGATE_H_ | 
|   6 #define CONTENT_PUBLIC_BROWSER_GEOLOCATION_DELEGATE_H_ |   6 #define CONTENT_PUBLIC_BROWSER_GEOLOCATION_DELEGATE_H_ | 
|   7  |   7  | 
|   8 #include <memory> |   8 #include <memory> | 
|   9  |   9  | 
 |  10 #include "base/memory/ref_counted.h" | 
|  10 #include "content/common/content_export.h" |  11 #include "content/common/content_export.h" | 
|  11  |  12  | 
|  12 namespace content { |  13 namespace content { | 
|  13 class AccessTokenStore; |  14 class AccessTokenStore; | 
|  14 class LocationProvider; |  15 class LocationProvider; | 
|  15  |  16  | 
|  16 // An embedder of Geolocation may override these class' methods to provide |  17 // An embedder of Geolocation may override these class' methods to provide | 
|  17 // specific functionality. |  18 // specific functionality. | 
|  18 class CONTENT_EXPORT GeolocationDelegate { |  19 class CONTENT_EXPORT GeolocationDelegate { | 
|  19  public: |  20  public: | 
|  20   virtual ~GeolocationDelegate() {} |  21   virtual ~GeolocationDelegate() {} | 
|  21  |  22  | 
|  22   // Returns true if the location API should use network-based location |  23   // Returns true if the location API should use network-based location | 
|  23   // approximation in addition to the system provider, if any. |  24   // approximation in addition to the system provider, if any. | 
|  24   virtual bool UseNetworkLocationProviders(); |  25   virtual bool UseNetworkLocationProviders(); | 
|  25  |  26  | 
|  26   // Creates a new AccessTokenStore for geolocation. May return nullptr. |  27   // Creates a new AccessTokenStore for geolocation. May return nullptr. | 
|  27   // TODO(mcasas): consider changing it return type to std::unique_ptr<> to |  28   virtual scoped_refptr<AccessTokenStore> CreateAccessTokenStore(); | 
|  28   // clarify ownership, https://crbug.com/623114. |  | 
|  29   virtual AccessTokenStore* CreateAccessTokenStore(); |  | 
|  30  |  29  | 
|  31   // Allows an embedder to return its own LocationProvider implementation. |  30   // Allows an embedder to return its own LocationProvider implementation. | 
|  32   // Return nullptr to use the default one for the platform to be created. |  31   // Return nullptr to use the default one for the platform to be created. | 
|  33   // FYI: Used by an external project; please don't remove. Contact Viatcheslav |  32   // FYI: Used by an external project; please don't remove. Contact Viatcheslav | 
|  34   // Ostapenko at sl.ostapenko@samsung.com for more information. |  33   // Ostapenko at sl.ostapenko@samsung.com for more information. | 
|  35   virtual std::unique_ptr<LocationProvider> OverrideSystemLocationProvider(); |  34   virtual std::unique_ptr<LocationProvider> OverrideSystemLocationProvider(); | 
|  36 }; |  35 }; | 
|  37  |  36  | 
|  38 }  // namespace content |  37 }  // namespace content | 
|  39  |  38  | 
|  40 #endif  // CONTENT_PUBLIC_BROWSER_GEOLOCATION_DELEGATE_H_ |  39 #endif  // CONTENT_PUBLIC_BROWSER_GEOLOCATION_DELEGATE_H_ | 
| OLD | NEW |