Index: content/browser/geolocation/geolocation_dispatcher_host.cc |
=================================================================== |
--- content/browser/geolocation/geolocation_dispatcher_host.cc (revision 163741) |
+++ content/browser/geolocation/geolocation_dispatcher_host.cc (working copy) |
@@ -17,10 +17,7 @@ |
#include "content/public/common/geoposition.h" |
#include "content/common/geolocation_messages.h" |
-using content::BrowserThread; |
-using content::GeolocationPermissionContext; |
-using content::Geoposition; |
-using content::RenderViewHostImpl; |
+namespace content { |
namespace { |
@@ -34,8 +31,8 @@ |
int bridge_id, |
bool allowed) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- RenderViewHostImpl* r = RenderViewHostImpl::FromID( |
- render_process_id, render_view_id); |
+ RenderViewHostImpl* r = |
+ RenderViewHostImpl::FromID(render_process_id, render_view_id); |
if (!r) |
return; |
r->Send(new GeolocationMsg_PermissionSet(render_view_id, bridge_id, allowed)); |
@@ -63,13 +60,15 @@ |
private: |
virtual ~GeolocationDispatcherHostImpl(); |
- void OnRequestPermission( |
- int render_view_id, int bridge_id, const GURL& requesting_frame); |
- void OnCancelPermissionRequest( |
- int render_view_id, int bridge_id, const GURL& requesting_frame); |
- void OnStartUpdating( |
- int render_view_id, const GURL& requesting_frame, |
- bool enable_high_accuracy); |
+ void OnRequestPermission(int render_view_id, |
+ int bridge_id, |
+ const GURL& requesting_frame); |
+ void OnCancelPermissionRequest(int render_view_id, |
+ int bridge_id, |
+ const GURL& requesting_frame); |
+ void OnStartUpdating(int render_view_id, |
+ const GURL& requesting_frame, |
+ bool enable_high_accuracy); |
void OnStopUpdating(int render_view_id); |
// Updates the |location_arbitrator_| with the currently required update |
@@ -144,17 +143,14 @@ |
<< render_view_id << ":" << bridge_id; |
if (geolocation_permission_context_) { |
geolocation_permission_context_->RequestGeolocationPermission( |
- render_process_id_, render_view_id, bridge_id, |
- requesting_frame, |
- base::Bind( |
- &SendGeolocationPermissionResponse, |
- render_process_id_, render_view_id, bridge_id)); |
+ render_process_id_, render_view_id, bridge_id, requesting_frame, |
+ base::Bind(&SendGeolocationPermissionResponse, render_process_id_, |
+ render_view_id, bridge_id)); |
} else { |
BrowserThread::PostTask( |
BrowserThread::UI, FROM_HERE, |
- base::Bind( |
- &SendGeolocationPermissionResponse, |
- render_process_id_, render_view_id, bridge_id, true)); |
+ base::Bind(&SendGeolocationPermissionResponse, render_process_id_, |
+ render_view_id, bridge_id, true)); |
} |
} |
@@ -165,11 +161,10 @@ |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
DVLOG(1) << __FUNCTION__ << " " << render_process_id_ << ":" |
<< render_view_id << ":" << bridge_id; |
- if (!geolocation_permission_context_) |
- return; |
- geolocation_permission_context_->CancelGeolocationPermissionRequest( |
- render_process_id_, render_view_id, bridge_id, |
- requesting_frame); |
+ if (geolocation_permission_context_) { |
+ geolocation_permission_context_->CancelGeolocationPermissionRequest( |
+ render_process_id_, render_view_id, bridge_id, requesting_frame); |
+ } |
} |
void GeolocationDispatcherHostImpl::OnStartUpdating( |
@@ -218,6 +213,10 @@ |
} |
} // namespace |
+ |
+// GeolocationDispatcherHost -------------------------------------------------- |
+ |
+// static |
GeolocationDispatcherHost* GeolocationDispatcherHost::New( |
int render_process_id, |
GeolocationPermissionContext* geolocation_permission_context) { |
@@ -225,3 +224,11 @@ |
render_process_id, |
geolocation_permission_context); |
} |
+ |
+GeolocationDispatcherHost::GeolocationDispatcherHost() { |
+} |
+ |
+GeolocationDispatcherHost::~GeolocationDispatcherHost() { |
+} |
+ |
+} // namespace content |