| 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 d942cff82720628df87a59ce2f35f823be82cc1d..d4e7b7ac51fbac3c3c6fd0d69b47c49e898ecf50 100644
|
| --- a/content/browser/geolocation/geolocation_dispatcher_host.h
|
| +++ b/content/browser/geolocation/geolocation_dispatcher_host.h
|
| @@ -10,41 +10,29 @@
|
|
|
| #include "base/callback_forward.h"
|
| #include "base/memory/weak_ptr.h"
|
| -#include "content/browser/geolocation/geolocation_provider_impl.h"
|
| #include "content/public/browser/web_contents_observer.h"
|
|
|
| class GURL;
|
|
|
| namespace content {
|
|
|
| -// GeolocationDispatcherHost is an observer for Geolocation messages.
|
| -// It's the complement of GeolocationDispatcher (owned by RenderView).
|
| +// GeolocationDispatcherHost is an observer for Geolocation permissions-related
|
| +// messages. In this role, it's the complement of GeolocationDispatcher (owned
|
| +// by RenderFrame).
|
| +// TODO(blundell): Eliminate this class in favor of having
|
| +// Mojo handle permissions for geolocation once there is resolution on how
|
| +// that will work. crbug.com/420498
|
| class GeolocationDispatcherHost : public WebContentsObserver {
|
| public:
|
| explicit GeolocationDispatcherHost(WebContents* web_contents);
|
| ~GeolocationDispatcherHost() override;
|
|
|
| - // Pause or resumes geolocation. Resuming when nothing is paused is a no-op.
|
| - // If the web contents is paused while not currently using geolocation but
|
| - // then goes on to do so before being resumed, then it will not get
|
| - // geolocation updates until it is resumed.
|
| - void PauseOrResume(bool should_pause);
|
| -
|
| - // Enables geolocation override. This method is used by DevTools to
|
| - // trigger possible location-specific behavior in particular web contents.
|
| - void SetOverride(scoped_ptr<Geoposition> geoposition);
|
| -
|
| - // Disables geolocation override.
|
| - void ClearOverride();
|
| -
|
| private:
|
| // WebContentsObserver
|
| - void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
|
| - void RenderViewHostChanged(RenderViewHost* old_host,
|
| - RenderViewHost* new_host) override;
|
| - void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
|
| - const LoadCommittedDetails& details,
|
| - const FrameNavigateParams& params) override;
|
| + virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
|
| + virtual void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
|
| + const LoadCommittedDetails& details,
|
| + const FrameNavigateParams& params) override;
|
| bool OnMessageReceived(const IPC::Message& msg,
|
| RenderFrameHost* render_frame_host) override;
|
|
|
| @@ -55,17 +43,6 @@ class GeolocationDispatcherHost : public WebContentsObserver {
|
| int bridge_id,
|
| const GURL& requesting_origin,
|
| bool user_gesture);
|
| - void OnStartUpdating(RenderFrameHost* render_frame_host,
|
| - const GURL& requesting_origin,
|
| - bool enable_high_accuracy);
|
| - void OnStopUpdating(RenderFrameHost* render_frame_host);
|
| -
|
| - // Updates the geolocation provider with the currently required update
|
| - // options.
|
| - void RefreshGeolocationOptions();
|
| -
|
| - void OnLocationUpdate(const Geoposition& position);
|
| - void UpdateGeoposition(RenderFrameHost* frame, const Geoposition& position);
|
|
|
| void SendGeolocationPermissionResponse(int render_process_id,
|
| int render_frame_id,
|
| @@ -76,11 +53,6 @@ class GeolocationDispatcherHost : public WebContentsObserver {
|
| // browser to cancel the permission requests.
|
| void CancelPermissionRequestsForFrame(RenderFrameHost* render_frame_host);
|
|
|
| - // A map from the RenderFrameHosts that have requested geolocation updates to
|
| - // the type of accuracy they requested (true = high accuracy).
|
| - std::map<RenderFrameHost*, bool> updating_frames_;
|
| - bool paused_;
|
| -
|
| struct PendingPermission {
|
| PendingPermission(int render_frame_id,
|
| int render_process_id,
|
| @@ -94,9 +66,6 @@ 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_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost);
|
|
|