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

Unified Diff: content/renderer/geolocation_dispatcher.cc

Issue 1373883003: Move geolocation and permission mojoms into components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/renderer/geolocation_dispatcher.cc
diff --git a/content/renderer/geolocation_dispatcher.cc b/content/renderer/geolocation_dispatcher.cc
index 9f54473664f3384f3ceafc2a787b691c699b2132..0b522d52160276db7fcc95f643425edd307514b6 100644
--- a/content/renderer/geolocation_dispatcher.cc
+++ b/content/renderer/geolocation_dispatcher.cc
@@ -81,12 +81,11 @@ void GeolocationDispatcher::requestPermission(
int permission_request_id = pending_permissions_->add(permissionRequest);
permission_service_->RequestPermission(
- PERMISSION_NAME_GEOLOCATION,
+ permission::NAME_GEOLOCATION,
permissionRequest.securityOrigin().toString().utf8(),
blink::WebUserGestureIndicator::isProcessingUserGesture(),
base::Bind(&GeolocationDispatcher::OnPermissionSet,
- base::Unretained(this),
- permission_request_id));
+ base::Unretained(this), permission_request_id));
}
void GeolocationDispatcher::cancelPermissionRequest(
@@ -96,14 +95,13 @@ void GeolocationDispatcher::cancelPermissionRequest(
}
// Permission for using geolocation has been set.
-void GeolocationDispatcher::OnPermissionSet(
- int permission_request_id,
- PermissionStatus status) {
+void GeolocationDispatcher::OnPermissionSet(int permission_request_id,
+ permission::Status status) {
WebGeolocationPermissionRequest permissionRequest;
if (!pending_permissions_->remove(permission_request_id, permissionRequest))
return;
- permissionRequest.setIsAllowed(status == PERMISSION_STATUS_GRANTED);
+ permissionRequest.setIsAllowed(status == permission::STATUS_GRANTED);
}
void GeolocationDispatcher::QueryNextPosition() {
@@ -113,7 +111,8 @@ void GeolocationDispatcher::QueryNextPosition() {
base::Unretained(this)));
}
-void GeolocationDispatcher::OnPositionUpdate(MojoGeopositionPtr geoposition) {
+void GeolocationDispatcher::OnPositionUpdate(
+ geolocation::GeopositionPtr geoposition) {
QueryNextPosition();
if (geoposition->valid) {
@@ -134,10 +133,10 @@ void GeolocationDispatcher::OnPositionUpdate(MojoGeopositionPtr geoposition) {
} else {
WebGeolocationError::Error code;
switch (geoposition->error_code) {
- case Geoposition::ERROR_CODE_PERMISSION_DENIED:
+ case geolocation::Geoposition::ERROR_CODE_PERMISSION_DENIED:
code = WebGeolocationError::ErrorPermissionDenied;
break;
- case Geoposition::ERROR_CODE_POSITION_UNAVAILABLE:
+ case geolocation::Geoposition::ERROR_CODE_POSITION_UNAVAILABLE:
code = WebGeolocationError::ErrorPositionUnavailable;
break;
default:
« no previous file with comments | « content/renderer/geolocation_dispatcher.h ('k') | content/renderer/media/media_permission_dispatcher_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698