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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/browser/aw_browser_context.h" 5 #include "android_webview/browser/aw_browser_context.h"
6 6
7 #include "android_webview/browser/net/aw_url_request_context_getter.h" 7 #include "android_webview/browser/net/aw_url_request_context_getter.h"
8 8
9 namespace android_webview { 9 namespace android_webview {
10 10
11 AwBrowserContext::AwBrowserContext(const FilePath path) 11 AwBrowserContext::AwBrowserContext(
12 : context_storage_path_(path) { 12 const FilePath path,
13 GeolocationPermissionFactoryFn* geolocation_permission_factory)
14 : context_storage_path_(path),
15 geolocation_permission_factory_(geolocation_permission_factory) {
13 } 16 }
14 17
15 AwBrowserContext::~AwBrowserContext() { 18 AwBrowserContext::~AwBrowserContext() {
16 } 19 }
17 20
18 void AwBrowserContext::InitializeBeforeThreadCreation() { 21 void AwBrowserContext::InitializeBeforeThreadCreation() {
19 DCHECK(!url_request_context_getter_); 22 DCHECK(!url_request_context_getter_);
20 url_request_context_getter_ = new AwURLRequestContextGetter(this); 23 url_request_context_getter_ = new AwURLRequestContextGetter(this);
21 } 24 }
22 25
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return url_request_context_getter_->GetResourceContext(); 71 return url_request_context_getter_->GetResourceContext();
69 } 72 }
70 73
71 content::DownloadManagerDelegate* 74 content::DownloadManagerDelegate*
72 AwBrowserContext::GetDownloadManagerDelegate() { 75 AwBrowserContext::GetDownloadManagerDelegate() {
73 return &download_manager_delegate_; 76 return &download_manager_delegate_;
74 } 77 }
75 78
76 content::GeolocationPermissionContext* 79 content::GeolocationPermissionContext*
77 AwBrowserContext::GetGeolocationPermissionContext() { 80 AwBrowserContext::GetGeolocationPermissionContext() {
78 // TODO(boliu): Implement this to power WebSettings.setGeolocationEnabled 81 if (!geolocation_permission_context_) {
79 // setting. 82 geolocation_permission_context_ = (*geolocation_permission_factory_)();
80 NOTIMPLEMENTED(); 83 }
81 return NULL; 84 return geolocation_permission_context_;
82 } 85 }
83 86
84 content::SpeechRecognitionPreferences* 87 content::SpeechRecognitionPreferences*
85 AwBrowserContext::GetSpeechRecognitionPreferences() { 88 AwBrowserContext::GetSpeechRecognitionPreferences() {
86 // By default allows profanities in speech recognition if return NULL. 89 // By default allows profanities in speech recognition if return NULL.
87 return NULL; 90 return NULL;
88 } 91 }
89 92
90 quota::SpecialStoragePolicy* AwBrowserContext::GetSpecialStoragePolicy() { 93 quota::SpecialStoragePolicy* AwBrowserContext::GetSpecialStoragePolicy() {
91 // TODO(boliu): Implement this so we are not relying on default behavior. 94 // TODO(boliu): Implement this so we are not relying on default behavior.
92 NOTIMPLEMENTED(); 95 NOTIMPLEMENTED();
93 return NULL; 96 return NULL;
94 } 97 }
95 98
96 } // namespace android_webview 99 } // namespace android_webview
OLDNEW
« 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