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

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: Using factory function ptr instead of passing object Created 7 years, 12 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..7318eb90c8f574d80e0d1a53a02f08f7fb559e38 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -8,8 +8,12 @@
namespace android_webview {
-AwBrowserContext::AwBrowserContext(const FilePath path)
- : context_storage_path_(path) {
+AwBrowserContext::AwBrowserContext(
+ const FilePath path,
+ GeolocationPermissionGetterFn* geolocation_permission_getter)
+ : context_storage_path_(path),
+ geolocation_permission_getter_(geolocation_permission_getter),
+ geolocation_permission_context_(NULL) {
boliu_use_chromium_pls 2013/01/04 23:45:43 nit: scoped_refptr defaults constructs to NULL, so
Kristian Monsen 2013/01/05 02:44:58 Done.
}
AwBrowserContext::~AwBrowserContext() {
@@ -75,10 +79,10 @@ AwBrowserContext::GetDownloadManagerDelegate() {
content::GeolocationPermissionContext*
AwBrowserContext::GetGeolocationPermissionContext() {
- // TODO(boliu): Implement this to power WebSettings.setGeolocationEnabled
- // setting.
- NOTIMPLEMENTED();
- return NULL;
+ if (geolocation_permission_context_ == NULL) {
boliu_use_chromium_pls 2013/01/04 23:45:43 nit: I believe you can just do if (!geolocation_pe
Kristian Monsen 2013/01/05 02:44:58 Compiler agrees.
+ geolocation_permission_context_ = (*geolocation_permission_getter_)();
+ }
+ return geolocation_permission_context_;
}
content::SpeechRecognitionPreferences*

Powered by Google App Engine
This is Rietveld 408576698