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

Unified Diff: android_webview/browser/aw_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: android_webview/browser/aw_content_browser_client.cc
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index a717f12c64fb5fc5c27e16f6ba7352f6236caedc..9176b0babe42ee6dd0e7f62820b5d3b39c3df217 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -160,6 +160,19 @@ class AwAccessTokenStore : public content::AccessTokenStore {
DISALLOW_COPY_AND_ASSIGN(AwAccessTokenStore);
};
+// A provider of Geolocation services to override AccessTokenStore.
+class AwGeolocationDelegate : public content::GeolocationProvider::Delegate {
+ public:
+ AwGeolocationDelegate() = default;
+
+ content::AccessTokenStore* CreateAccessTokenStore() final {
+ return new AwAccessTokenStore();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AwGeolocationDelegate);
+};
+
AwLocaleManager* g_locale_manager = NULL;
} // anonymous namespace
@@ -428,8 +441,9 @@ net::NetLog* AwContentBrowserClient::GetNetLog() {
return browser_context_->GetAwURLRequestContext()->GetNetLog();
}
-content::AccessTokenStore* AwContentBrowserClient::CreateAccessTokenStore() {
- return new AwAccessTokenStore();
+content::GeolocationProvider::Delegate*
+AwContentBrowserClient::CreateGeolocationDelegate() {
+ return new AwGeolocationDelegate();
}
bool AwContentBrowserClient::IsFastShutdownPossible() {
« no previous file with comments | « android_webview/browser/aw_content_browser_client.h ('k') | blimp/engine/app/blimp_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698