Index: content/public/browser/geolocation.h |
diff --git a/content/public/browser/geolocation.h b/content/public/browser/geolocation.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f66c8edc32ce9344eb8c1f4c3cf6c5e9bda5c1be |
--- /dev/null |
+++ b/content/public/browser/geolocation.h |
@@ -0,0 +1,28 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ |
+#define CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ |
+#pragma once |
+ |
+#include "base/callback_forward.h" |
+#include "content/common/content_export.h" |
+ |
+namespace content { |
+ |
+// Overrides the current location for testing. This function may be called on |
+// any thread. The completion callback will be invoked asynchronously on the |
+// calling thread when the override operation is completed. |
+// This should be used instead of a mock location provider for a simpler way |
+// to provide fake location results when not testing the innards of the |
+// geolocation code. |
+void CONTENT_EXPORT OverrideLocationForTesting( |
+ double latitude, |
+ double longitude, |
+ double altitude, |
+ const base::Closure& completion_callback); |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_GEOLOCATION_H_ |