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

Unified Diff: content/renderer/geolocation_dispatcher.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 years, 11 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..20d3add2947b5d1d2464b18a9f1d52f0e1cbf34a 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,
+ PermissionName::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(
@@ -103,7 +102,7 @@ void GeolocationDispatcher::OnPermissionSet(
if (!pending_permissions_->remove(permission_request_id, permissionRequest))
return;
- permissionRequest.setIsAllowed(status == PERMISSION_STATUS_GRANTED);
+ permissionRequest.setIsAllowed(status == PermissionStatus::GRANTED);
}
void GeolocationDispatcher::QueryNextPosition() {
@@ -134,10 +133,10 @@ void GeolocationDispatcher::OnPositionUpdate(MojoGeopositionPtr geoposition) {
} else {
WebGeolocationError::Error code;
switch (geoposition->error_code) {
- case Geoposition::ERROR_CODE_PERMISSION_DENIED:
+ case MojoGeoposition::ErrorCode::PERMISSION_DENIED:
code = WebGeolocationError::ErrorPermissionDenied;
break;
- case Geoposition::ERROR_CODE_POSITION_UNAVAILABLE:
+ case MojoGeoposition::ErrorCode::POSITION_UNAVAILABLE:
code = WebGeolocationError::ErrorPositionUnavailable;
break;
default:

Powered by Google App Engine
This is Rietveld 408576698