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

Unified Diff: content/browser/geolocation/geolocation_provider.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/browser/geolocation/geolocation.cc ('k') | content/browser/geolocation/geolocation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/geolocation_provider.h
diff --git a/content/browser/geolocation/geolocation_provider.h b/content/browser/geolocation/geolocation_provider.h
index a45a365f23066aa71491b65ce8aa07e7f05cb629..f81688085526f511a1e9586af5d22ff2c85ac133 100644
--- a/content/browser/geolocation/geolocation_provider.h
+++ b/content/browser/geolocation/geolocation_provider.h
@@ -48,6 +48,11 @@ class CONTENT_EXPORT GeolocationProvider
// GeolocationObserver
virtual void OnLocationUpdate(const Geoposition& position) OVERRIDE;
+ // Overrides the location for automation/testing. Updates any current
+ // observers with the overriden position. Any further updates from location
+ // providers will be ignored.
+ void OverrideLocationForTesting(const Geoposition& override_position);
+
// Gets a pointer to the singleton instance of the location relayer, which
// is in turn bound to the browser's global context objects. Ownership is NOT
// returned.
@@ -91,6 +96,8 @@ class CONTENT_EXPORT GeolocationProvider
ObserverMap observers_;
bool is_permission_granted_;
Geoposition position_;
+ // True only in testing, where we want to use a custom position.
+ bool ignore_location_updates_;
// Only to be used on the geolocation thread.
GeolocationArbitrator* arbitrator_;
« no previous file with comments | « content/browser/geolocation/geolocation.cc ('k') | content/browser/geolocation/geolocation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698