OLD | NEW |
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 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
7 | 7 |
8 #include "android_webview/browser/aw_download_manager_delegate.h" | 8 #include "android_webview/browser/aw_download_manager_delegate.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "content/public/browser/browser_context.h" | 11 #include "content/public/browser/browser_context.h" |
| 12 #include "content/public/browser/geolocation_permission_context.h" |
12 | 13 |
13 namespace android_webview { | 14 namespace android_webview { |
14 | 15 |
15 class AwURLRequestContextGetter; | 16 class AwURLRequestContextGetter; |
16 | 17 |
| 18 typedef content::GeolocationPermissionContext* GeolocationPermissionFactoryFn(); |
| 19 |
17 class AwBrowserContext : public content::BrowserContext { | 20 class AwBrowserContext : public content::BrowserContext { |
18 public: | 21 public: |
19 AwBrowserContext(const FilePath path); | 22 AwBrowserContext( |
| 23 const FilePath path, |
| 24 GeolocationPermissionFactoryFn* geolocation_permission_factory); |
20 virtual ~AwBrowserContext(); | 25 virtual ~AwBrowserContext(); |
21 | 26 |
22 // Called before BrowserThreads are created. | 27 // Called before BrowserThreads are created. |
23 void InitializeBeforeThreadCreation(); | 28 void InitializeBeforeThreadCreation(); |
24 | 29 |
25 // content::BrowserContext implementation. | 30 // content::BrowserContext implementation. |
26 virtual FilePath GetPath() OVERRIDE; | 31 virtual FilePath GetPath() OVERRIDE; |
27 virtual bool IsOffTheRecord() const OVERRIDE; | 32 virtual bool IsOffTheRecord() const OVERRIDE; |
28 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 33 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
29 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 34 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
(...skipping 14 matching lines...) Expand all Loading... |
44 virtual content::SpeechRecognitionPreferences* | 49 virtual content::SpeechRecognitionPreferences* |
45 GetSpeechRecognitionPreferences() OVERRIDE; | 50 GetSpeechRecognitionPreferences() OVERRIDE; |
46 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 51 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
47 | 52 |
48 private: | 53 private: |
49 | 54 |
50 // The file path where data for this context is persisted. | 55 // The file path where data for this context is persisted. |
51 FilePath context_storage_path_; | 56 FilePath context_storage_path_; |
52 | 57 |
53 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; | 58 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; |
| 59 GeolocationPermissionFactoryFn* geolocation_permission_factory_; |
| 60 scoped_refptr<content::GeolocationPermissionContext> |
| 61 geolocation_permission_context_; |
54 | 62 |
55 AwDownloadManagerDelegate download_manager_delegate_; | 63 AwDownloadManagerDelegate download_manager_delegate_; |
56 | 64 |
57 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 65 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
58 }; | 66 }; |
59 | 67 |
60 } // namespace android_webview | 68 } // namespace android_webview |
61 | 69 |
62 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 70 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |