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

Unified Diff: blimp/engine/app/blimp_content_browser_client.cc

Issue 2091023006: Adds EngineGeolocationFeature for Blimp Geolocation project. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with head Created 4 years, 5 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: blimp/engine/app/blimp_content_browser_client.cc
diff --git a/blimp/engine/app/blimp_content_browser_client.cc b/blimp/engine/app/blimp_content_browser_client.cc
index 90ea2f52e4c78637305c63ea9346ec75d5085f3b..6597e8feace127de1f004b84cca780ab78f5663f 100644
--- a/blimp/engine/app/blimp_content_browser_client.cc
+++ b/blimp/engine/app/blimp_content_browser_client.cc
@@ -6,32 +6,15 @@
#include "blimp/engine/app/blimp_browser_main_parts.h"
#include "blimp/engine/app/settings_manager.h"
#include "blimp/engine/feature/geolocation/blimp_location_provider.h"
+#include "blimp/engine/feature/geolocation/engine_geolocation_feature.h"
#include "blimp/engine/mojo/blob_channel_service.h"
+#include "blimp/engine/session/blimp_engine_session.h"
#include "content/public/browser/geolocation_delegate.h"
#include "services/shell/public/cpp/interface_registry.h"
namespace blimp {
namespace engine {
-namespace {
-// A provider of services needed by Geolocation.
-class BlimpGeolocationDelegate : public content::GeolocationDelegate {
- public:
- BlimpGeolocationDelegate() = default;
-
- bool UseNetworkLocationProviders() final { return false; }
-
- std::unique_ptr<content::LocationProvider> OverrideSystemLocationProvider()
- final {
- return base::WrapUnique(new BlimpLocationProvider());
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(BlimpGeolocationDelegate);
-};
-
-} // anonymous namespace
-
BlimpContentBrowserClient::BlimpContentBrowserClient() {}
BlimpContentBrowserClient::~BlimpContentBrowserClient() {}
@@ -62,7 +45,10 @@ BlimpBrowserContext* BlimpContentBrowserClient::GetBrowserContext() {
content::GeolocationDelegate*
Kevin M 2016/07/19 16:01:41 no action required for this CL: I so wish this was
CJ 2016/07/19 20:35:58 Agreed.
BlimpContentBrowserClient::CreateGeolocationDelegate() {
- return new BlimpGeolocationDelegate();
+ EngineGeolocationFeature* geolocation_feature = blimp_browser_main_parts()
+ ->GetBlimpEngineSession()
+ ->GetGeolocationFeature();
+ return geolocation_feature->CreateGeolocationDelegate().release();
}
void BlimpContentBrowserClient::ExposeInterfacesToRenderer(

Powered by Google App Engine
This is Rietveld 408576698