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

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

Issue 11269002: Introduce GeolocationPermissionRequestID, a wrapper struct to contain the (render process ID, rende… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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.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
« no previous file with comments | « content/browser/geolocation/geolocation_dispatcher_host.h ('k') | content/public/browser/geolocation_permission_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698