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

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: Fixing clang errors 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
« no previous file with comments | « android_webview/browser/aw_browser_context.h ('k') | android_webview/browser/aw_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8a9230c49ee1ee3c69e739d497075ba28d986d41 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)
+ : context_storage_path_(path),
+ geolocation_permission_factory_(geolocation_permission_factory) {
}
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_)();
+ }
+ return geolocation_permission_context_;
}
content::SpeechRecognitionPreferences*
« no previous file with comments | « android_webview/browser/aw_browser_context.h ('k') | android_webview/browser/aw_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698