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

Unified Diff: content/browser/devtools/protocol/page_handler.cc

Issue 628773003: Partially convert geolocation IPC to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to reviews, port override impl Created 6 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/devtools/protocol/page_handler.cc
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc
index 856352e0bcbb9db3ea978e8caac864d5984c9f37..6f5f3617dc95b1423284a8645d2a164c2611ef51 100644
--- a/content/browser/devtools/protocol/page_handler.cc
+++ b/content/browser/devtools/protocol/page_handler.cc
@@ -12,7 +12,7 @@
#include "base/strings/utf_string_conversions.h"
#include "content/browser/devtools/protocol/color_picker.h"
#include "content/browser/devtools/protocol/usage_and_quota_query.h"
-#include "content/browser/geolocation/geolocation_dispatcher_host.h"
+#include "content/browser/geolocation/geolocation_service_context.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
#include "content/browser/web_contents/web_contents_impl.h"
@@ -237,8 +237,8 @@ Response PageHandler::SetGeolocationOverride(double* latitude,
if (!web_contents)
return Response::InternalError("No WebContents to override");
- GeolocationDispatcherHost* geolocation_host =
- web_contents->geolocation_dispatcher_host();
+ GeolocationServiceContext* geolocation_context =
+ web_contents->GetGeolocationServiceContext();
scoped_ptr<Geoposition> geoposition(new Geoposition());
if (latitude && longitude && accuracy) {
geoposition->latitude = *latitude;
@@ -251,7 +251,7 @@ Response PageHandler::SetGeolocationOverride(double* latitude,
} else {
geoposition->error_code = Geoposition::ERROR_CODE_POSITION_UNAVAILABLE;
}
- geolocation_host->SetOverride(geoposition.Pass());
+ geolocation_context->SetOverride(geoposition.Pass());
return Response::OK();
}
@@ -264,9 +264,9 @@ Response PageHandler::ClearGeolocationOverride() {
if (!web_contents)
return Response::InternalError("No WebContents to override");
- GeolocationDispatcherHost* geolocation_host =
- web_contents->geolocation_dispatcher_host();
- geolocation_host->ClearOverride();
+ GeolocationServiceContext* geolocation_context =
+ web_contents->GetGeolocationServiceContext();
+ geolocation_context->ClearOverride();
return Response::OK();
}

Powered by Google App Engine
This is Rietveld 408576698