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 |
17 class AwBrowserContext : public content::BrowserContext { | 18 class AwBrowserContext : public content::BrowserContext { |
18 public: | 19 public: |
19 AwBrowserContext(const FilePath path); | 20 AwBrowserContext( |
| 21 const FilePath path, |
| 22 content::GeolocationPermissionContext* geolocation_permission_context); |
20 virtual ~AwBrowserContext(); | 23 virtual ~AwBrowserContext(); |
21 | 24 |
22 // Called before BrowserThreads are created. | 25 // Called before BrowserThreads are created. |
23 void InitializeBeforeThreadCreation(); | 26 void InitializeBeforeThreadCreation(); |
24 | 27 |
25 // content::BrowserContext implementation. | 28 // content::BrowserContext implementation. |
26 virtual FilePath GetPath() OVERRIDE; | 29 virtual FilePath GetPath() OVERRIDE; |
27 virtual bool IsOffTheRecord() const OVERRIDE; | 30 virtual bool IsOffTheRecord() const OVERRIDE; |
28 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 31 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
29 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 32 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
(...skipping 14 matching lines...) Expand all Loading... |
44 virtual content::SpeechRecognitionPreferences* | 47 virtual content::SpeechRecognitionPreferences* |
45 GetSpeechRecognitionPreferences() OVERRIDE; | 48 GetSpeechRecognitionPreferences() OVERRIDE; |
46 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; | 49 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; |
47 | 50 |
48 private: | 51 private: |
49 | 52 |
50 // The file path where data for this context is persisted. | 53 // The file path where data for this context is persisted. |
51 FilePath context_storage_path_; | 54 FilePath context_storage_path_; |
52 | 55 |
53 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; | 56 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; |
| 57 scoped_refptr<content::GeolocationPermissionContext> |
| 58 geolocation_permission_context_; |
54 | 59 |
55 AwDownloadManagerDelegate download_manager_delegate_; | 60 AwDownloadManagerDelegate download_manager_delegate_; |
56 | 61 |
57 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 62 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
58 }; | 63 }; |
59 | 64 |
60 } // namespace android_webview | 65 } // namespace android_webview |
61 | 66 |
62 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 67 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
OLD | NEW |