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

Unified Diff: chromecast/browser/cast_content_browser_client.cc

Issue 2098553002: Geolocation: extract ContentBrowserClient methods specific to Geolocation into a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a TODO Created 4 years, 6 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: chromecast/browser/cast_content_browser_client.cc
diff --git a/chromecast/browser/cast_content_browser_client.cc b/chromecast/browser/cast_content_browser_client.cc
index b31d7635ca935571e0cc1f4e539cdcf284e537c5..9ed05bf6ce18d400ab11598c768d54dcce5b5212 100644
--- a/chromecast/browser/cast_content_browser_client.cc
+++ b/chromecast/browser/cast_content_browser_client.cc
@@ -83,6 +83,22 @@ static std::unique_ptr<::shell::ShellClient> CreateMojoMediaApplication(
quit_closure));
}
#endif // defined(ENABLE_MOJO_MEDIA_IN_BROWSER_PROCESS)
+
+// A provider of services for Geolocation.
+class CastGeolocationDelegate : public content::GeolocationProvider::Delegate {
+ public:
+ explicit CastGeolocationDelegate(CastBrowserContext* context)
+ : context_(context) {}
+ content::AccessTokenStore* CreateAccessTokenStore() override {
+ return new CastAccessTokenStore(context_);
+ }
+
+ private:
+ CastBrowserContext* context_;
+
+ DISALLOW_COPY_AND_ASSIGN(CastGeolocationDelegate);
+};
+
} // namespace
CastContentBrowserClient::CastContentBrowserClient()
@@ -260,8 +276,9 @@ void CastContentBrowserClient::AppendExtraCommandLineSwitches(
AppendExtraCommandLineSwitches(command_line);
}
-content::AccessTokenStore* CastContentBrowserClient::CreateAccessTokenStore() {
- return new CastAccessTokenStore(
+content::GeolocationProvider::Delegate*
+CastContentBrowserClient::CreateGeolocationDelegate() {
+ return new CastGeolocationDelegate(
CastBrowserProcess::GetInstance()->browser_context());
}
« no previous file with comments | « chromecast/browser/cast_content_browser_client.h ('k') | content/browser/geolocation/geolocation_provider_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698