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

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

Issue 11308362: Add StoragePartition's ProtocolHandlers at URLRequestContext construction time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r181485) Created 7 years, 10 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
« no previous file with comments | « no previous file | android_webview/browser/aw_browser_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <vector> 8 #include <vector>
9 9
10 #include "android_webview/browser/aw_download_manager_delegate.h" 10 #include "android_webview/browser/aw_download_manager_delegate.h"
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
11 #include "base/file_path.h" 13 #include "base/file_path.h"
12 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h"
13 #include "components/visitedlink/browser/visitedlink_delegate.h" 16 #include "components/visitedlink/browser/visitedlink_delegate.h"
14 #include "content/public/browser/browser_context.h" 17 #include "content/public/browser/browser_context.h"
15 #include "content/public/browser/geolocation_permission_context.h" 18 #include "content/public/browser/geolocation_permission_context.h"
19 #include "net/url_request/url_request_job_factory.h"
16 20
17 class GURL; 21 class GURL;
18 22
19 namespace components { 23 namespace components {
20 class VisitedLinkMaster; 24 class VisitedLinkMaster;
21 } // namespace components 25 } // namespace components
22 26
23 namespace content { 27 namespace content {
28 class ResourceContext;
24 class WebContents; 29 class WebContents;
25 } // namespace content 30 } // namespace content
26 31
27 namespace android_webview { 32 namespace android_webview {
28 33
29 class AwURLRequestContextGetter; 34 class AwURLRequestContextGetter;
30 35
31 typedef content::GeolocationPermissionContext* GeolocationPermissionFactoryFn(); 36 typedef content::GeolocationPermissionContext* GeolocationPermissionFactoryFn();
32 37
33 class AwBrowserContext : public content::BrowserContext, 38 class AwBrowserContext : public content::BrowserContext,
(...skipping 12 matching lines...) Expand all
46 51
47 // Called before BrowserThreads are created. 52 // Called before BrowserThreads are created.
48 void InitializeBeforeThreadCreation(); 53 void InitializeBeforeThreadCreation();
49 54
50 // Maps to BrowserMainParts::PreMainMessageLoopRun. 55 // Maps to BrowserMainParts::PreMainMessageLoopRun.
51 void PreMainMessageLoopRun(); 56 void PreMainMessageLoopRun();
52 57
53 // These methods map to Add methods in components::VisitedLinkMaster. 58 // These methods map to Add methods in components::VisitedLinkMaster.
54 void AddVisitedURLs(const std::vector<GURL>& urls); 59 void AddVisitedURLs(const std::vector<GURL>& urls);
55 60
61 net::URLRequestContextGetter* CreateRequestContext(
62 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
63 blob_protocol_handler,
64 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
65 file_system_protocol_handler,
66 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
67 developer_protocol_handler,
68 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
69 chrome_protocol_handler,
70 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
71 chrome_devtools_protocol_handler);
72 net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
73 const FilePath& partition_path,
74 bool in_memory,
75 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
76 blob_protocol_handler,
77 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
78 file_system_protocol_handler,
79 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
80 developer_protocol_handler,
81 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
82 chrome_protocol_handler,
83 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
84 chrome_devtools_protocol_handler);
85
56 // content::BrowserContext implementation. 86 // content::BrowserContext implementation.
57 virtual FilePath GetPath() OVERRIDE; 87 virtual FilePath GetPath() OVERRIDE;
58 virtual bool IsOffTheRecord() const OVERRIDE; 88 virtual bool IsOffTheRecord() const OVERRIDE;
59 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; 89 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
60 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 90 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
61 int renderer_child_id) OVERRIDE; 91 int renderer_child_id) OVERRIDE;
62 virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition(
63 const FilePath& partition_path, bool in_memory) OVERRIDE;
64 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE; 92 virtual net::URLRequestContextGetter* GetMediaRequestContext() OVERRIDE;
65 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 93 virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
66 int renderer_child_id) OVERRIDE; 94 int renderer_child_id) OVERRIDE;
67 virtual net::URLRequestContextGetter* 95 virtual net::URLRequestContextGetter*
68 GetMediaRequestContextForStoragePartition( 96 GetMediaRequestContextForStoragePartition(
69 const FilePath& partition_path, bool in_memory) OVERRIDE; 97 const FilePath& partition_path, bool in_memory) OVERRIDE;
70 virtual content::ResourceContext* GetResourceContext() OVERRIDE; 98 virtual content::ResourceContext* GetResourceContext() OVERRIDE;
71 virtual content::DownloadManagerDelegate* 99 virtual content::DownloadManagerDelegate*
72 GetDownloadManagerDelegate() OVERRIDE; 100 GetDownloadManagerDelegate() OVERRIDE;
73 virtual content::GeolocationPermissionContext* 101 virtual content::GeolocationPermissionContext*
74 GetGeolocationPermissionContext() OVERRIDE; 102 GetGeolocationPermissionContext() OVERRIDE;
75 virtual content::SpeechRecognitionPreferences* 103 virtual content::SpeechRecognitionPreferences*
76 GetSpeechRecognitionPreferences() OVERRIDE; 104 GetSpeechRecognitionPreferences() OVERRIDE;
77 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; 105 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
78 106
79 // components::VisitedLinkDelegate implementation. 107 // components::VisitedLinkDelegate implementation.
80 virtual void RebuildTable( 108 virtual void RebuildTable(
81 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE; 109 const scoped_refptr<URLEnumerator>& enumerator) OVERRIDE;
82 110
83 private: 111 private:
84
85 // The file path where data for this context is persisted. 112 // The file path where data for this context is persisted.
86 FilePath context_storage_path_; 113 FilePath context_storage_path_;
87 114
88 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_; 115 scoped_refptr<AwURLRequestContextGetter> url_request_context_getter_;
89 GeolocationPermissionFactoryFn* geolocation_permission_factory_; 116 GeolocationPermissionFactoryFn* geolocation_permission_factory_;
90 scoped_refptr<content::GeolocationPermissionContext> 117 scoped_refptr<content::GeolocationPermissionContext>
91 geolocation_permission_context_; 118 geolocation_permission_context_;
92 119
93 AwDownloadManagerDelegate download_manager_delegate_; 120 AwDownloadManagerDelegate download_manager_delegate_;
94 121
95 scoped_ptr<components::VisitedLinkMaster> visitedlink_master_; 122 scoped_ptr<components::VisitedLinkMaster> visitedlink_master_;
123 scoped_ptr<content::ResourceContext> resource_context_;
96 124
97 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); 125 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext);
98 }; 126 };
99 127
100 } // namespace android_webview 128 } // namespace android_webview
101 129
102 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ 130 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698