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

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

Issue 603323004: DevTools: Add geolocation override in browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: content/browser/geolocation/geolocation_dispatcher_host.h
diff --git a/content/browser/geolocation/geolocation_dispatcher_host.h b/content/browser/geolocation/geolocation_dispatcher_host.h
index cd814cbcff70ef67151d8dc1ddf1649f31fad7eb..9e5ce5c9ec87fe6216e296839a4930e06e711921 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.h
+++ b/content/browser/geolocation/geolocation_dispatcher_host.h
@@ -30,6 +30,12 @@ class GeolocationDispatcherHost : public WebContentsObserver {
// geolocation updates until it is resumed.
void PauseOrResume(bool should_pause);
+ // Enables geolocation override.
+ void SetOverride(scoped_ptr<Geoposition> geoposition);
Michael van Ouwerkerk 2014/10/06 13:38:23 Why do you need to introduce a new way to override
vkuzkokov 2014/10/06 13:48:21 OverrideLocationForTesting works on all browser. W
+
+ // Disables geolocation override.
+ void ClearOverride();
+
private:
// WebContentsObserver
virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) OVERRIDE;
@@ -56,6 +62,7 @@ class GeolocationDispatcherHost : public WebContentsObserver {
void RefreshGeolocationOptions();
void OnLocationUpdate(const Geoposition& position);
+ void UpdateGeoposition(RenderFrameHost* frame, const Geoposition& position);
void SendGeolocationPermissionResponse(int render_process_id,
int render_frame_id,
@@ -79,6 +86,7 @@ class GeolocationDispatcherHost : public WebContentsObserver {
std::vector<PendingPermission> pending_permissions_;
scoped_ptr<GeolocationProvider::Subscription> geolocation_subscription_;
+ scoped_ptr<Geoposition> geoposition_override_;
base::WeakPtrFactory<GeolocationDispatcherHost> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698