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

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

Issue 658005: Bring Geolocation to life!... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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: chrome/browser/geolocation/geolocation_dispatcher_host.h
===================================================================
--- chrome/browser/geolocation/geolocation_dispatcher_host.h (revision 39892)
+++ chrome/browser/geolocation/geolocation_dispatcher_host.h (working copy)
@@ -9,18 +9,21 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
+#include "chrome/browser/geolocation/location_arbitrator.h"
#include "ipc/ipc_message.h"
class GeolocationPermissionContext;
-struct Geoposition;
class GURL;
class ResourceMessageFilter;
+class URLRequestContextGetter;
+struct Geoposition;
// GeolocationDispatcherHost is a delegate for Geolocation messages used by
// ResourceMessageFilter.
// It's the complement of GeolocationDispatcher (owned by RenderView).
class GeolocationDispatcherHost
- : public base::RefCountedThreadSafe<GeolocationDispatcherHost> {
+ : public base::RefCountedThreadSafe<GeolocationDispatcherHost>,
+ public GeolocationArbitrator::Delegate {
public:
GeolocationDispatcherHost(
int resource_message_filter_process_id,
@@ -30,8 +33,8 @@
// handled. Called in the browser process.
bool OnMessageReceived(const IPC::Message& msg, bool* msg_was_ok);
- // Tells the render view that a new geolocation position is available.
- void NotifyPositionUpdated(const Geoposition& geoposition);
+ // GeolocationArbitrator::Delegate
+ virtual void OnLocationUpdate(const Geoposition& position);
private:
friend class base::RefCountedThreadSafe<GeolocationDispatcherHost>;
@@ -70,6 +73,8 @@
};
// Only used on the IO thread.
std::set<GeolocationServiceRenderId> geolocation_renderers_;
+ // Only set whilst we are registered with the arbitrator.
+ scoped_refptr<GeolocationArbitrator> location_arbitrator_;
DISALLOW_COPY_AND_ASSIGN(GeolocationDispatcherHost);
};
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/geolocation/geolocation_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698