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

Unified Diff: content/renderer/geolocation_dispatcher.cc

Issue 1771743002: Move geolocation and permission mojoms into WebKit/public/platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 1c61eca73e50c4051a86eef5371e7ae1dc5fdb18..96bbb46f3e49755d9638dd952f519f663a5c039c 100644
--- a/content/renderer/geolocation_dispatcher.cc
+++ b/content/renderer/geolocation_dispatcher.cc
@@ -80,7 +80,7 @@ void GeolocationDispatcher::requestPermission(
int permission_request_id = pending_permissions_->add(permissionRequest);
permission_service_->RequestPermission(
- PermissionName::GEOLOCATION,
+ blink::mojom::PermissionName::GEOLOCATION,
permissionRequest.securityOrigin().toString().utf8(),
base::Bind(&GeolocationDispatcher::OnPermissionSet,
base::Unretained(this), permission_request_id));
@@ -95,12 +95,13 @@ void GeolocationDispatcher::cancelPermissionRequest(
// Permission for using geolocation has been set.
void GeolocationDispatcher::OnPermissionSet(
int permission_request_id,
- PermissionStatus status) {
+ blink::mojom::PermissionStatus status) {
WebGeolocationPermissionRequest permissionRequest;
if (!pending_permissions_->remove(permission_request_id, permissionRequest))
return;
- permissionRequest.setIsAllowed(status == PermissionStatus::GRANTED);
+ permissionRequest.setIsAllowed(status ==
+ blink::mojom::PermissionStatus::GRANTED);
}
void GeolocationDispatcher::QueryNextPosition() {
@@ -110,7 +111,8 @@ void GeolocationDispatcher::QueryNextPosition() {
base::Unretained(this)));
}
-void GeolocationDispatcher::OnPositionUpdate(MojoGeopositionPtr geoposition) {
+void GeolocationDispatcher::OnPositionUpdate(
+ blink::mojom::GeopositionPtr geoposition) {
QueryNextPosition();
if (geoposition->valid) {
@@ -131,10 +133,10 @@ void GeolocationDispatcher::OnPositionUpdate(MojoGeopositionPtr geoposition) {
} else {
WebGeolocationError::Error code;
switch (geoposition->error_code) {
- case MojoGeoposition::ErrorCode::PERMISSION_DENIED:
+ case blink::mojom::Geoposition::ErrorCode::PERMISSION_DENIED:
code = WebGeolocationError::ErrorPermissionDenied;
break;
- case MojoGeoposition::ErrorCode::POSITION_UNAVAILABLE:
+ case blink::mojom::Geoposition::ErrorCode::POSITION_UNAVAILABLE:
code = WebGeolocationError::ErrorPositionUnavailable;
break;
default:

Powered by Google App Engine
This is Rietveld 408576698