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

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

Issue 303503008: Convert geolocation code to use RenderFrame instead of RenderView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: fix interactive ui test Created 6 years, 7 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 | « no previous file | content/browser/geolocation/geolocation_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/geolocation_dispatcher_host.h
===================================================================
--- content/browser/geolocation/geolocation_dispatcher_host.h (revision 274175)
+++ content/browser/geolocation/geolocation_dispatcher_host.h (working copy)
@@ -5,6 +5,8 @@
#ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_DISPATCHER_HOST_H_
+#include <map>
+
#include "content/browser/geolocation/geolocation_provider_impl.h"
#include "content/public/browser/web_contents_observer.h"
@@ -29,19 +31,24 @@
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) OVERRIDE;
+ virtual bool OnMessageReceived(
+ const IPC::Message& msg, RenderFrameHost* render_frame_host) OVERRIDE;
// Message handlers:
- void OnRequestPermission(int bridge_id,
+ void OnRequestPermission(RenderFrameHost* render_frame_host,
+ int bridge_id,
const GURL& requesting_frame,
bool user_gesture);
- void OnCancelPermissionRequest(int bridge_id,
+ void OnCancelPermissionRequest(RenderFrameHost* render_frame_host,
+ int bridge_id,
const GURL& requesting_frame);
- void OnStartUpdating(const GURL& requesting_frame,
+ void OnStartUpdating(RenderFrameHost* render_frame_host,
+ const GURL& requesting_frame,
bool enable_high_accuracy);
- void OnStopUpdating();
+ void OnStopUpdating(RenderFrameHost* render_frame_host);
// Updates the geolocation provider with the currently required update
// options.
@@ -51,9 +58,10 @@
scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_;
- bool watching_requested_;
+ // 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_;
- bool high_accuracy_;
scoped_ptr<GeolocationProvider::Subscription> geolocation_subscription_;
« no previous file with comments | « no previous file | content/browser/geolocation/geolocation_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698