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

Unified Diff: android_webview/browser/aw_browser_context.cc

Issue 11763002: Implementing native chromium GeolocationPermissionContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Misc fixes Created 7 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: android_webview/browser/aw_browser_context.cc
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index c476fe835ce4a40b6c68ff52f8b1fd27074f50ba..70306701f4d03fc11a2044aab7ede1dd13df8928 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -8,8 +8,11 @@
namespace android_webview {
-AwBrowserContext::AwBrowserContext(const FilePath path)
- : context_storage_path_(path) {
+AwBrowserContext::AwBrowserContext(
+ const FilePath path,
+ GeolocationPermissionFactoryFn* geolocation_permission_factory_fn)
+ : context_storage_path_(path),
+ geolocation_permission_factory_fn_(geolocation_permission_factory_fn) {
}
AwBrowserContext::~AwBrowserContext() {
@@ -75,10 +78,10 @@ AwBrowserContext::GetDownloadManagerDelegate() {
content::GeolocationPermissionContext*
AwBrowserContext::GetGeolocationPermissionContext() {
- // TODO(boliu): Implement this to power WebSettings.setGeolocationEnabled
- // setting.
- NOTIMPLEMENTED();
- return NULL;
+ if (!geolocation_permission_context_) {
+ geolocation_permission_context_ = (*geolocation_permission_factory_fn_)();
+ }
+ return geolocation_permission_context_;
}
content::SpeechRecognitionPreferences*

Powered by Google App Engine
This is Rietveld 408576698