| 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 CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ | 6 #define CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| 11 | 11 |
| 12 namespace content { | 12 namespace content { |
| 13 | 13 |
| 14 struct Geoposition; |
| 15 |
| 14 // Overrides the current location for testing. This function may be called on | 16 // Overrides the current location for testing. This function may be called on |
| 15 // any thread. The completion callback will be invoked asynchronously on the | 17 // any thread. The completion callback will be invoked asynchronously on the |
| 16 // calling thread when the override operation is completed. | 18 // calling thread when the override operation is completed. |
| 17 // This should be used instead of a mock location provider for a simpler way | 19 // This should be used instead of a mock location provider for a simpler way |
| 18 // to provide fake location results when not testing the innards of the | 20 // to provide fake location results when not testing the innards of the |
| 19 // geolocation code. | 21 // geolocation code. |
| 20 void CONTENT_EXPORT OverrideLocationForTesting( | 22 void CONTENT_EXPORT OverrideLocationForTesting( |
| 21 double latitude, | 23 const Geoposition& position, |
| 22 double longitude, | |
| 23 double altitude, | |
| 24 const base::Closure& completion_callback); | 24 const base::Closure& completion_callback); |
| 25 | 25 |
| 26 } // namespace content | 26 } // namespace content |
| 27 | 27 |
| 28 #endif // CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ | 28 #endif // CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ |
| OLD | NEW |