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

Unified Diff: content/public/browser/geolocation.h

Issue 10070012: Geolocation support for chromedriver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_tests.gypi ('k') | content/test/mock_geolocation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « content/content_tests.gypi ('k') | content/test/mock_geolocation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698