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

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

Issue 628773003: Partially convert geolocation IPC to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review 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..cb6aaf79631e90a92135d1fc1fc87acff79be7c1 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.h
+++ b/content/browser/geolocation/geolocation_dispatcher_host.h
@@ -17,24 +17,19 @@ 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);
virtual ~GeolocationDispatcherHost();
- // 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);
-
private:
// WebContentsObserver
- virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) OVERRIDE;
- virtual void RenderViewHostChanged(RenderViewHost* old_host,
- RenderViewHost* new_host) OVERRIDE;
virtual bool OnMessageReceived(
const IPC::Message& msg, RenderFrameHost* render_frame_host) OVERRIDE;
@@ -46,27 +41,12 @@ class GeolocationDispatcherHost : public WebContentsObserver {
void OnCancelPermissionRequest(RenderFrameHost* render_frame_host,
int bridge_id,
const GURL& requesting_frame);
- void OnStartUpdating(RenderFrameHost* render_frame_host,
- const GURL& requesting_frame,
- 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 SendGeolocationPermissionResponse(int render_process_id,
int render_frame_id,
int bridge_id,
bool allowed);
- // 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,
@@ -78,8 +58,6 @@ class GeolocationDispatcherHost : public WebContentsObserver {
};
std::vector<PendingPermission> pending_permissions_;
- scoped_ptr<GeolocationProvider::Subscription> geolocation_subscription_;
-
base::WeakPtrFactory<GeolocationDispatcherHost> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost);

Powered by Google App Engine
This is Rietveld 408576698