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

Side by Side Diff: android_webview/browser/aw_browser_context.h

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, 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 #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* GeolocationPermissionGetterFn();
boliu_use_chromium_pls 2013/01/04 23:45:43 Name it FactoryFn, since the function is also pass
Kristian Monsen 2013/01/05 02:44:58 Done, also added _fn to the end of the variable na
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 GeolocationPermissionGetterFn* geolocation_permission_getter);
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
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 GeolocationPermissionGetterFn* geolocation_permission_getter_;
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_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/aw_browser_context.cc » ('j') | android_webview/browser/aw_browser_context.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698